[11460] Use ObjectGuids in last missing cases in AI classes.

This commit is contained in:
VladimirMangos 2011-05-10 11:03:54 +04:00
parent 44f2c26389
commit b4f2e3d1a0
13 changed files with 38 additions and 34 deletions

View file

@ -252,7 +252,7 @@ void PetAI::UpdateAI(const uint32 diff)
bool spellUsed = false;
for (AllySet::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
{
Unit* Target = ObjectAccessor::GetUnit(*m_creature,*tar);
Unit* Target = m_creature->GetMap()->GetUnit(*tar);
//only buff targets that are in combat, unless the spell can only be cast while out of combat
if (!Target)