use of org.apollo.game.message.impl.TakeTileItemMessage in project apollo by apollo-rsps.
the class TakeTileItemMessageDecoder method decode.
@Override
public TakeTileItemMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int id = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
int x = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
int y = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
return new TakeTileItemMessage(id, new Position(x, y));
}
use of org.apollo.game.message.impl.TakeTileItemMessage in project apollo by apollo-rsps.
the class TakeTileItemMessageDecoder method decode.
@Override
public TakeTileItemMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int y = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
int id = (int) reader.getUnsigned(DataType.SHORT);
int x = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
return new TakeTileItemMessage(id, new Position(x, y));
}
Aggregations