diff options
author | KingPin <none@none> | 2009-03-07 07:47:02 -0500 |
---|---|---|
committer | KingPin <none@none> | 2009-03-07 07:47:02 -0500 |
commit | ae7078784366172e27d2fe0ac4b18345b628fd3f (patch) | |
tree | 0aef6d01833a36338cd7335bf617a374e8215e9e /src/game/Spell.cpp | |
parent | 892e54c79cfe4282818701561fbdd118232c85de (diff) |
Extend the spell_disabled table to have a seperate flag for pet spells from player spells, Patch by Koani
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 707f1819968..15cee611db0 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2048,7 +2048,7 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura) return; } - if(m_caster->GetTypeId() == TYPEID_PLAYER || (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isPet())) + if(m_caster->GetTypeId() == TYPEID_PLAYER) { if(objmgr.IsPlayerSpellDisabled(m_spellInfo->Id)) { @@ -2057,6 +2057,15 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura) return; } } + else if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isPet()) + { + if(objmgr.IsPetSpellDisabled(m_spellInfo->Id)) + { + SendCastResult(SPELL_FAILED_SPELL_UNAVAILABLE); + finish(false); + return; + } + } else { if(objmgr.IsCreatureSpellDisabled(m_spellInfo->Id)) |