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
+3 -2
View File
@@ -3245,6 +3245,7 @@ namespace Game.Entities
AuraCreateInfo createInfo = new(aura.GetCastId(), aura.GetSpellInfo(), aura.GetCastDifficulty(), effMask, stealer);
createInfo.SetCasterGUID(aura.GetCasterGUID());
createInfo.SetBaseAmount(baseDamage);
createInfo.SetStackAmount(stolenCharges);
Aura newAura = Aura.TryRefreshStackOrCreate(createInfo);
if (newAura != null)
@@ -3258,7 +3259,7 @@ namespace Game.Entities
caster.GetSingleCastAuras().Add(aura);
}
// FIXME: using aura.GetMaxDuration() maybe not blizzlike but it fixes stealing of spells like Innervate
newAura.SetLoadedState(aura.GetMaxDuration(), (int)dur, stealCharge ? stolenCharges : aura.GetCharges(), (byte)stolenCharges, recalculateMask, damage);
newAura.SetLoadedState(aura.GetMaxDuration(), (int)dur, stealCharge ? stolenCharges : aura.GetCharges(), recalculateMask, damage);
newAura.ApplyForTargets();
}
}
@@ -4262,7 +4263,7 @@ namespace Game.Entities
}
// try to increase stack amount
foundAura.ModStackAmount(1, AuraRemoveMode.Default, createInfo.ResetPeriodicTimer);
foundAura.ModStackAmount(createInfo.StackAmount, AuraRemoveMode.Default, createInfo.ResetPeriodicTimer);
return foundAura;
}
}