[7770] Prevent access to possible deleted aura's spell proto in Aura::HandleModStealth.

This commit is contained in:
VladimirMangos 2009-05-05 12:41:47 +04:00
parent 565afd4d57
commit eb9bd0ec7e
2 changed files with 4 additions and 3 deletions

View file

@ -3526,6 +3526,7 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
void Aura::HandleModStealth(bool apply, bool Real)
{
Unit* pTarget = m_target;
SpellEntry const* pSpellInfo = GetSpellProto();
if (apply)
{
@ -3561,7 +3562,7 @@ void Aura::HandleModStealth(bool apply, bool Real)
pTarget->CastCustomSpell(pTarget,31665,&bp,NULL,NULL,true);
}
// Overkill
else if ((*i)->GetId() == 58426 && GetSpellProto()->SpellFamilyFlags & 0x0000000000400000LL)
else if ((*i)->GetId() == 58426 && pSpellInfo->SpellFamilyFlags & 0x0000000000400000LL)
{
pTarget->RemoveAurasDueToSpell(58428);
pTarget->CastSpell(pTarget, 58427, true);
@ -3601,7 +3602,7 @@ void Aura::HandleModStealth(bool apply, bool Real)
if ((*i)->GetSpellProto()->SpellIconID == 2114)
pTarget->CastSpell(pTarget,31666,true);
// Overkill
else if ((*i)->GetId() == 58426 && GetSpellProto()->SpellFamilyFlags & 0x0000000000400000LL)
else if ((*i)->GetId() == 58426 && pSpellInfo->SpellFamilyFlags & 0x0000000000400000LL)
pTarget->CastSpell(pTarget, 58428, true);
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7769"
#define REVISION_NR "7770"
#endif // __REVISION_NR_H__