Core/Spells: Implemented new proc hit type PROC_HIT_DISPEL
Port From (https://github.com/TrinityCore/TrinityCore/commit/206369934aecfcac9a49583f3f7e98f0d69ad55b)
This commit is contained in:
@@ -2638,7 +2638,8 @@ namespace Framework.Constants
|
||||
Reflect = 0x800,
|
||||
Interrupt = 0x1000,
|
||||
FullBlock = 0x2000,
|
||||
MaskAll = 0x0003FFF
|
||||
Dispel = 0x4000,
|
||||
MaskAll = 0x0007FFF
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
||||
@@ -1768,6 +1768,8 @@ namespace Game.Spells
|
||||
m_caster.SendMessageToSet(spellDispellLog, true);
|
||||
|
||||
CallScriptSuccessfulDispel(effectInfo.EffectIndex);
|
||||
|
||||
m_hitMask |= ProcFlagsHit.Dispel;
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.DualWield)]
|
||||
@@ -3836,11 +3838,16 @@ namespace Game.Spells
|
||||
dispel_list.Add(new KeyValuePair<uint, ObjectGuid>(aura.GetId(), aura.GetCasterGUID()));
|
||||
}
|
||||
|
||||
if (dispel_list.Empty())
|
||||
return;
|
||||
|
||||
while (!dispel_list.Empty())
|
||||
{
|
||||
unitTarget.RemoveAura(dispel_list[0].Key, dispel_list[0].Value, 0, AuraRemoveMode.EnemySpell);
|
||||
dispel_list.RemoveAt(0);
|
||||
}
|
||||
|
||||
m_hitMask |= ProcFlagsHit.Dispel;
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.ResurrectPet)]
|
||||
@@ -4376,6 +4383,8 @@ namespace Game.Spells
|
||||
spellDispellLog.DispellData.Add(dispellData);
|
||||
}
|
||||
m_caster.SendMessageToSet(spellDispellLog, true);
|
||||
|
||||
m_hitMask |= ProcFlagsHit.Dispel;
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.KillCredit)]
|
||||
|
||||
Reference in New Issue
Block a user