*Fix a bug that pet/charmed cannot AOE neutral creatures.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-19 19:45:54 -05:00
parent e1806419be
commit 68fd41d2c8
9 changed files with 61 additions and 31 deletions
+5 -8
View File
@@ -142,15 +142,12 @@ void Totem::UnSummon()
AddObjectToRemoveList();
}
void Totem::SetOwner(uint64 guid)
void Totem::SetOwner(Unit *owner)
{
SetCreatorGUID(guid);
SetOwnerGUID(guid);
if (Unit *owner = GetOwner())
{
this->setFaction(owner->getFaction());
this->SetLevel(owner->getLevel());
}
SetCreatorGUID(owner->GetGUID());
TempSummon::SetOwner(owner, true);
setFaction(owner->getFaction());
SetLevel(owner->getLevel());
}
Unit *Totem::GetOwner()