aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/Totem.cpp3
-rw-r--r--src/game/Totem.h2
-rw-r--r--src/game/Unit.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index 4df48fa9147..b11146367b2 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -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()
diff --git a/src/game/Totem.h b/src/game/Totem.h
index 134ca6d6d3f..9975cd4deae 100644
--- a/src/game/Totem.h
+++ b/src/game/Totem.h
@@ -40,7 +40,7 @@ class Totem : public Minion
void InitStats(uint32 duration);
void InitSummon();
void UnSummon();
- uint32 GetSpell() const { return m_spells[0]; }
+ uint32 GetSpell(uint8 slot=0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
TotemType GetTotemType() const { return m_type; }
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index f0ac89d849e..fbd9698f494 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4213,7 +4213,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
Aur->_RemoveAura();
// Remove totem at next update if totem looses its aura
- if (GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem()&& ((TempSummon*)this)->GetSummonerGUID()==Aur->GetCasterGUID())
+ if (Aur->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem()&& ((TempSummon*)this)->GetSummonerGUID()==Aur->GetCasterGUID())
{
if (((Totem*)this)->GetSpell()==Aur->GetId() && ((Totem*)this)->GetTotemType()==TOTEM_PASSIVE)
((Totem*)this)->setDeathState(JUST_DIED);