2020-10-19 17:26:14 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Player.hpp"
|
|
|
|
#include "CNProtocol.hpp"
|
|
|
|
#include "CNStructs.hpp"
|
|
|
|
#include "CNShardServer.hpp"
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
namespace BuddyManager {
|
|
|
|
void init();
|
|
|
|
|
|
|
|
// Buddy requests
|
|
|
|
void requestBuddy(CNSocket* sock, CNPacketData* data);
|
2020-09-19 19:07:09 +00:00
|
|
|
void reqBuddyByName(CNSocket* sock, CNPacketData* data);
|
2020-10-05 00:03:13 +00:00
|
|
|
|
2020-10-19 17:26:14 +00:00
|
|
|
// Buddy accepting
|
2020-09-19 19:07:09 +00:00
|
|
|
void reqAcceptBuddy(CNSocket* sock, CNPacketData* data);
|
|
|
|
void reqFindNameBuddyAccept(CNSocket* sock, CNPacketData* data);
|
2020-10-05 00:03:13 +00:00
|
|
|
|
2020-10-19 17:26:14 +00:00
|
|
|
// Buddy Messaging
|
2020-09-19 19:07:09 +00:00
|
|
|
void reqBuddyFreechat(CNSocket* sock, CNPacketData* data);
|
|
|
|
void reqBuddyMenuchat(CNSocket* sock, CNPacketData* data);
|
2020-10-05 00:03:13 +00:00
|
|
|
|
2020-10-19 17:26:14 +00:00
|
|
|
// Getting buddy state
|
2020-09-19 19:07:09 +00:00
|
|
|
void reqPktGetBuddyState(CNSocket* sock, CNPacketData* data);
|
2020-10-05 00:03:13 +00:00
|
|
|
|
2020-10-19 17:26:14 +00:00
|
|
|
// Blocking/removing buddies
|
2020-09-21 18:28:04 +00:00
|
|
|
void reqBuddyBlock(CNSocket* sock, CNPacketData* data);
|
|
|
|
void reqBuddyDelete(CNSocket* sock, CNPacketData* data);
|
2020-09-22 17:02:00 +00:00
|
|
|
|
2020-10-19 17:26:14 +00:00
|
|
|
// Buddy warping
|
2020-09-22 17:02:00 +00:00
|
|
|
void reqBuddyWarp(CNSocket* sock, CNPacketData* data);
|
2020-10-19 17:26:14 +00:00
|
|
|
|
|
|
|
// helper methods
|
2020-10-27 15:28:37 +00:00
|
|
|
|
2020-10-19 17:26:14 +00:00
|
|
|
// Name checks
|
2020-10-27 15:28:37 +00:00
|
|
|
bool NameCheck(char16_t reqName[], char16_t resName[], int sizeOfReq, int sizeOfRes); // checks if the request and requested player's names match
|
2020-09-19 19:07:09 +00:00
|
|
|
}
|