diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/network/roomChangeCmd.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/network/roomChangeCmd.java')
| -rw-r--r-- | NET/worlds/network/roomChangeCmd.java | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/NET/worlds/network/roomChangeCmd.java b/NET/worlds/network/roomChangeCmd.java new file mode 100644 index 0000000..7aaa490 --- /dev/null +++ b/NET/worlds/network/roomChangeCmd.java @@ -0,0 +1,127 @@ +/* */ package NET.worlds.network; +/* */ +/* */ import NET.worlds.scape.Drone; +/* */ import NET.worlds.scape.Room; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class roomChangeCmd +/* */ extends receivedNetPacket +/* */ { +/* */ public static final byte ROOMCHNGCMD = 5; +/* */ protected int _roomID; +/* */ protected short _x; +/* */ protected short _y; +/* */ protected short _z; +/* */ protected short _direction; +/* */ +/* */ public roomChangeCmd() +/* */ { +/* 58 */ this._commandType = 5; +/* */ } +/* */ +/* */ public roomChangeCmd(Room room, short x, short y, short z, short direction) { +/* 62 */ super(null, 5); +/* 63 */ this._roomID = room.getNetworkRoom().getRoomID(); +/* 64 */ assert (this._roomID != 0); +/* 65 */ this._x = x; +/* 66 */ this._y = y; +/* 67 */ this._z = z; +/* 68 */ this._direction = direction; +/* */ } +/* */ +/* */ void parseNetData(ServerInputStream data) throws IOException +/* */ { +/* 73 */ this._roomID = data.readUnsignedShort(); +/* 74 */ this._x = data.readShort(); +/* 75 */ this._y = data.readShort(); +/* 76 */ this._z = data.readShort(); +/* 77 */ this._direction = data.readShort(); +/* */ } +/* */ +/* */ int packetSize() +/* */ { +/* 82 */ return 10 + super.packetSize(); +/* */ } +/* */ +/* */ void send(ServerOutputStream o) throws IOException +/* */ { +/* 87 */ super.send(o); +/* 88 */ o.writeShort(this._roomID); +/* 89 */ o.writeShort(this._x); +/* 90 */ o.writeShort(this._y); +/* 91 */ o.writeShort(this._z); +/* 92 */ o.writeShort(this._direction); +/* */ } +/* */ +/* */ void process(WorldServer _serv) throws Exception +/* */ { +/* 97 */ NetworkObject o = _serv.getObject(this._objID); +/* 98 */ if ((o instanceof Drone)) { +/* 99 */ assert (this._roomID != 0); +/* 100 */ Room newroom = null; +/* 101 */ NetworkRoom netroom = _serv.getNetworkRoom(this._roomID); +/* 102 */ if (netroom != null) { +/* 103 */ newroom = netroom.getRoom(); +/* */ } +/* */ +/* 106 */ this._direction = ((short)(90 - this._direction)); +/* */ +/* 108 */ this._direction = ((short)(360 - this._direction)); +/* */ +/* */ +/* 111 */ ((Drone)o).roomChange(newroom, this._x, this._y, this._z, this._direction); +/* */ } +/* */ } +/* */ +/* */ +/* */ public String toString(WorldServer serv) +/* */ { +/* 118 */ return +/* 119 */ "ROOMCHNG " + this._objID.toString(serv) + " in " + this._roomID + " @ " + this._x + "," + this._y + "," + this._z + "," + this._direction; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\roomChangeCmd.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |