Skip to content

Commit 4ad8d54

Browse files
committed
Add MoP Classic handlers for:
SMSG_AUTH_CHALLENGE CMSG_AUTH_CONTINUED_SESSION CMSG_AUTH_SESSION SMSG_ENTER_ENCRYPTED_MODE SMSG_SUSPEND_COMMS SMSG_CONNECT_TO SMSG_RESUME_COMMS SMSG_FAILED_PLAYER_CONDITION SMSG_PONG SMSG_MULTIPLE_PACKETS SMSG_DISPLAY_PLAYER_CHOICE SMSG_PLAYER_BOUND
1 parent bbce493 commit 4ad8d54

7 files changed

Lines changed: 416 additions & 3 deletions

File tree

WowPacketParser/Enums/Version/V5_5_0_61735/Opcodes.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ public static BiDictionary<Opcode, int> Opcodes(Direction direction)
10381038
{ Opcode.SMSG_COMMERCE_TOKEN_UPDATE, 0x3C0271 },
10391039
{ Opcode.SMSG_COMPLAINT_RESULT, 0x3C014A },
10401040
{ Opcode.SMSG_COMPLETE_SHIPMENT_RESPONSE, 0x3C023D },
1041-
{ Opcode.SMSG_COMPRESSED_PACKET, 0x43000A },
1041+
{ Opcode.SMSG_COMPRESSED_PACKET, 0x43000A }, // NYI
10421042
{ Opcode.SMSG_CONFIRM_BARBERS_CHOICE, 0x3C015C },
10431043
{ Opcode.SMSG_CONFIRM_PARTY_INVITE, 0x3C02B3 },
10441044
{ Opcode.SMSG_CONNECT_TO, 0x430005 },
@@ -1233,7 +1233,7 @@ public static BiDictionary<Opcode, int> Opcodes(Direction direction)
12331233
{ Opcode.SMSG_GET_VAS_ACCOUNT_CHARACTER_LIST_RESULT, 0x3C028E },
12341234
{ Opcode.SMSG_GET_VAS_TRANSFER_TARGET_REALM_LIST_RESULT, 0x3C028F },
12351235
{ Opcode.SMSG_GM_PLAYER_INFO, 0x4F000D },
1236-
{ Opcode.SMSG_GM_REQUEST_PLAYER_INFO, 0x4F0003 },
1236+
{ Opcode.SMSG_GM_REQUEST_PLAYER_INFO, 0x4F0003 }, // NYI
12371237
{ Opcode.SMSG_GM_TICKET_CASE_STATUS, 0x3C0142 },
12381238
{ Opcode.SMSG_GM_TICKET_SYSTEM_STATUS, 0x3C0141 },
12391239
{ Opcode.SMSG_GOD_MODE, 0x3C019B },
@@ -1753,7 +1753,7 @@ public static BiDictionary<Opcode, int> Opcodes(Direction direction)
17531753
{ Opcode.SMSG_REQUEST_PVP_BRAWL_INFO_RESPONSE, 0x420018 },
17541754
{ Opcode.SMSG_REQUEST_PVP_REWARDS_RESPONSE, 0x420017 },
17551755
{ Opcode.SMSG_REQUEST_SCHEDULED_PVP_INFO_RESPONSE, 0x420019 },
1756-
{ Opcode.SMSG_RESET_COMPRESSION_CONTEXT, 0x430007 },
1756+
{ Opcode.SMSG_RESET_COMPRESSION_CONTEXT, 0x430007 }, // NYI
17571757
{ Opcode.SMSG_RESET_FAILED_NOTIFY, 0x3C0156 },
17581758
{ Opcode.SMSG_RESET_QUEST_POI, 0x500020 },
17591759
{ Opcode.SMSG_RESET_RANGED_COMBAT_TIMER, 0x420027 },

WowPacketParserModule.Substructures/ItemHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ public static ItemInstance ReadItemInstance(Packet packet, params object[] index
232232
else
233233
return ReadItemInstance251(packet, indexes);
234234
}
235+
if (ClientVersion.IsMoPClassicClientVersionBuild(ClientVersion.Build))
236+
return ReadItemInstance441(packet, indexes);
235237
if (ClientVersion.AddedInVersion(ClientVersionBuild.V2_5_1_38835) &&
236238
(ClientVersion.IsBurningCrusadeClassicClientVersionBuild(ClientVersion.Build) ||
237239
ClientVersion.IsClassicSeasonOfMasteryClientVersionBuild(ClientVersion.Build)))
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
using WowPacketParser.Enums;
2+
using WowPacketParser.Misc;
3+
using WowPacketParser.Parsing;
4+
5+
namespace WowPacketParserModule.V5_5_0_61735.Parsers
6+
{
7+
public static class AuthenticationHandler
8+
{
9+
[Parser(Opcode.SMSG_AUTH_CHALLENGE)]
10+
public static void HandleServerAuthChallenge(Packet packet)
11+
{
12+
for (uint i = 0; i < 8; ++i)
13+
packet.ReadUInt32("DosChallenge", i);
14+
packet.ReadBytes("Challenge", 32);
15+
packet.ReadByte("DosZeroBits");
16+
}
17+
18+
[Parser(Opcode.CMSG_AUTH_CONTINUED_SESSION)]
19+
public static void HandleRedirectAuthProof(Packet packet)
20+
{
21+
packet.ReadInt64("DosResponse");
22+
packet.ReadInt64("Key");
23+
packet.ReadBytes("LocalChallenge", 32);
24+
packet.ReadBytes("Digest", 24);
25+
}
26+
27+
[Parser(Opcode.CMSG_AUTH_SESSION)]
28+
public static void HandleAuthSession(Packet packet)
29+
{
30+
packet.ReadUInt64("DosResponse");
31+
packet.ReadUInt32("RegionID");
32+
packet.ReadUInt32("BattlegroupID");
33+
packet.ReadUInt32("RealmID");
34+
packet.ReadBytes("LocalChallenge", 32);
35+
packet.ReadBytes("Digest", 24);
36+
packet.ReadBit("UseIPv6");
37+
38+
var realmJoinTicketSize = packet.ReadInt32();
39+
packet.ReadBytes("RealmJoinTicket", realmJoinTicketSize);
40+
}
41+
42+
[Parser(Opcode.SMSG_ENTER_ENCRYPTED_MODE)]
43+
public static void HandleEnterEncryptedMode(Packet packet)
44+
{
45+
packet.ReadInt32("RegionGroup");
46+
packet.ReadBytes("Signature (ED25519)", 64);
47+
packet.ReadBit("Enabled");
48+
}
49+
50+
[Parser(Opcode.SMSG_SUSPEND_COMMS)]
51+
public static void HandleSuspendCommsPackets(Packet packet)
52+
{
53+
packet.ReadInt32("Serial");
54+
}
55+
56+
[Parser(Opcode.SMSG_CONNECT_TO)]
57+
public static void HandleRedirectClient(Packet packet)
58+
{
59+
packet.ReadBytes("Where (RSA encrypted)", 256);
60+
61+
AddressType type = packet.ReadByteE<AddressType>("Type");
62+
switch (type)
63+
{
64+
case AddressType.IPv4:
65+
packet.ReadIPAddress("Address");
66+
break;
67+
case AddressType.IPv6:
68+
packet.ReadIPv6Address("Address");
69+
break;
70+
case AddressType.NamedSocket:
71+
packet.ReadWoWString("Address", 128);
72+
break;
73+
default:
74+
break;
75+
}
76+
77+
packet.ReadUInt16("Port");
78+
packet.ReadUInt32E<ConnectToSerial>("Serial");
79+
packet.ReadByte("Con");
80+
packet.ReadUInt64("Key");
81+
}
82+
83+
[Parser(Opcode.SMSG_RESUME_COMMS)]
84+
public static void HandleZeroLengthPackets(Packet packet)
85+
{
86+
}
87+
}
88+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using WowPacketParser.Enums;
2+
using WowPacketParser.Misc;
3+
using WowPacketParser.Parsing;
4+
5+
namespace WowPacketParserModule.V5_5_0_61735.Parsers
6+
{
7+
public static class CharacterHandler
8+
{
9+
[Parser(Opcode.SMSG_FAILED_PLAYER_CONDITION)]
10+
public static void HandleFailedPlayerCondition(Packet packet)
11+
{
12+
packet.ReadInt32("Id");
13+
}
14+
}
15+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using WowPacketParser.Enums;
2+
using WowPacketParser.Misc;
3+
using WowPacketParser.Parsing;
4+
5+
namespace WowPacketParserModule.V5_5_0_61735.Parsers
6+
{
7+
public static class MiscellaneousHandler
8+
{
9+
[Parser(Opcode.SMSG_PONG)]
10+
public static void HandleServerPong(Packet packet)
11+
{
12+
packet.ReadInt32("Serial");
13+
}
14+
15+
[Parser(Opcode.SMSG_MULTIPLE_PACKETS)]
16+
public static void HandleMultiplePackets(Packet packet)
17+
{
18+
packet.WriteLine("{");
19+
int i = 0;
20+
while (packet.CanRead())
21+
{
22+
int opcode = 0;
23+
int len = 0;
24+
byte[] bytes = null;
25+
26+
len = packet.ReadUInt16();
27+
opcode = packet.ReadUInt16();
28+
bytes = packet.ReadBytes(len);
29+
30+
if (bytes == null || len == 0)
31+
continue;
32+
33+
if (i > 0)
34+
packet.WriteLine();
35+
36+
packet.Write("[{0}] ", i++);
37+
38+
using (Packet newpacket = new Packet(bytes, opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName))
39+
Handler.Parse(newpacket, true);
40+
41+
}
42+
packet.WriteLine("}");
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)