summaryrefslogtreecommitdiff
path: root/NET/worlds/network/teleportCmd.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/network/teleportCmd.java')
-rw-r--r--NET/worlds/network/teleportCmd.java147
1 files changed, 147 insertions, 0 deletions
diff --git a/NET/worlds/network/teleportCmd.java b/NET/worlds/network/teleportCmd.java
new file mode 100644
index 0000000..d6fec64
--- /dev/null
+++ b/NET/worlds/network/teleportCmd.java
@@ -0,0 +1,147 @@
+/* */ package NET.worlds.network;
+/* */
+/* */ import NET.worlds.scape.Drone;
+/* */ import NET.worlds.scape.Room;
+/* */ import java.io.IOException;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class teleportCmd
+/* */ extends receivedNetPacket
+/* */ {
+/* */ public static final byte TELEPORTCMD = 18;
+/* */ protected int _roomID;
+/* */ protected byte _exittype;
+/* */ protected byte _entrytype;
+/* */ protected short _x;
+/* */ protected short _y;
+/* */ protected short _z;
+/* */ protected short _direction;
+/* */
+/* */ public teleportCmd()
+/* */ {
+/* 64 */ this._commandType = 18;
+/* */ }
+/* */
+/* */ public teleportCmd(Room room, byte exittype, byte entrytype, short x, short y, short z, short direction)
+/* */ {
+/* 69 */ super(null, 18);
+/* 70 */ this._roomID = 0;
+/* 71 */ if (room != null) {
+/* 72 */ this._roomID = room.getNetworkRoom().getRoomID();
+/* */ }
+/* 74 */ this._exittype = exittype;
+/* 75 */ this._entrytype = entrytype;
+/* 76 */ this._x = x;
+/* 77 */ this._y = y;
+/* 78 */ this._z = z;
+/* 79 */ this._direction = direction;
+/* */ }
+/* */
+/* */ void parseNetData(ServerInputStream data) throws IOException
+/* */ {
+/* 84 */ this._roomID = data.readUnsignedShort();
+/* 85 */ this._exittype = data.readByte();
+/* 86 */ this._entrytype = data.readByte();
+/* 87 */ this._x = data.readShort();
+/* 88 */ this._y = data.readShort();
+/* 89 */ this._z = data.readShort();
+/* 90 */ this._direction = data.readShort();
+/* */ }
+/* */
+/* */ void process(WorldServer _serv) throws Exception
+/* */ {
+/* 95 */ NetworkObject o = _serv.getObject(this._objID);
+/* 96 */ if (o == null) {
+/* 97 */ o = Drone.make(this._objID, _serv);
+/* */ }
+/* */
+/* 100 */ NetworkRoom netroom = _serv.getNetworkRoom(this._roomID);
+/* 101 */ Room newroom = null;
+/* 102 */ if (netroom != null) {
+/* 103 */ newroom = netroom.getRoom();
+/* */ }
+/* */
+/* */
+/* 107 */ this._direction = ((short)(90 - this._direction));
+/* */
+/* 109 */ this._direction = ((short)(360 - this._direction));
+/* 110 */ if ((o instanceof Drone)) {
+/* 111 */ ((Drone)o).teleport(_serv, this._exittype, this._entrytype, newroom, this._x, this._y,
+/* 112 */ this._z, this._direction);
+/* */ }
+/* */ }
+/* */
+/* */ int packetSize()
+/* */ {
+/* 118 */ return 12 + super.packetSize();
+/* */ }
+/* */
+/* */ void send(ServerOutputStream o) throws IOException
+/* */ {
+/* 123 */ super.send(o);
+/* */
+/* 125 */ o.writeShort(this._roomID);
+/* 126 */ o.writeByte(this._exittype);
+/* 127 */ o.writeByte(this._entrytype);
+/* 128 */ o.writeShort(this._x);
+/* 129 */ o.writeShort(this._y);
+/* 130 */ o.writeShort(this._z);
+/* 131 */ o.writeShort(this._direction);
+/* */ }
+/* */
+/* */
+/* */ public String toString(WorldServer serv)
+/* */ {
+/* 137 */ return
+/* */
+/* 139 */ "TELEPORT " + this._objID.toString(serv) + " <" + this._exittype + " >" + this._entrytype + " 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\teleportCmd.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file