Core/Auras: Implemented ProcFlags2

Port From (https://github.com/TrinityCore/TrinityCore/commit/7ff411013c9f6394161dbfdc07b3f3827b1de17f)
This commit is contained in:
hondacrx
2022-05-07 15:05:30 -04:00
parent cf15d538cc
commit e1e8027159
4 changed files with 18 additions and 2 deletions
+13 -1
View File
@@ -797,8 +797,20 @@ namespace Game.Entities
}
if (!victim.IsCritter())
{
ProcSkillsAndAuras(attacker, victim, new ProcFlagsInit(ProcFlags.Kill), new ProcFlagsInit(ProcFlags.Killed), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
if (player != null && player.GetGroup() != null)
{
for (GroupReference itr = player.GetGroup().GetFirstMember(); itr != null; itr = itr.Next())
{
Player member = itr.GetSource();
if (member != null)
if (member.IsAtGroupRewardDistance(victim))
Unit.ProcSkillsAndAuras(member, victim, new ProcFlagsInit(ProcFlags.None, ProcFlags2.TargetDies), new ProcFlagsInit(ProcFlags.None), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
}
}
}
// Proc auras on death - must be before aura/combat remove
ProcSkillsAndAuras(victim, victim, new ProcFlagsInit(ProcFlags.None), new ProcFlagsInit(ProcFlags.Death), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);