Core/Spells: Don't ignore power costs and reagents for spells triggered by SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_TRIGGER_MISSILE, SPELL_EFFECT_FORCE_CAST, SPELL_AURA_PERIODIC_TRIGGER_SPELL, SPELL_AURA_PROC_TRIGGER_SPELL and fixed implementation of SPELL_ATTR6_DO_NOT_CONSUME_RESOURCES
Port From (https://github.com/TrinityCore/TrinityCore/commit/54a83b4b689b7d2bbddb91fc79319dd806da8cc0)
This commit is contained in:
@@ -4716,7 +4716,7 @@ namespace Game.Spells
|
||||
if (unitCaster == null)
|
||||
return;
|
||||
|
||||
if (m_CastItem != null || m_triggeredByAuraSpell != null)
|
||||
if (m_CastItem != null || m_spellInfo.HasAttribute(SpellAttr6.DoNotConsumeResources))
|
||||
return;
|
||||
|
||||
//Don't take power if the spell is cast while .cheat power is enabled.
|
||||
@@ -4774,7 +4774,7 @@ namespace Game.Spells
|
||||
if (unitCaster == null)
|
||||
return;
|
||||
|
||||
if (m_CastItem != null || m_triggeredByAuraSpell != null)
|
||||
if (m_CastItem != null || m_spellInfo.HasAttribute(SpellAttr6.DoNotConsumeResources))
|
||||
return;
|
||||
|
||||
//Don't take power if the spell is cast while .cheat power is enabled.
|
||||
@@ -4868,7 +4868,7 @@ namespace Game.Spells
|
||||
return;
|
||||
|
||||
// do not take reagents for these item casts
|
||||
if (m_CastItem != null && m_CastItem.GetTemplate().HasFlag(ItemFlags.NoReagentCost))
|
||||
if ((m_CastItem != null && m_CastItem.GetTemplate().HasFlag(ItemFlags.NoReagentCost)) || m_spellInfo.HasAttribute(SpellAttr6.DoNotConsumeResources))
|
||||
return;
|
||||
|
||||
Player p_caster = m_caster.ToPlayer();
|
||||
|
||||
Reference in New Issue
Block a user