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.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index 67fa0281d91..d35ba9e30b9 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -57,9 +57,9 @@ void Totem::InitStats(uint32 duration)
Minion::InitStats(duration);
CreatureInfo const *cinfo = GetCreatureInfo();
- if (m_owner->GetTypeId()==TYPEID_PLAYER && cinfo)
+ if(m_owner->GetTypeId() == TYPEID_PLAYER && cinfo)
{
- uint32 display_id = objmgr.ChooseDisplayId(((Player*)m_owner)->GetTeam(),cinfo);
+ uint32 display_id = objmgr.ChooseDisplayId(((Player*)m_owner)->GetTeam(), cinfo);
CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@@ -91,6 +91,9 @@ void Totem::InitSummon()
if(m_type == TOTEM_PASSIVE)
CastSpell(this, GetSpell(), true);
+ // Some totems can have both instant effect and passive spell
+ if (GetSpell(1))
+ CastSpell(this, GetSpell(1), true);
}
void Totem::UnSummon()
@@ -129,13 +132,12 @@ void Totem::UnSummon()
}
}
- CleanupsBeforeDelete();
AddObjectToRemoveList();
}
bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const
{
- // TODO: possibly all negative auras immuned?
+ // TODO: possibly all negative auras immune?
switch(spellInfo->EffectApplyAuraName[index])
{
case SPELL_AURA_PERIODIC_DAMAGE:
@@ -148,4 +150,3 @@ bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) co
}
return Creature::IsImmunedToSpellEffect(spellInfo, index);
}
-