Search in sources :

Example 6 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, DataTransformation.ADD);
    return new PlayerActionMessage(5, index);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) PlayerActionMessage(org.apollo.game.message.impl.PlayerActionMessage)

Example 7 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);
    return new PlayerActionMessage(1, index);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) PlayerActionMessage(org.apollo.game.message.impl.PlayerActionMessage)

Example 8 with PlayerActionMessage

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

the class SecondPlayerActionMessageDecoder method decode.

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

Example 9 with PlayerActionMessage

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

the class SecondPlayerActionMessageDecoder 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(2, index);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) PlayerActionMessage(org.apollo.game.message.impl.PlayerActionMessage)

Example 10 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)

Aggregations

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