aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/Pet.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 1f15cab5142..ee96d7de9ee 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1945,12 +1945,10 @@ bool Pet::IsPetAura(Aura const* aura)
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
return false;
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ // if the owner has that pet aura, return true
+ for (PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end(); ++itr)
{
- PetAura const* pa = spellmgr.GetPetAura(aura->GetId(),i);
-
- // if the owner has that pet aura, return true
- if (owner->m_petAuras.find(pa) != owner->m_petAuras.end())
+ if ((*itr)->GetAura(GetEntry()) == aura->GetId())
return true;
}
return false;