aboutsummaryrefslogtreecommitdiff
path: root/src/game/Totem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Totem.cpp')
-rw-r--r--src/game/Totem.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index 6969960e7ea..eff78d4e8cd 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -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()