From 28a4f8588626e57065a437987e01ec58a0812187 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 13 Sep 2023 18:34:23 -0400 Subject: [PATCH] Core/Auras: Default procs with PROC_FLAG_2_CAST_SUCCESSFUL to CAST spell phase Port From (https://github.com/TrinityCore/TrinityCore/commit/5aaaf3f9166fe37fbe26c6643d10cd21d331fc8d) --- Source/Game/Spells/SpellManager.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Game/Spells/SpellManager.cs b/Source/Game/Spells/SpellManager.cs index bc318e352..f622218f3 100644 --- a/Source/Game/Spells/SpellManager.cs +++ b/Source/Game/Spells/SpellManager.cs @@ -1388,6 +1388,8 @@ namespace Game.Entities Log.outError(LogFilter.Sql, "`spell_proc` table entry for spellId {0} has wrong `SpellPhaseMask` set: {1}", spellInfo.Id, procEntry.SpellPhaseMask); if (procEntry.SpellPhaseMask != 0 && !procEntry.ProcFlags.HasFlag(ProcFlags.ReqSpellPhaseMask)) Log.outError(LogFilter.Sql, "`spell_proc` table entry for spellId {0} has `SpellPhaseMask` value defined, but it won't be used for defined `ProcFlags` value", spellInfo.Id); + if (procEntry.SpellPhaseMask == 0 && !procEntry.ProcFlags.HasFlag(ProcFlags.ReqSpellPhaseMask) && procEntry.ProcFlags.HasFlag(ProcFlags2.CastSuccessful)) + procEntry.SpellPhaseMask = ProcFlagsSpellPhase.Cast; // set default phase for PROC_FLAG_2_CAST_SUCCESSFUL if (Convert.ToBoolean(procEntry.HitMask & ~ProcFlagsHit.MaskAll)) Log.outError(LogFilter.Sql, "`spell_proc` table entry for spellId {0} has wrong `HitMask` set: {1}", spellInfo.Id, procEntry.HitMask); if (procEntry.HitMask != 0 && !(procEntry.ProcFlags.HasFlag(ProcFlags.TakenHitMask) || (procEntry.ProcFlags.HasFlag(ProcFlags.DoneHitMask) && (procEntry.SpellPhaseMask == 0 || Convert.ToBoolean(procEntry.SpellPhaseMask & (ProcFlagsSpellPhase.Hit | ProcFlagsSpellPhase.Finish))))))