Extend the spell_disabled table to have a seperate flag for pet spells from player spells, Patch by Koani

--HG--
branch : trunk
This commit is contained in:
KingPin
2009-03-07 07:47:02 -05:00
parent 892e54c79c
commit ae70787843
4 changed files with 17 additions and 2 deletions

View File

@@ -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))