diff options
Diffstat (limited to 'src/game/Totem.cpp')
-rw-r--r-- | src/game/Totem.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index c7a81be29ef..3cdc8050d53 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -52,9 +52,9 @@ void Totem::Update( uint32 time ) Creature::Update( time ); } -void Totem::InitSummon(uint32 duration) +void Totem::InitStats(uint32 duration) { - Minion::InitSummon(duration); + Minion::InitStats(duration); CreatureInfo const *cinfo = GetCreatureInfo(); if (m_owner->GetTypeId()==TYPEID_PLAYER && cinfo) @@ -80,10 +80,6 @@ void Totem::InitSummon(uint32 duration) sLog.outErrorDb("Totem::Summon: Missing modelid information for entry %u, team %u, totem will use default values.",GetEntry(),((Player*)m_owner)->GetTeam()); } - WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8); - data << GetGUID(); - SendMessageToSet(&data,true); - // Get spell casted by totem SpellEntry const * totemSpell = sSpellStore.LookupEntry(GetSpell()); if (totemSpell) @@ -93,9 +89,6 @@ void Totem::InitSummon(uint32 duration) m_type = TOTEM_ACTIVE; } - if(m_type == TOTEM_PASSIVE) - CastSpell(this, GetSpell(), true); - if(GetEntry() == SENTRY_TOTEM_ENTRY) SetReactState(REACT_AGGRESSIVE); @@ -104,6 +97,16 @@ void Totem::InitSummon(uint32 duration) SetLevel(m_owner->getLevel()); } +void Totem::InitSummon() +{ + WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8); + data << GetGUID(); + SendMessageToSet(&data, true); + + if(m_type == TOTEM_PASSIVE) + CastSpell(this, GetSpell(), true); +} + void Totem::UnSummon() { SendObjectDeSpawnAnim(GetGUID()); |