mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[10470] Fixed totem owner faction/level set for creature onwer case.
When totem created creature owner alos not in world yet. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
54d991ef3a
commit
73a85b0989
4 changed files with 8 additions and 11 deletions
|
|
@ -109,15 +109,12 @@ void Totem::UnSummon()
|
|||
AddObjectToRemoveList();
|
||||
}
|
||||
|
||||
void Totem::SetOwner(uint64 guid)
|
||||
void Totem::SetOwner(Unit* owner)
|
||||
{
|
||||
SetCreatorGUID(guid);
|
||||
SetOwnerGUID(guid);
|
||||
if (Unit *owner = GetOwner())
|
||||
{
|
||||
setFaction(owner->getFaction());
|
||||
SetLevel(owner->getLevel());
|
||||
}
|
||||
SetCreatorGUID(owner->GetGUID());
|
||||
SetOwnerGUID(owner->GetGUID());
|
||||
setFaction(owner->getFaction());
|
||||
SetLevel(owner->getLevel());
|
||||
}
|
||||
|
||||
Unit *Totem::GetOwner()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue