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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user