use of org.apollo.game.message.impl.ItemOnNpcMessage in project apollo by apollo-rsps.
the class ItemOnNpcMessageDecoder method decode.
@Override
public ItemOnNpcMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int index = (int) reader.getUnsigned(DataType.SHORT);
int id = (int) reader.getSigned(DataType.SHORT, DataOrder.LITTLE);
int widget = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
int slot = (int) reader.getUnsigned(DataType.SHORT);
return new ItemOnNpcMessage(id, index, slot, widget);
}
use of org.apollo.game.message.impl.ItemOnNpcMessage in project apollo by apollo-rsps.
the class ItemOnNpcMessageDecoder method decode.
@Override
public ItemOnNpcMessage decode(GamePacket packet) {
GamePacketReader reader = new GamePacketReader(packet);
int id = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int index = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
int slot = (int) reader.getSigned(DataType.SHORT, DataOrder.LITTLE);
int interfaceId = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
return new ItemOnNpcMessage(id, index, slot, interfaceId);
}
Aggregations