use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FifthItemActionMessageDecoder method decode.
@Override
public ItemActionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int slot = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int id = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
return new ItemActionMessage(5, interfaceId, id, slot);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FifthNpcActionMessageDecoder method decode.
@Override
public NpcActionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int index = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
return new NpcActionMessage(5, index);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FirstItemActionMessageDecoder method decode.
@Override
public ItemActionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int slot = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int id = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
return new ItemActionMessage(1, interfaceId, id, slot);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FirstNpcActionMessageDecoder method decode.
@Override
public NpcActionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int index = (int) reader.getSigned(DataType.SHORT, DataOrder.LITTLE);
return new NpcActionMessage(1, index);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class ArrowKeyMessageDecoder method decode.
@Override
public ArrowKeyMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int roll = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
int yaw = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
return new ArrowKeyMessage(roll, yaw);
}
Aggregations