From c496da9da0f1e79a2a62f1690654b3cf73d1b105 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Mon, 2 Jun 2025 16:05:19 -0400 Subject: [PATCH] Core/Auras: Fixed sending amounts for effects that need it, aren't first and don't have SPELL_ATTR8_AURA_POINTS_ON_CLIENT Port From (https://github.com/TrinityCore/TrinityCore/commit/0a1b81043eaae0e0feba2b693e1f004ac4791c30) --- Source/Game/Spells/Auras/Aura.cs | 10 ++++++++++ Source/Game/Spells/SpellEffects.cs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index 3c6ca0ae2..fa13045f9 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -209,6 +209,16 @@ namespace Game.Spells } } + public void AddEffectToApplyEffectMask(uint spellEffectIndex) + { + if ((_effectsToApply & (1 << (int)spellEffectIndex)) != 0) + return; + + _effectsToApply |= 1u << (int)spellEffectIndex; + if (Aura.EffectTypeNeedsSendingAmount(GetBase().GetEffect(spellEffectIndex).GetAuraType())) + _flags |= AuraFlags.Scalable; + } + public void SetNeedClientUpdate() { if (_needClientUpdate || GetRemoveMode() != AuraRemoveMode.None) diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 514177a29..488ce99be 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -684,7 +684,7 @@ namespace Game.Spells if (aurApp == null) aurApp = unitTarget._CreateAuraApplication(spellAura, 1u << (int)effectInfo.EffectIndex); else - aurApp.UpdateApplyEffectMask(aurApp.GetEffectsToApply() | 1u << (int)effectInfo.EffectIndex, false); + aurApp.AddEffectToApplyEffectMask(effectInfo.EffectIndex); } [SpellEffectHandler(SpellEffectName.UnlearnSpecialization)]