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 id = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT);
int slot = (int) reader.getUnsigned(DataType.SHORT);
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 FourthItemOptionMessageDecoder 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, DataTransformation.ADD);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT);
return new ItemOptionMessage(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);
}
Aggregations