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
+8 -5
View File
@@ -350,12 +350,15 @@ namespace Game.Spells
m_lastProcAttemptTime = (DateTime.Now - TimeSpan.FromSeconds(10));
m_lastProcSuccessTime = (DateTime.Now - TimeSpan.FromSeconds(120));
foreach (SpellPowerRecord power in m_spellInfo.PowerCosts)
if (power != null && (power.ManaPerSecond != 0 || power.PowerPctPerSecond > 0.0f))
m_periodicCosts.Add(power);
if (!m_spellInfo.HasAttribute(SpellAttr6.DoNotConsumeResources))
{
foreach (SpellPowerRecord power in m_spellInfo.PowerCosts)
if (power != null && (power.ManaPerSecond != 0 || power.PowerPctPerSecond > 0.0f))
m_periodicCosts.Add(power);
if (!m_periodicCosts.Empty())
m_timeCla = 1 * Time.InMilliseconds;
if (!m_periodicCosts.Empty())
m_timeCla = 1 * Time.InMilliseconds;
}
m_maxDuration = CalcMaxDuration(createInfo.Caster);
m_duration = m_maxDuration;