Search in sources :

Example 1 with PlayerActionMessage

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

the class FifthPlayerActionMessageDecoder method decode.

@Override
public PlayerActionMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    int index = (int) reader.getUnsigned(DataType.SHORT, DataOrder.LITTLE);
    return new PlayerActionMessage(5, index);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) PlayerActionMessage(org.apollo.game.message.impl.PlayerActionMessage)

Example 2 with PlayerActionMessage

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

the class FourthPlayerActionMessageDecoder method decode.

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

Example 3 with PlayerActionMessage

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

the class ThirdPlayerActionMessageDecoder method decode.

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

Example 4 with PlayerActionMessage

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

the class FirstPlayerActionMessageDecoder method decode.

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

Example 5 with PlayerActionMessage

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

the class FourthPlayerActionMessageDecoder method decode.

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

Aggregations

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