diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 03a4c6b3c..1dd2f28e2 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -6889,7 +6889,7 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc) if (slot < MAX_TOTEM_SLOT) m_caster->_AddTotem(TotemSlot(slot),pTotem); - pTotem->SetOwner(m_caster->GetGUID()); + pTotem->SetOwner(m_caster); pTotem->SetTypeBySummonSpell(m_spellInfo); // must be after Create call where m_spells initialized int32 duration=GetSpellDuration(m_spellInfo); diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index 62db8e4b5..c67edeb24 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -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() diff --git a/src/game/Totem.h b/src/game/Totem.h index b88b13b6b..d5dcd23c0 100644 --- a/src/game/Totem.h +++ b/src/game/Totem.h @@ -42,7 +42,7 @@ class Totem : public Creature TotemType GetTotemType() const { return m_type; } void SetTypeBySummonSpell(SpellEntry const * spellProto); void SetDuration(uint32 dur) { m_duration = dur; } - void SetOwner(uint64 guid); + void SetOwner(Unit* owner); bool UpdateStats(Stats /*stat*/) { return true; } bool UpdateAllStats() { return true; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index e74fb0bf8..ff0d14f43 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10469" + #define REVISION_NR "10470" #endif // __REVISION_NR_H__