package NET.worlds.network; import NET.worlds.scape.Drone; import java.io.IOException; public class shortLocCmd extends receivedNetPacket { public static final byte SHORTLOCCMD = 4; protected byte _dx; protected byte _dy; protected byte _ddirection; public shortLocCmd() { this._commandType = 4; } @Override void parseNetData(ServerInputStream data) throws IOException { this._dx = data.readByte(); this._dy = data.readByte(); this._ddirection = data.readByte(); } @Override void process(WorldServer _serv) throws Exception { NetworkObject o = _serv.getObject(this._objID); if (o == null) { System.out.println("Unknown short id: " + this.toString(_serv)); new Exception().printStackTrace(System.out); } else { if (o instanceof Drone) { ((Drone)o).shortLoc(this._dx, this._dy, this._ddirection); } } } @Override public String toString(WorldServer serv) { return "SHORTLOC " + this._objID.toString(serv) + " delta=" + this._dx + "," + this._dy + "," + this._ddirection; } @Override public String toString() { return "SHORTLOC " + this._objID + " delta=" + this._dx + "," + this._dy + "," + this._ddirection; } }