use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FocusUpdateMessageDecoder method decode.
@Override
public FocusUpdateMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
boolean focused = (byte) reader.getUnsigned(DataType.BYTE) == 1;
return new FocusUpdateMessage(focused);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FourthItemActionMessageDecoder method decode.
@Override
public ItemActionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int slot = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT);
int id = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
return new ItemActionMessage(4, interfaceId, id, slot);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class FourthNpcActionMessageDecoder method decode.
@Override
public NpcActionMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int index = (int) reader.getUnsigned(DataType.SHORT);
return new NpcActionMessage(4, index);
}
use of org.apollo.net.codec.game.GamePacketReader in project apollo by apollo-rsps.
the class DialogueContinueMessageDecoder method decode.
@Override
public DialogueContinueMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT);
return new DialogueContinueMessage(interfaceId);
}
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 id = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT);
int slot = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
return new ItemOptionMessage(5, interfaceId, id, slot);
}
Aggregations