Search in sources :

Example 1 with AddFriendMessage

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

the class AddFriendMessageDecoder method decode.

@Override
public AddFriendMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    String username = NameUtil.decodeBase37(reader.getSigned(DataType.LONG));
    return new AddFriendMessage(username);
}
Also used : AddFriendMessage(org.apollo.game.message.impl.AddFriendMessage) GamePacketReader(org.apollo.net.codec.game.GamePacketReader)

Example 2 with AddFriendMessage

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

the class AddFriendMessageDecoder method decode.

@Override
public AddFriendMessage decode(GamePacket packet) {
    GamePacketReader reader = new GamePacketReader(packet);
    String username = NameUtil.decodeBase37(reader.getSigned(DataType.LONG));
    return new AddFriendMessage(username);
}
Also used : AddFriendMessage(org.apollo.game.message.impl.AddFriendMessage) GamePacketReader(org.apollo.net.codec.game.GamePacketReader)

Aggregations

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