Skip to content

Commit

Permalink
Whisper2 packet support
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAntares authored Sep 30, 2024
1 parent caa3dff commit f07ff3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Engine/MapEngine/PrivateMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ define(function( require )
return function PrivateMessageEngine()
{
Network.hookPacket( PACKET.ZC.WHISPER, onPrivateMessage );
Network.hookPacket( PACKET.ZC.WHISPER2, onPrivateMessage );
Network.hookPacket( PACKET.ZC.ACK_WHISPER, onPrivateMessageSent );
Network.hookPacket( PACKET.ZC.ACK_WHISPER2, onPrivateMessageSent );
};
Expand Down
3 changes: 2 additions & 1 deletion src/Network/PacketRegister.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ define( ['./PacketStructure' ], function( PACKET )
0x9db: PACKET.ZC.NOTIFY_MOVEENTRY8, // ok
0x9dc: PACKET.ZC.NOTIFY_STANDENTRY8, // ok
0x9dd: PACKET.ZC.NOTIFY_NEWENTRY8, // ok
0x9df: PACKET.ZC.ACK_WHISPER2,
0x9de: PACKET.ZC.WHISPER2, // ok
0x9df: PACKET.ZC.ACK_WHISPER2, // ok
0x9e5: PACKET.ZC.DELETEITEM_FROM_MCSTORE2,
0x9e7: PACKET.ZC.RODEX_ICON, // ok
0x9e8: PACKET.CZ.OPEN_RODEXBOX, // ok
Expand Down
9 changes: 9 additions & 0 deletions src/Network/PacketStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -5116,6 +5116,15 @@ define(['Utils/BinaryWriter', './PacketVerManager', 'Utils/Struct', 'Core/Config
this.msg = fp.readString(end - fp.tell());
};
PACKET.ZC.WHISPER.size = -1;

// 0x9de
PACKET.ZC.WHISPER2 = function PACKET_ZC_WHISPER2(fp, end) {
this.senderGID = fp.readULong();
this.sender = fp.readString(NAME_LENGTH);
this.isAdmin = fp.readUByte();
this.msg = fp.readString(end - fp.tell());
};
PACKET.ZC.WHISPER2.size = -1;


// 0x98
Expand Down

0 comments on commit f07ff3e

Please sign in to comment.