mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-25 22:10:41 -04:00
Merge pull request #2560 from Capostrophic/geteffect
Fix GetEffect result when running on dead actors
This commit is contained in:
commit
b27089f7be
@ -1826,6 +1826,7 @@ namespace MWMechanics
|
|||||||
// One case where we need this is to make sure bound items are removed upon death
|
// One case where we need this is to make sure bound items are removed upon death
|
||||||
stats.modifyMagicEffects(MWMechanics::MagicEffects());
|
stats.modifyMagicEffects(MWMechanics::MagicEffects());
|
||||||
stats.getActiveSpells().clear();
|
stats.getActiveSpells().clear();
|
||||||
|
stats.getSpells().clear();
|
||||||
// Make sure spell effects are removed
|
// Make sure spell effects are removed
|
||||||
purgeSpellEffects(stats.getActorId());
|
purgeSpellEffects(stats.getActorId());
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ namespace MWScript
|
|||||||
|
|
||||||
MWMechanics::MagicEffects effects = stats.getSpells().getMagicEffects();
|
MWMechanics::MagicEffects effects = stats.getSpells().getMagicEffects();
|
||||||
effects += stats.getActiveSpells().getMagicEffects();
|
effects += stats.getActiveSpells().getMagicEffects();
|
||||||
if (ptr.getClass().hasInventoryStore(ptr))
|
if (ptr.getClass().hasInventoryStore(ptr) && !stats.isDeathAnimationFinished())
|
||||||
{
|
{
|
||||||
MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr);
|
MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr);
|
||||||
effects += store.getMagicEffects();
|
effects += store.getMagicEffects();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user