Skip to content

Commit 2c4548c

Browse files
committed
Fix parsing 3.3.5 SMSG_NOTIFY_DEST_LOC_SPELL_CAST
1 parent 0097620 commit 2c4548c

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

WowPacketParser/Parsing/Parsers/SpellHandler.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ public static void HandleNotifyDestLocSpellCast(Packet packet)
8484
packet.ReadSingle("MissileTrajectoryPitch");
8585
packet.ReadSingle("MissileTrajectorySpeed");
8686
packet.ReadUInt32("TravelTime");
87-
packet.AddValue("DestLocSpellCastIndex", packet.ReadInt32() & 0xFF);
88-
89-
if (packet.Length == 64) // packet always has length 64 length except for some rare exceptions with length 60 (hardcoded in the client)
90-
packet.ReadSingle("CastID");
87+
packet.ReadByte("DestLocSpellCastIndex");
88+
packet.ReadByte("CastID");
89+
90+
// alignment padding (to 8 bytes)
91+
packet.ReadUInt16();
92+
// client tries to read 64 bytes, server sends 60
93+
if (packet.Position + 4 < packet.Length)
94+
packet.ReadUInt32();
9195
}
9296

9397
[Parser(Opcode.SMSG_WEEKLY_SPELL_USAGE)]

0 commit comments

Comments
 (0)