/* */ package NET.worlds.network; /* */ /* */ import NET.worlds.scape.Drone; /* */ import java.io.IOException; /* */ import java.io.PrintStream; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class longLocCmd /* */ extends receivedNetPacket /* */ { /* */ public static final byte LONGLOCCMD = 1; /* */ protected short _x; /* */ protected short _y; /* */ protected short _z; /* */ protected short _dir; /* */ /* */ public longLocCmd() /* */ { /* 50 */ this._commandType = 1; /* */ } /* */ /* */ public longLocCmd(short x, short y, short z, short dir) { /* 54 */ super(null, 1); /* */ /* 56 */ this._x = x; /* 57 */ this._y = y; /* 58 */ this._z = z; /* 59 */ this._dir = dir; /* */ } /* */ /* */ void parseNetData(ServerInputStream data) throws IOException /* */ { /* 64 */ this._x = data.readShort(); /* 65 */ this._y = data.readShort(); /* 66 */ this._z = data.readShort(); /* 67 */ this._dir = data.readShort(); /* */ } /* */ /* */ int packetSize() /* */ { /* 72 */ return 8 + super.packetSize(); /* */ } /* */ /* */ void send(ServerOutputStream o) throws IOException /* */ { /* 77 */ super.send(o); /* 78 */ o.writeShort(this._x); /* 79 */ o.writeShort(this._y); /* 80 */ o.writeShort(this._z); /* 81 */ o.writeShort(this._dir); /* */ } /* */ /* */ void process(WorldServer _serv) throws Exception /* */ { /* 86 */ NetworkObject o = _serv.getObject(this._objID); /* 87 */ if ((o instanceof Drone)) { /* 88 */ this._dir = ((short)(90 - this._dir)); /* 89 */ this._dir = ((short)(360 - this._dir)); /* */ /* */ /* */ /* */ /* */ /* 95 */ ((Drone)o).longLoc(this._x, this._y, this._z, this._dir); /* */ } /* */ /* 98 */ if (o == null) { /* 99 */ System.out.println("error in message: " + toString(_serv)); /* */ } /* */ } /* */ /* */ /* */ /* */ public String toString(WorldServer serv) /* */ { /* 107 */ return /* 108 */ "LONGLOC " + this._objID.toString(serv) + " @ " + this._x + "," + this._y + "," + this._z + "," + this._dir; /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\longLocCmd.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */