diff options
author | thenecromancer <none@none> | 2009-07-05 17:29:28 +0200 |
---|---|---|
committer | thenecromancer <none@none> | 2009-07-05 17:29:28 +0200 |
commit | ea7ac26e72c0a5aefef651a14852de2bfe6342df (patch) | |
tree | db50d2b8a5c70142c24f34da155d482217518fd6 | |
parent | 67f8ec608c09b039f96dd321f83a18da31f453af (diff) |
*Allow totems to cast spell2 from DB instantnly when put down
--HG--
branch : trunk
-rw-r--r-- | src/game/Totem.cpp | 3 | ||||
-rw-r--r-- | src/game/Totem.h | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 |
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); |