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:
@@ -1777,18 +1777,18 @@ namespace Game.Spells
|
|||||||
|
|
||||||
if (dispelableAura.RollDispel())
|
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 true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (successItr == null)
|
if (successAura == null)
|
||||||
successList.Add(new DispelableAura(dispelableAura.GetAura(), 0, 1));
|
successList.Add(new DispelableAura(dispelableAura.GetAura(), 0, 1));
|
||||||
else
|
else
|
||||||
successItr.IncrementCharges();
|
successAura.IncrementCharges();
|
||||||
|
|
||||||
if (!dispelableAura.DecrementCharge())
|
if (!dispelableAura.DecrementCharge())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user