mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
*Allow totems to cast spell2 from DB instantnly when put down
--HG-- branch : trunk
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user