mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 00:45:32 +00:00
Fix GetEffect result when running on dead actors
This commit is contained in:
parent
9c457c7fc0
commit
bc5d54a161
2 changed files with 2 additions and 1 deletions
|
@ -1826,6 +1826,7 @@ namespace MWMechanics
|
|||
// One case where we need this is to make sure bound items are removed upon death
|
||||
stats.modifyMagicEffects(MWMechanics::MagicEffects());
|
||||
stats.getActiveSpells().clear();
|
||||
stats.getSpells().clear();
|
||||
// Make sure spell effects are removed
|
||||
purgeSpellEffects(stats.getActorId());
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ namespace MWScript
|
|||
|
||||
MWMechanics::MagicEffects effects = stats.getSpells().getMagicEffects();
|
||||
effects += stats.getActiveSpells().getMagicEffects();
|
||||
if (ptr.getClass().hasInventoryStore(ptr))
|
||||
if (ptr.getClass().hasInventoryStore(ptr) && !stats.isDeathAnimationFinished())
|
||||
{
|
||||
MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr);
|
||||
effects += store.getMagicEffects();
|
||||
|
|
Loading…
Reference in a new issue