Core/Auras: Implemented ProcFlags2
Port From (https://github.com/TrinityCore/TrinityCore/commit/7ff411013c9f6394161dbfdc07b3f3827b1de17f)
This commit is contained in:
@@ -797,8 +797,20 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!victim.IsCritter())
|
if (!victim.IsCritter())
|
||||||
|
{
|
||||||
ProcSkillsAndAuras(attacker, victim, new ProcFlagsInit(ProcFlags.Kill), new ProcFlagsInit(ProcFlags.Killed), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
|
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
|
// 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);
|
ProcSkillsAndAuras(victim, victim, new ProcFlagsInit(ProcFlags.None), new ProcFlagsInit(ProcFlags.Death), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
|
||||||
|
|
||||||
|
|||||||
@@ -2891,6 +2891,8 @@ namespace Game.Spells
|
|||||||
procAttacker = new ProcFlagsInit(IsPositive() ? ProcFlags.DoneSpellNoneDmgClassPos : ProcFlags.DoneSpellNoneDmgClassNeg);
|
procAttacker = new ProcFlagsInit(IsPositive() ? ProcFlags.DoneSpellNoneDmgClassPos : ProcFlags.DoneSpellNoneDmgClassNeg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
procAttacker.Or(ProcFlags2.CastSuccessful);
|
||||||
|
|
||||||
ProcFlagsHit hitMask = m_hitMask;
|
ProcFlagsHit hitMask = m_hitMask;
|
||||||
if (!hitMask.HasAnyFlag(ProcFlagsHit.Critical))
|
if (!hitMask.HasAnyFlag(ProcFlagsHit.Critical))
|
||||||
hitMask |= ProcFlagsHit.Normal;
|
hitMask |= ProcFlagsHit.Normal;
|
||||||
|
|||||||
@@ -3853,6 +3853,8 @@ namespace Game.Spells
|
|||||||
origin = new(m_caster.GetPosition());
|
origin = new(m_caster.GetPosition());
|
||||||
|
|
||||||
unitTarget.KnockbackFrom(origin, speedxy, speedz);
|
unitTarget.KnockbackFrom(origin, speedxy, speedz);
|
||||||
|
|
||||||
|
Unit.ProcSkillsAndAuras(GetUnitCasterForEffectHandlers(), unitTarget, new ProcFlagsInit(ProcFlags.None), new ProcFlagsInit(ProcFlags.None, ProcFlags2.Knockback), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.Hit, ProcFlagsHit.None, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[SpellEffectHandler(SpellEffectName.LeapBack)]
|
[SpellEffectHandler(SpellEffectName.LeapBack)]
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ namespace Scripts.Spells.Rogue
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Do not reproc deadly
|
// Do not reproc deadly
|
||||||
if (spellInfo.SpellFamilyFlags == new FlagArray128(0x10000, 0x80000, 0, 0))
|
if (spellInfo.SpellFamilyFlags & new FlagArray128(0x10000))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (spellInfo.IsPositive())
|
if (spellInfo.IsPositive())
|
||||||
|
|||||||
Reference in New Issue
Block a user