From a964b9c7f8d63f73811950787a8bdefc53c06bbc Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sat, 31 Aug 2024 17:41:27 -0400 Subject: [PATCH] Core/Spells: Implemented caster-is-moving aoe radius bonus and SPELL_ATTR9_NO_MOVEMENT_RADIUS_BONUS Port From (https://github.com/TrinityCore/TrinityCore/commit/321f3cc4a7a59874c73ab82d57c2f1c76a820396) --- Source/Framework/Constants/Spells/SpellConst.cs | 4 ++-- Source/Game/Spells/SpellInfo.cs | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 25e18ffe0..302754d0c 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1995,8 +1995,8 @@ namespace Framework.Constants ItemPassiveOnClient = 0x4000000, // Item Passive On Client ForceCorpseTarget = 0x8000000, // Causes the spell to continue executing effects on the target even if one of them kills it CannotKillTarget = 0x10000000, // Cannot Kill Target - Unk29 = 0x20000000, // 29 - Unk30 = 0x40000000, // 30 + LogPassive = 0x20000000, // Allows passive auras to trigger aura applied/refreshed/removed combat log events + NoMovementRadiusBonus = 0x40000000, // No Movement Radius Bonus Unk31 = 0x80000000 // 31 } public enum SpellAttr10 : uint diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index 6f18449e9..c9c28ebea 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -4273,6 +4273,10 @@ namespace Game.Spells Player modOwner = caster.GetSpellModOwner(); if (modOwner != null) modOwner.ApplySpellMod(_spellInfo, SpellModOp.Radius, ref radius, spell); + + if (!_spellInfo.HasAttribute(SpellAttr9.NoMovementRadiusBonus)) + if (casterUnit != null && casterUnit.IsMoving() && !casterUnit.IsWalking()) + radius += 2.0f; } return radius;