/* */ 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 */