Search in sources :

Example 1 with PrivacyOptionMessage

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

the class PrivacyOptionMessageDecoder method decode.

@Override
public PrivacyOptionMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    int publicChatState = (int) reader.getUnsigned(DataType.BYTE);
    int privateChatState = (int) reader.getUnsigned(DataType.BYTE);
    int tradeChatState = (int) reader.getUnsigned(DataType.BYTE);
    return new PrivacyOptionMessage(publicChatState, privateChatState, tradeChatState);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) PrivacyOptionMessage(org.apollo.game.message.impl.PrivacyOptionMessage)

Example 2 with PrivacyOptionMessage

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

the class PrivacyOptionMessageDecoder method decode.

@Override
public PrivacyOptionMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    int publicChatState = (int) reader.getUnsigned(DataType.BYTE);
    int privateChatState = (int) reader.getUnsigned(DataType.BYTE);
    int tradeChatState = (int) reader.getUnsigned(DataType.BYTE);
    return new PrivacyOptionMessage(publicChatState, privateChatState, tradeChatState);
}
Also used : GamePacketReader(org.apollo.net.codec.game.GamePacketReader) PrivacyOptionMessage(org.apollo.game.message.impl.PrivacyOptionMessage)

Aggregations

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