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)
This commit is contained in:
Hondacrx
2025-06-02 16:05:19 -04:00
parent bfbf96ac25
commit c496da9da0
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -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() public void SetNeedClientUpdate()
{ {
if (_needClientUpdate || GetRemoveMode() != AuraRemoveMode.None) if (_needClientUpdate || GetRemoveMode() != AuraRemoveMode.None)
+1 -1
View File
@@ -684,7 +684,7 @@ namespace Game.Spells
if (aurApp == null) if (aurApp == null)
aurApp = unitTarget._CreateAuraApplication(spellAura, 1u << (int)effectInfo.EffectIndex); aurApp = unitTarget._CreateAuraApplication(spellAura, 1u << (int)effectInfo.EffectIndex);
else else
aurApp.UpdateApplyEffectMask(aurApp.GetEffectsToApply() | 1u << (int)effectInfo.EffectIndex, false); aurApp.AddEffectToApplyEffectMask(effectInfo.EffectIndex);
} }
[SpellEffectHandler(SpellEffectName.UnlearnSpecialization)] [SpellEffectHandler(SpellEffectName.UnlearnSpecialization)]