From c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 Feb 2026 22:33:32 -0800 Subject: Initial commit --- NET/worlds/network/SubscribeRoomCmd.java | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 NET/worlds/network/SubscribeRoomCmd.java (limited to 'NET/worlds/network/SubscribeRoomCmd.java') diff --git a/NET/worlds/network/SubscribeRoomCmd.java b/NET/worlds/network/SubscribeRoomCmd.java new file mode 100644 index 0000000..9eef4fc --- /dev/null +++ b/NET/worlds/network/SubscribeRoomCmd.java @@ -0,0 +1,42 @@ +package NET.worlds.network; + +import NET.worlds.scape.RoomSubscribeInfo; +import java.io.IOException; + +public class SubscribeRoomCmd extends netPacket { + public static final byte SUBSCRIBEROOMCMD = 22; + protected short _distance; + protected short _x; + protected short _y; + protected short _z; + protected short _roomNumber; + + public SubscribeRoomCmd(RoomSubscribeInfo info, int room) { + super(null, 22); + this._roomNumber = (short)room; + this._distance = (short)(info.d - 100.0F); + this._x = (short)info.x; + this._y = (short)info.y; + this._z = (short)info.z; + } + + @Override + int packetSize() { + return 10 + super.packetSize(); + } + + @Override + void send(ServerOutputStream o) throws IOException { + super.send(o); + o.writeShort(this._roomNumber); + o.writeShort(this._x); + o.writeShort(this._y); + o.writeShort(this._z); + o.writeShort(this._distance); + } + + @Override + public String toString(WorldServer serv) { + return "SUBSCRIB " + this._roomNumber + ": " + this._distance + "cm @ " + this._x + "," + this._y + "," + this._z; + } +} -- cgit v1.2.3