Search in sources :

Example 1 with MagicOnPlayerMessage

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

the class MagicOnPlayerMessageDecoder method decode.

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

Example 2 with MagicOnPlayerMessage

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

the class MagicOnPlayerMessageDecoder method decode.

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

Aggregations

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