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:
Hondacrx
2025-05-25 11:04:24 -04:00
parent 9b75d3255d
commit 486d80ceb9
5 changed files with 21 additions and 14 deletions
+3 -3
View File
@@ -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();