Core/Auras: Proc flag updates

Port From (https://github.com/TrinityCore/TrinityCore/commit/02979daf761a5122efa7b8fa3e70509ecd69789e)
This commit is contained in:
hondacrx
2022-05-07 22:41:24 -04:00
parent 655a4f9857
commit f67434306f
10 changed files with 164 additions and 129 deletions
+6 -6
View File
@@ -798,7 +798,7 @@ 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);
ProcSkillsAndAuras(attacker, victim, new ProcFlagsInit(ProcFlags.Kill), new ProcFlagsInit(ProcFlags.Heartbeat), 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())
@@ -1053,12 +1053,12 @@ namespace Game.Entities
switch (attackType)
{
case WeaponAttackType.BaseAttack:
damageInfo.ProcAttacker = new ProcFlagsInit(ProcFlags.DoneMeleeAutoAttack | ProcFlags.DoneMainHandAttack);
damageInfo.ProcVictim = new ProcFlagsInit(ProcFlags.TakenMeleeAutoAttack);
damageInfo.ProcAttacker = new ProcFlagsInit(ProcFlags.DealMeleeSwing | ProcFlags.MainHandWeaponSwing);
damageInfo.ProcVictim = new ProcFlagsInit(ProcFlags.TakeMeleeSwing);
break;
case WeaponAttackType.OffAttack:
damageInfo.ProcAttacker = new ProcFlagsInit(ProcFlags.DoneMeleeAutoAttack | ProcFlags.DoneOffHandAttack);
damageInfo.ProcVictim = new ProcFlagsInit(ProcFlags.TakenMeleeAutoAttack);
damageInfo.ProcAttacker = new ProcFlagsInit(ProcFlags.DealMeleeSwing | ProcFlags.OffHandWeaponSwing);
damageInfo.ProcVictim = new ProcFlagsInit(ProcFlags.TakeMeleeSwing);
damageInfo.HitInfo = HitInfo.OffHand;
break;
default:
@@ -1197,7 +1197,7 @@ namespace Game.Entities
// Calculate absorb resist
if (damageInfo.Damage > 0)
{
damageInfo.ProcVictim.Or(ProcFlags.TakenDamage);
damageInfo.ProcVictim.Or(ProcFlags.TakeAnyDamage);
// Calculate absorb & resists
DamageInfo dmgInfo = new(damageInfo);
CalcAbsorbResist(dmgInfo);
+1 -1
View File
@@ -3513,7 +3513,7 @@ namespace Game.Entities
caster.SendSpellNonMeleeDamageLog(log);
// break 'Fear' and similar auras
ProcSkillsAndAuras(damageInfo.GetAttacker(), caster, new ProcFlagsInit(ProcFlags.None), new ProcFlagsInit(ProcFlags.TakenSpellMagicDmgClassNeg), ProcFlagsSpellType.Damage, ProcFlagsSpellPhase.Hit, ProcFlagsHit.None, null, damageInfo, null);
ProcSkillsAndAuras(damageInfo.GetAttacker(), caster, new ProcFlagsInit(ProcFlags.None), new ProcFlagsInit(ProcFlags.TakeHarmfulSpell), ProcFlagsSpellType.Damage, ProcFlagsSpellPhase.Hit, ProcFlagsHit.None, null, damageInfo, null);
}
}
}