Fix new extensions compatibility with old G-Earth version

This commit is contained in:
UnfamiliarLegacy 2024-07-18 00:03:43 +02:00
parent 180144140e
commit e342470c7f

View File

@ -180,7 +180,7 @@ public abstract class Extension extends ExtensionBase {
}
else if (packet.headerId() == Outgoing.PacketIntercept.HEADER_ID) {
String stringifiedMessage = packet.readLongString();
HPacketFormat packetFormat = HPacketFormat.fromId(packet.readInteger());
HPacketFormat packetFormat = packet.isEOF() == 0 ? HPacketFormat.fromId(packet.readInteger()) : HPacketFormat.EVA_WIRE;
HMessage habboMessage = new HMessage(packetFormat, stringifiedMessage);
modifyMessage(habboMessage);