blob: 7960f1e2357d857d3a0f362846ddd70517050389 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
package NET.worlds.network;
import NET.worlds.scape.Drone;
import java.io.IOException;
public class appearActorCmd extends receivedNetPacket {
public static final byte APPEARACTORCMD = 12;
protected int _roomID;
protected short _x;
protected short _y;
protected short _z;
protected short _direction;
public appearActorCmd() {
this._commandType = 12;
}
@Override
void parseNetData(ServerInputStream data) throws IOException {
this._roomID = data.readUnsignedShort();
this._x = data.readShort();
this._y = data.readShort();
this._z = data.readShort();
this._direction = data.readShort();
}
@Override
void process(WorldServer _serv) throws Exception {
Drone d = Drone.make(this._objID, _serv);
this._direction = (short)(90 - this._direction);
this._direction = (short)(360 - this._direction);
NetworkRoom netroom = _serv.getNetworkRoom(this._roomID);
if (netroom != null) {
d.appear(netroom.getRoom(), this._x, this._y, this._z, this._direction);
}
}
@Override
public String toString(WorldServer serv) {
return "APPRACTR " + this._objID.toString(serv) + " in " + this._roomID + " @ " + this._x + "," + this._y + "," + this._z + "," + this._direction;
}
}
|