diff options
author | megamage <none@none> | 2009-03-08 11:36:10 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-08 11:36:10 -0600 |
commit | 985b7656bb8f7de1cb192410f2ee0495dd43ae91 (patch) | |
tree | ac10c887e7e80fe17956ee2ca0742c40f3d24389 /src/game/Spell.cpp | |
parent | 88c050182cd2628984a0282f66256913cecd188b (diff) | |
parent | 0f8dee432c4eb78b466744b9e3e13266c6be19d7 (diff) |
*Merge.
--HG--
branch : trunk
rename : sql/updates/XXX_characters_auctionhouse.sql => sql/updates/1164_characters.sql
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 6f98508fd1d..36b2ccf6d43 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2031,7 +2031,7 @@ void Spell::prepare(SpellCastTargets const* 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)) { @@ -2040,6 +2040,15 @@ void Spell::prepare(SpellCastTargets const* 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)) |