From c7a63abd39d311e871ca9967db6dcc59e8c2a2cf Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 28 Dec 2022 15:36:59 -0500 Subject: [PATCH] Core/Spells: Added custom spell cast arg Port From (https://github.com/TrinityCore/TrinityCore/commit/1c52c31274db5ba1b796eacb6ddd87309cc02333) --- Source/Game/Entities/Object/WorldObject.cs | 2 ++ Source/Game/Spells/Spell.cs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 0a5f0da59..c9c45d5d0 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -2428,6 +2428,8 @@ namespace Game.Entities } } + spell.m_customArg = args.CustomArg; + return spell.Prepare(targets.Targets, args.TriggeringAura); } diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index d09f1b149..bbb20d2b2 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -7968,6 +7968,7 @@ namespace Game.Spells public bool m_fromClient; public SpellCastFlagsEx m_castFlagsEx; public SpellMisc m_misc; + public object m_customArg; public SpellCastVisual m_SpellVisual; public SpellCastTargets m_targets; public sbyte m_comboPointGain; @@ -9202,6 +9203,7 @@ namespace Game.Spells public ObjectGuid OriginalCastId = ObjectGuid.Empty; public int? OriginalCastItemLevel; public Dictionary SpellValueOverrides = new(); + public object CustomArg; public CastSpellExtraArgs() { } @@ -9298,6 +9300,12 @@ namespace Game.Spells SpellValueOverrides.Add(mod, val); return this; } + + public CastSpellExtraArgs SetCustomArg(object customArg) + { + CustomArg = customArg; + return this; + } } public class SpellLogEffect