mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 13:37:13 +00:00
[10671] Convert some Unit owner/etc guids to ObjectGuid way.
This commit is contained in:
parent
92d98b9fb2
commit
a32d68febd
18 changed files with 154 additions and 149 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue