From 261dc41276f9f0310aea98c22e167a79374b9f7e Mon Sep 17 00:00:00 2001 From: shalzuth Date: Mon, 25 Jul 2022 21:46:18 -0700 Subject: [PATCH] remove damage share, hp sync --- LostArkLogger/Data/DamageModifierFlags.cs | 29 ++++++++++++++++++++++- LostArkLogger/Parser.cs | 12 ++++++---- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/LostArkLogger/Data/DamageModifierFlags.cs b/LostArkLogger/Data/DamageModifierFlags.cs index e5e3cd50..4a903b71 100644 --- a/LostArkLogger/Data/DamageModifierFlags.cs +++ b/LostArkLogger/Data/DamageModifierFlags.cs @@ -1,7 +1,7 @@ using System; namespace LostArkLogger { - [Flags] public enum DamageModifierFlags // 0b**FBKD*C with F: front attack, B: Back attack, K: bleed crit (dots ?), D: bleed not crit (dots ?), C: crit + [Flags] public enum DamageModifierFlags // to remove { None = 0, SkillCrit = 1, @@ -13,4 +13,31 @@ namespace LostArkLogger UnkModifier2 = 0x40, UnkModifier3 = 0x80 } + [Flags] public enum HitFlag : int + { + HIT_FLAG_NORMAL = 0, + HIT_FLAG_CRITICAL = 1, + HIT_FLAG_MISS = 2, + HIT_FLAG_INVINCIBLE = 3, + HIT_FLAG_DOT = 4, + HIT_FLAG_IMMUNE = 5, + HIT_FLAG_IMMUNE_SILENCED = 6, + HIT_FLAG_FONT_SILENCED = 7, + HIT_FLAG_DOT_CRITICAL = 8, + HIT_FLAG_DODGE = 9, + HIT_FLAG_REFLECT = 10, + HIT_FLAG_DAMAGE_SHARE = 11, + HIT_FLAG_DODGE_HIT = 12, + HIT_FLAG_MAX = 13, + HIT_OPTION_BACK_ATTACK = 1 << (0 + 4), + HIT_OPTION_FRONTAL_ATTACK = 1 << (1 + 4), + HIT_OPTION_FLANK_ATTACK = 1 << (2 + 4), + } + public enum HitOption : int + { + HIT_OPTION_BACK_ATTACK = 0, + HIT_OPTION_FRONTAL_ATTACK = 1, + HIT_OPTION_FLANK_ATTACK = 2, + HIT_OPTION_MAX = 3, + } } diff --git a/LostArkLogger/Parser.cs b/LostArkLogger/Parser.cs index 40312a8c..8b1f6f01 100644 --- a/LostArkLogger/Parser.cs +++ b/LostArkLogger/Parser.cs @@ -121,6 +121,8 @@ public void InstallListener() void ProcessDamageEvent(Entity sourceEntity, UInt32 skillId, UInt32 skillEffectId, SkillDamageEvent dmgEvent) { + if (((HitFlag)dmgEvent.Modifier & (HitFlag.HIT_FLAG_DAMAGE_SHARE)) > 0) + return; var skillName = Skill.GetSkillName(skillId, skillEffectId); var targetEntity = currentEncounter.Entities.GetOrAdd(dmgEvent.TargetId); var destinationName = targetEntity != null ? targetEntity.VisibleName : dmgEvent.TargetId.ToString("X"); @@ -135,11 +137,11 @@ void ProcessDamageEvent(Entity sourceEntity, UInt32 skillId, UInt32 skillEffectI SkillName = skillName, Damage = (ulong)dmgEvent.Damage, Crit = - ((DamageModifierFlags)dmgEvent.Modifier & - (DamageModifierFlags.DotCrit | - DamageModifierFlags.SkillCrit)) > 0, - BackAttack = ((DamageModifierFlags)dmgEvent.Modifier & (DamageModifierFlags.BackAttack)) > 0, - FrontAttack = ((DamageModifierFlags)dmgEvent.Modifier & (DamageModifierFlags.FrontAttack)) > 0 + ((HitFlag)dmgEvent.Modifier & + (HitFlag.HIT_FLAG_CRITICAL | + HitFlag.HIT_FLAG_DOT_CRITICAL)) > 0, + BackAttack = ((HitFlag)dmgEvent.Modifier & (HitFlag.HIT_OPTION_BACK_ATTACK)) > 0, + FrontAttack = ((HitFlag)dmgEvent.Modifier & (HitFlag.HIT_OPTION_FRONTAL_ATTACK)) > 0 }; onCombatEvent?.Invoke(log); currentEncounter.RaidInfos.Add(log);