Core/Auras: Fixed SPELLVALUE_AURA_STACK adding incorrect number of stacks on aura refresh

Port From (https://github.com/TrinityCore/TrinityCore/commit/4c605ce621a137f32cf02527d48e36fed1b6e235)
This commit is contained in:
Hondacrx
2025-08-09 21:38:54 -04:00
parent 59cfc97e15
commit e48d7c9778
5 changed files with 13 additions and 16 deletions
+1 -9
View File
@@ -2354,21 +2354,13 @@ namespace Game.Spells
createInfo.SetCastItem(m_castItemGUID, m_castItemEntry, m_castItemLevel);
createInfo.SetPeriodicReset(resetPeriodicTimer);
createInfo.SetOwnerEffectMask(aura_effmask);
createInfo.SetStackAmount(m_spellValue.AuraStackAmount);
Aura aura = Aura.TryRefreshStackOrCreate(createInfo, false);
if (aura != null)
{
hitInfo.HitAura = aura.ToUnitAura();
// Set aura stack amount to desired value
if (m_spellValue.AuraStackAmount > 1)
{
if (!createInfo.IsRefresh)
hitInfo.HitAura.SetStackAmount((byte)m_spellValue.AuraStackAmount);
else
hitInfo.HitAura.ModStackAmount(m_spellValue.AuraStackAmount);
}
hitInfo.HitAura.SetDiminishGroup(hitInfo.DRGroup);
if (!m_spellValue.Duration.HasValue)