Search in sources :

Example 1 with ItemActionMessage

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

the class ThirdItemActionMessageDecoder method decode.

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

Example 2 with ItemActionMessage

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

the class ThirdItemActionMessageDecoder method decode.

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

Example 3 with ItemActionMessage

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

the class FourthItemActionMessageDecoder method decode.

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

Example 4 with ItemActionMessage

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

Example 5 with ItemActionMessage

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

Aggregations

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