[10671] Convert some Unit owner/etc guids to ObjectGuid way.

This commit is contained in:
VladimirMangos 2010-11-01 12:11:23 +03:00
parent 92d98b9fb2
commit a32d68febd
18 changed files with 154 additions and 149 deletions

View file

@ -115,18 +115,18 @@ void Totem::UnSummon()
void Totem::SetOwner(Unit* owner)
{
SetCreatorGUID(owner->GetGUID());
SetOwnerGUID(owner->GetGUID());
SetCreatorGuid(owner->GetObjectGuid());
SetOwnerGuid(owner->GetObjectGuid());
setFaction(owner->getFaction());
SetLevel(owner->getLevel());
}
Unit *Totem::GetOwner()
{
uint64 ownerid = GetOwnerGUID();
if(!ownerid)
ObjectGuid ownerGuid = GetOwnerGuid();
if (ownerGuid.IsEmpty())
return NULL;
return ObjectAccessor::GetUnit(*this, ownerid);
return ObjectAccessor::GetUnit(*this, ownerGuid);
}
void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)