Index: src/game/Player.cpp =================================================================== --- src/game/Player.cpp (revision 2508) +++ src/game/Player.cpp (working copy) @@ -9572,8 +9572,8 @@ delete result; } - if(isAlive()) - _ApplyAllItemMods(); + + _ApplyAllItemMods(); } // load mailed items which should receive current player @@ -9834,11 +9834,8 @@ sLog.outDebug("The value of player %s before unload item and aura is: ", m_name.c_str()); outDebugValues(); - if(isAlive()) - { - _RemoveAllItemMods(); - _RemoveAllAuraMods(); - } + _RemoveAllItemMods(); + _RemoveAllAuraMods(); bool inworld = IsInWorld(); if (inworld) @@ -9919,11 +9916,8 @@ sLog.outDebug("Save Basic value of player %s is: ", m_name.c_str()); outDebugValues(); - if(isAlive()) - { - _ApplyAllAuraMods(); - _ApplyAllItemMods(); - } + _ApplyAllAuraMods(); + _ApplyAllItemMods(); // restore state SetUInt32Value(UNIT_FIELD_BYTES_1, tmp_bytes); Index: src/game/Player.h =================================================================== --- src/game/Player.h (revision 2508) +++ src/game/Player.h (working copy) @@ -450,14 +450,11 @@ bool cur = isAlive(); if(s == JUST_DIED && cur) { - _RemoveAllItemMods(); UnsummonPet(); } Unit::setDeathState(s); if(isAlive() && !cur) { - _ApplyAllItemMods(); - // restore default warrior stance if(getClass()== WARRIOR) CastSpell(this,SPELL_PASSIVE_BATTLE_STANCE,true); Index: src/game/SpellEffects.cpp =================================================================== --- src/game/SpellEffects.cpp (revision 2508) +++ src/game/SpellEffects.cpp (working copy) @@ -276,7 +276,7 @@ { if(!unitTarget) return; - if(!unitTarget->isAlive()) + if(!unitTarget->isAlive() && unitTarget->IsInWorld()) return; uint8 castResult = 0; //If m_immuneToState type contain this aura type, IMMUNE aura. Index: src/game/Unit.cpp =================================================================== --- src/game/Unit.cpp (revision 2508) +++ src/game/Unit.cpp (working copy) @@ -1352,6 +1352,9 @@ void Unit::_UpdateSpells( uint32 time ) { + if(!this->isAlive()) + return; + if(m_currentSpell != NULL) { m_currentSpell->update(time); @@ -1613,7 +1616,7 @@ bool Unit::AddAura(Aura *Aur, bool uniq) { - if (!isAlive()) + if (!isAlive() && IsInWorld()) //fix for player load when dead { delete Aur; return false; @@ -1947,14 +1950,12 @@ void Unit::RemoveAllAurasOnDeath() { - // used just after dieing to remove all visible auras - // and disable the mods for the passive ones + // used just after dieling to remove all visible auras for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();) if (!iter->second->IsPassive()) RemoveAura(iter, true); else ++iter; - _RemoveAllAuraMods(); } void Unit::DelayAura(uint32 spellId, uint32 effindex, int32 delaytime) Index: src/game/Unit.h =================================================================== --- src/game/Unit.h (revision 2508) +++ src/game/Unit.h (working copy) @@ -534,10 +534,7 @@ RemoveAllAurasOnDeath(); UnsummonTotem(); } - if (m_deathState != ALIVE && s == ALIVE) - { - _ApplyAllAuraMods(); - } + m_deathState = s; }