Search in sources :

Example 1 with ArrowKeyMessage

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

the class ArrowKeyMessageDecoder method decode.

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

Example 2 with ArrowKeyMessage

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

the class ArrowKeyMessageDecoder method decode.

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

Aggregations

ArrowKeyMessage (org.apollo.game.message.impl.ArrowKeyMessage)2 GamePacketReader (org.apollo.net.codec.game.GamePacketReader)2