Search in sources :

Example 1 with MagicOnNpcMessage

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

the class MagicOnNpcMessageDecoder method decode.

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

Example 2 with MagicOnNpcMessage

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

the class MagicOnNpcMessageDecoder method decode.

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

Aggregations

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