Search in sources :

Example 1 with ItemOptionMessage

use of org.apollo.game.message.impl.ItemOptionMessage in project apollo by apollo-rsps.

the class FourthItemOptionMessageDecoder method decode.

@Override
public ItemOptionMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    int interfaceId = (int) reader.getSigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
    int slot = (int) reader.getSigned(DataType.SHORT, DataOrder.LITTLE);
    int id = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
    return new ItemOptionMessage(4, interfaceId, id, slot);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) ItemOptionMessage(org.apollo.game.message.impl.ItemOptionMessage)

Example 2 with ItemOptionMessage

use of org.apollo.game.message.impl.ItemOptionMessage in project apollo by apollo-rsps.

the class SecondItemOptionMessageDecoder method decode.

@Override
public ItemOptionMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    int interfaceId = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
    int id = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
    int slot = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
    return new ItemOptionMessage(2, interfaceId, id, slot);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) ItemOptionMessage(org.apollo.game.message.impl.ItemOptionMessage)

Example 3 with ItemOptionMessage

use of org.apollo.game.message.impl.ItemOptionMessage in project apollo by apollo-rsps.

the class ThirdItemOptionMessageDecoder method decode.

@Override
public ItemOptionMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    int id = (int) reader.getUnsigned(DataType.SHORT, DataTransformation.ADD);
    int slot = (int) reader.getSigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
    int interfaceId = (int) reader.getSigned(DataType.SHORT, DataOrder.LITTLE, DataTransformation.ADD);
    return new ItemOptionMessage(3, interfaceId, id, slot);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) ItemOptionMessage(org.apollo.game.message.impl.ItemOptionMessage)

Example 4 with ItemOptionMessage

use of org.apollo.game.message.impl.ItemOptionMessage 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);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) ItemOptionMessage(org.apollo.game.message.impl.ItemOptionMessage)

Example 5 with ItemOptionMessage

use of org.apollo.game.message.impl.ItemOptionMessage 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);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) ItemOptionMessage(org.apollo.game.message.impl.ItemOptionMessage)

Aggregations

ItemOptionMessage (org.apollo.game.message.impl.ItemOptionMessage)10 GamePacketReader (org.apollo.net.codec.game.GamePacketReader)10