diff options
author | click <none@none> | 2010-04-16 19:20:27 +0200 |
---|---|---|
committer | click <none@none> | 2010-04-16 19:20:27 +0200 |
commit | 746e170e2b7a774a41929dc1b9f82a7fad7791f8 (patch) | |
tree | fdcab6028f8104166966a208aa9982ae0c53c18d | |
parent | 4b98c72039ea380e1a95331063881ed1572b9276 (diff) |
*Fix: Pets now properly avoid doublestacking talentbased auras where they shouldn't
This also removes the double-filed entries in pet_auras, meaning no more SQL-complaints in the server logs regarding duplicates
Also fixes (properly) pets losing/readding pet auras when dismissed/lost on a boat/lost on flightpath usage
Fix by click and Liberate
--HG--
branch : trunk
-rw-r--r-- | src/game/Pet.cpp | 8 |
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; |