Core/Spells: Fixed SPELL_EFFECT_DISPEL when target has 2 spells with same ID

Port From (https://github.com/TrinityCore/TrinityCore/commit/24281a532365e287f45c679484c6c8d9340d9869)
This commit is contained in:
hondacrx
2022-01-04 17:58:26 -05:00
parent 021f342502
commit 45ec8fad69
+4 -4
View File
@@ -1777,18 +1777,18 @@ namespace Game.Spells
if (dispelableAura.RollDispel())
{
var successItr = successList.Find(dispelAura =>
var successAura = successList.Find(dispelAura =>
{
if (dispelAura.GetAura().GetId() == dispelableAura.GetAura().GetId())
if (dispelAura.GetAura().GetId() == dispelableAura.GetAura().GetId() && dispelAura.GetAura().GetCaster() == dispelableAura.GetAura().GetCaster())
return true;
return false;
});
if (successItr == null)
if (successAura == null)
successList.Add(new DispelableAura(dispelableAura.GetAura(), 0, 1));
else
successItr.IncrementCharges();
successAura.IncrementCharges();
if (!dispelableAura.DecrementCharge())
{