diff options
author | Liberate <tbaart@gmail.com> | 2011-10-19 14:00:59 +0200 |
---|---|---|
committer | Liberate <tbaart@gmail.com> | 2011-10-19 14:00:59 +0200 |
commit | d7e019072677dd098c491986ebe8c48259d20155 (patch) | |
tree | 1e054bda995d0aa9f3d50da1520ca95265dce4d5 | |
parent | b268b51d0ef991b73c140a680aebca582fc10e00 (diff) |
Core/Spells: Check to see if a totem has a passive aura. If so: Add the aura directly, if not: Cast the spell.
Fixes #3264
Fixes #3294
-rwxr-xr-x | src/server/game/Entities/Totem/Totem.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index 10c54720350..aaefa2badd6 100755 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -86,9 +86,15 @@ void Totem::InitStats(uint32 duration) void Totem::InitSummon() { - // use AddAura instead of CastSpell - this in fact should be an AddSpell equivalent for creatures, but nothing like that exists so far. if (m_type == TOTEM_PASSIVE) - AddAura(GetSpell(), this); + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(GetSpell()); + // use AddAura instead of CastSpell if it's a passive aura - this in fact should be an AddSpell equivalent for creatures, but nothing like that exists so far. + if (spellInfo->Attributes & SPELL_ATTR0_PASSIVE) + AddAura(spellInfo->Id, this); + else + CastSpell(this, spellInfo->Id, true); + } // Some totems can have both instant effect and passive spell if (GetSpell(1)) |