diff options
author | megamage <none@none> | 2009-05-06 13:34:11 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-06 13:34:11 -0500 |
commit | fa1dcd16cf8bc09cd0c0878020b59e7128e71d09 (patch) | |
tree | 46062e99b9b8494520351b83e8f71a8e77e2a818 /src/game/Totem.cpp | |
parent | 5d3a64517eff8db5781f299ece29a338b6e2f7a2 (diff) |
*Update summon system.
--HG--
branch : trunk
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()); |