Core/Spells: Implemented new trigger flag to cause spells to be instant without also causing other behavior of TRIGGERED_CAST_DIRECTLY (skipping SMSG_SPELL_START, skipping starting GCD)

Port From (https://github.com/TrinityCore/TrinityCore/commit/a885a1fc3c6b894f546b7aee70b5a67932a94486)
This commit is contained in:
Hondacrx
2024-08-26 18:11:28 -04:00
parent 585949a9cf
commit b38668c7cb
4 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -2630,7 +2630,9 @@ namespace Game.Spells
// Prepare data for triggers
PrepareDataForTriggerSystem();
m_casttime = CallScriptCalcCastTimeHandlers(m_spellInfo.CalcCastTime(this));
if (!_triggeredCastFlags.HasFlag(TriggerCastFlags.IgnoreCastTime))
m_casttime = m_spellInfo.CalcCastTime(this);
m_casttime = CallScriptCalcCastTimeHandlers(m_casttime);
SpellCastResult movementResult = SpellCastResult.SpellCastOk;
if (m_caster.IsUnit() && m_caster.ToUnit().IsMoving())