Search in sources :

Example 1 with NpcActionMessage

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

the class SecondNpcActionMessageDecoder method decode.

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

Example 2 with NpcActionMessage

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

the class ThirdNpcActionMessageDecoder method decode.

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

Example 3 with NpcActionMessage

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

the class FourthNpcActionMessageDecoder method decode.

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

Example 4 with NpcActionMessage

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

the class FifthNpcActionMessageDecoder method decode.

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

Example 5 with NpcActionMessage

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

the class FirstNpcActionMessageDecoder method decode.

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

Aggregations

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