mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
ExtraSpell magic effect: a basic implementation
This commit is contained in:
parent
b14404e9cc
commit
30b05b557b
2 changed files with 8 additions and 0 deletions
|
@ -536,6 +536,13 @@ namespace MWMechanics
|
||||||
|
|
||||||
appliedLastingEffects.push_back(effect);
|
appliedLastingEffects.push_back(effect);
|
||||||
|
|
||||||
|
// Unequip all items, if a spell with the ExtraSpell effect was casted
|
||||||
|
if (effectIt->mEffectID == ESM::MagicEffect::ExtraSpell && target.getClass().hasInventoryStore(target))
|
||||||
|
{
|
||||||
|
MWWorld::InventoryStore& store = target.getClass().getInventoryStore(target);
|
||||||
|
store.unequipAll(target);
|
||||||
|
}
|
||||||
|
|
||||||
// Command spells should have their effect, including taking the target out of combat, each time the spell successfully affects the target
|
// Command spells should have their effect, including taking the target out of combat, each time the spell successfully affects the target
|
||||||
if (((effectIt->mEffectID == ESM::MagicEffect::CommandHumanoid && target.getClass().isNpc())
|
if (((effectIt->mEffectID == ESM::MagicEffect::CommandHumanoid && target.getClass().isNpc())
|
||||||
|| (effectIt->mEffectID == ESM::MagicEffect::CommandCreature && target.getTypeName() == typeid(ESM::Creature).name()))
|
|| (effectIt->mEffectID == ESM::MagicEffect::CommandCreature && target.getTypeName() == typeid(ESM::Creature).name()))
|
||||||
|
|
|
@ -380,6 +380,7 @@ static std::map<short,std::string> genNameMap()
|
||||||
names[131] ="sEffectBoundGloves";
|
names[131] ="sEffectBoundGloves";
|
||||||
names[128] ="sEffectBoundHelm";
|
names[128] ="sEffectBoundHelm";
|
||||||
names[125] ="sEffectBoundLongbow";
|
names[125] ="sEffectBoundLongbow";
|
||||||
|
names[126] ="sEffectExtraSpell";
|
||||||
names[121] ="sEffectBoundLongsword";
|
names[121] ="sEffectBoundLongsword";
|
||||||
names[122] ="sEffectBoundMace";
|
names[122] ="sEffectBoundMace";
|
||||||
names[130] ="sEffectBoundShield";
|
names[130] ="sEffectBoundShield";
|
||||||
|
|
Loading…
Reference in a new issue