Core/Spells: OnPrecast script should be called before ReSetTimer

Port From (https://github.com/TrinityCore/TrinityCore/commit/47086f9e6942157a1d877aa7f598b27d30273812)
This commit is contained in:
hondacrx
2022-07-29 17:25:08 -04:00
parent 114747fc4b
commit 9012e7560d
+2 -2
View File
@@ -2540,11 +2540,11 @@ namespace Game.Spells
m_caster.ToCreature().SetSpellFocus(this, null);
}
CallScriptOnPrecastHandler();
// set timer base at cast time
ReSetTimer();
CallScriptOnPrecastHandler();
Log.outDebug(LogFilter.Spells, "Spell.prepare: spell id {0} source {1} caster {2} customCastFlags {3} mask {4}", m_spellInfo.Id, m_caster.GetEntry(), m_originalCaster != null ? (int)m_originalCaster.GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
if (m_spellInfo.HasAttribute(SpellAttr12.StartCooldownOnCastStart))