[11459] More ObjectGuid using in Aura/SpellAuraHolder code.

Also fix build in PetAI code. Thanks to rsa for fix code.
This commit is contained in:
VladimirMangos 2011-05-09 23:09:39 +04:00
parent 151e5eae9c
commit 44f2c26389
15 changed files with 104 additions and 96 deletions

View file

@ -1398,7 +1398,7 @@ void Pet::_SaveAuras()
//skip all holders from spells that are passive or channeled
//do not save single target holders (unless they were cast by the player)
if (save && !holder->IsPassive() && !IsChanneledSpell(holder->GetSpellProto()) && (holder->GetCasterGUID() == GetGUID() || !holder->IsSingleTarget()))
if (save && !holder->IsPassive() && !IsChanneledSpell(holder->GetSpellProto()) && (holder->GetCasterGuid() == GetObjectGuid() || !holder->IsSingleTarget()))
{
int32 damage[MAX_EFFECT_INDEX];
uint32 periodicTime[MAX_EFFECT_INDEX];
@ -1412,7 +1412,7 @@ void Pet::_SaveAuras()
if (Aura *aur = holder->GetAuraByEffectIndex(SpellEffectIndex(i)))
{
// don't save not own area auras
if (aur->IsAreaAura() && holder->GetCasterGUID() != GetGUID())
if (aur->IsAreaAura() && holder->GetCasterGuid() != GetObjectGuid())
continue;
damage[i] = aur->GetModifier()->m_amount;