*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
This commit is contained in:
click
2010-04-16 19:20:27 +02:00
parent 4b98c72039
commit 746e170e2b
+3 -5
View File
@@ -1945,12 +1945,10 @@ bool Pet::IsPetAura(Aura const* aura)
if (!owner || owner->GetTypeId() != TYPEID_PLAYER) if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
return false; return false;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
PetAura const* pa = spellmgr.GetPetAura(aura->GetId(),i);
// if the owner has that pet aura, return true // if the owner has that pet aura, return true
if (owner->m_petAuras.find(pa) != owner->m_petAuras.end()) for (PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end(); ++itr)
{
if ((*itr)->GetAura(GetEntry()) == aura->GetId())
return true; return true;
} }
return false; return false;