Search in sources :

Example 1 with ReportAbuseMessage

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

the class ReportAbuseMessageDecoder method decode.

@Override
public ReportAbuseMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    String name = NameUtil.decodeBase37(reader.getSigned(DataType.LONG));
    int rule = (int) reader.getUnsigned(DataType.BYTE);
    boolean mute = reader.getUnsigned(DataType.BYTE) == 1;
    return new ReportAbuseMessage(name, rule, mute);
}
Also used : ReportAbuseMessage(org.apollo.game.message.impl.ReportAbuseMessage) GamePacketReader(org.apollo.net.codec.game.GamePacketReader)

Example 2 with ReportAbuseMessage

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

the class ReportAbuseMessageDecoder method decode.

@Override
public ReportAbuseMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    String name = NameUtil.decodeBase37(reader.getSigned(DataType.LONG));
    int rule = (int) reader.getUnsigned(DataType.BYTE);
    boolean mute = reader.getUnsigned(DataType.BYTE) == 1;
    return new ReportAbuseMessage(name, rule, mute);
}
Also used : ReportAbuseMessage(org.apollo.game.message.impl.ReportAbuseMessage) GamePacketReader(org.apollo.net.codec.game.GamePacketReader)

Aggregations

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