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:
1 parent
892e54c79c
commit
ae70787843
4 files changed
+17
-2
No files matched your search
+10
-1
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user