From 31f989fab9cae85c35ef58857ca960581e6f0735 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 5 Aug 2009 16:14:54 -0500 Subject: For check allowed in dead state auras apply use IsDeathPersistentSpell instead hack code. Author: VladimirMangos --HG-- branch : trunk --- src/game/Unit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1eb4e8bd723..fae807a5a6c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3778,8 +3778,10 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects) return false; } + SpellEntry const* aurSpellInfo = Aur->GetSpellProto(); + // ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load) - if( !isAlive() && Aur->GetId() != 20584 && Aur->GetId() != 8326 && Aur->GetId() != 2584 && + if( !isAlive() && !IsDeathPersistentSpell(aurSpellInfo) && (GetTypeId()!=TYPEID_PLAYER || !((Player*)this)->GetSession()->PlayerLoading()) ) { delete Aur; @@ -3795,7 +3797,6 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects) return false; } - SpellEntry const* aurSpellInfo = Aur->GetSpellProto(); uint32 aurId = aurSpellInfo->Id; // passive and persistent and Incanter's Absorption auras can stack with themselves any number of times -- cgit v1.2.3