Skip to content

Commit

Permalink
Added SMSG_SPELL_NON_MELEE_DAMAGE_LOG parser for 4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovahlord committed May 30, 2024
1 parent ab59f72 commit 3178aac
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions WowPacketParserModule.V4_4_0_54481/Parsers/CombatLogHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@ public static void ReadAttackRoundInfo(Packet packet, params object[] indexes)
ReadCombatLogContentTuning(packet, indexes, "ContentTuning");
}

public static void ReadContentTuningParams(Packet packet, params object[] idx)
{
packet.ResetBitReader();

packet.ReadUInt16("PlayerItemLevel", idx);
packet.ReadInt16("PlayerLevelDelta", idx);
packet.ReadUInt16("TargetItemLevel", idx);
packet.ReadByte("TargetLevel", idx);
packet.ReadByte("Expansion", idx);
packet.ReadByte("TargetMinScalingLevel", idx);
packet.ReadByte("TargetMaxScalingLevel", idx);
packet.ReadSByte("TargetScalingLevelDelta", idx);
packet.ReadBits("Type", 4, idx);
packet.ReadBit("ScalesWithItemLevel", idx);
}

[Parser(Opcode.SMSG_ATTACKER_STATE_UPDATE)]
public static void HandleAttackerStateUpdate(Packet packet)
{
Expand All @@ -91,5 +107,44 @@ public static void HandleAttackerStateUpdate(Packet packet)

ReadAttackRoundInfo(packet, "AttackRoundInfo");
}

[Parser(Opcode.SMSG_SPELL_NON_MELEE_DAMAGE_LOG)]
public static void HandleSpellNonMeleeDmgLog(Packet packet)
{
packet.ReadPackedGuid128("Me");
packet.ReadPackedGuid128("CasterGUID");
packet.ReadPackedGuid128("CastID");

packet.ReadInt32<SpellId>("SpellID");
packet.ReadInt32("SpellXSpellVisual");
packet.ReadInt32("Damage");
packet.ReadInt32("OriginalDamage");
packet.ReadInt32("OverKill");

packet.ReadByte("SchoolMask");

packet.ReadInt32("Absorbed");
packet.ReadInt32("Resisted");
packet.ReadInt32("ShieldBlock");

packet.ResetBitReader();

packet.ReadBit("Periodic");

packet.ReadBitsE<AttackerStateFlags>("Flags", 7);

var hasDebugData = packet.ReadBit("HasDebugData");
var hasLogData = packet.ReadBit("HasLogData");
var hasContentTuning = packet.ReadBit("HasContentTuning");

if (hasLogData)
V8_0_1_27101.Parsers.SpellHandler.ReadSpellCastLogData(packet, "SpellCastLogData");

if (hasDebugData)
V8_0_1_27101.Parsers.CombatLogHandler.ReadSpellNonMeleeDebugData(packet, "DebugData");

if (hasContentTuning)
ReadContentTuningParams(packet, "ContentTuning");
}
}
}

0 comments on commit 3178aac

Please sign in to comment.