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, DataTransformation.ADD);
int id = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
int interfaceId = (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 AddIgnoreMessageDecoder method decode.
@Override
public AddIgnoreMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
String username = NameUtil.decodeBase37(reader.getSigned(DataType.LONG));
return new AddIgnoreMessage(username);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class EnteredAmountMessageDecoder method decode.
@Override
public EnteredAmountMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int amount = (int) reader.getUnsigned(DataType.INT);
return new EnteredAmountMessage(amount);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FifthItemOptionMessageDecoder method decode.
@Override
public ItemOptionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int slot = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
int id = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
return new ItemOptionMessage(5, interfaceId, id, slot);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FirstPlayerActionMessageDecoder method decode.
@Override
public PlayerActionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int index = (int) reader.getUnsigned(DataType.SHORT);
return new PlayerActionMessage(1, index);
}
Aggregations