mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
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:
@@ -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