40 std::string friendName, friendNote;
41 recvData >> friendName >> friendNote;
46 TC_LOG_DEBUG(
"network",
"WorldSession::HandleAddFriendOpcode: {} asked to add friend: {}",
50 if (!friendCharacterInfo)
56 auto processFriendRequest = [
this,
58 friendGuid = friendCharacterInfo->
Guid,
60 friendNote = std::move(friendNote)]()
90 processFriendRequest();
103 processFriendRequest();
109 [
this, continuation = std::move(processFriendRequest)](
uint32 friendSecurity)
111 if (!AccountMgr::IsPlayerAccount(friendSecurity))
113 sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_NOT_FOUND, ObjectGuid::Empty);
124 recvData >> friendGuid;
134 std::string ignoreName;
135 recvData >> ignoreName;
140 TC_LOG_DEBUG(
"network",
"WorldSession::HandleAddIgnoreOpcode: {} asked to Ignore: {}",
147 if (ignoreGuid ==
GetPlayer()->GetGUID())
149 else if (
GetPlayer()->GetSocial()->HasIgnore(ignoreGuid))
167 recvData >> ignoreGuid;
180 recvData >> guid >> note;
182 TC_LOG_DEBUG(
"network",
"WorldSession::HandleSetContactNotesOpcode: Contact: {}, Notes: {}", guid.
ToString(), note);
#define TC_LOG_DEBUG(filterType__,...)
bool normalizePlayerName(std::string &name)
Role Based Access Control related classes definition.
FriendsResult
Results of friend related commands.
@ FRIEND_IGNORE_NOT_FOUND
static bool IsPlayerAccount(uint32 gmlevel)
static QueryCallback GetSecurityAsync(uint32 accountId, int32 realmId, std::function< void(uint32)> callback)
T & AddCallback(T &&query)
static ObjectGuid const Empty
std::string ToString() const
static ObjectGuid GetGUID(Object const *o)
void SetFriendNote(ObjectGuid const &guid, std::string const ¬e)
bool HasFriend(ObjectGuid const &friendGuid)
void RemoveFromSocialList(ObjectGuid const &guid, SocialFlag flag)
void SendSocialList(Player *player, uint32 flags)
static uint32 TeamForRace(uint8 race)
bool IsVisibleGloballyFor(Player const *player) const
PlayerSocial * GetSocial()
void HandleDelIgnoreOpcode(WorldPacket &recvPacket)
Player * GetPlayer() const
void HandleDelFriendOpcode(WorldPacket &recvPacket)
void HandleContactListOpcode(WorldPacket &recvPacket)
QueryCallbackProcessor & GetQueryProcessor()
ObjectGuid::LowType m_GUIDLow
bool HasPermission(uint32 permissionId)
void HandleSetContactNotesOpcode(WorldPacket &recvPacket)
void HandleAddIgnoreOpcode(WorldPacket &recvPacket)
void HandleAddFriendOpcode(WorldPacket &recvPacket)
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
@ RBAC_PERM_ALLOW_GM_FRIEND
@ RBAC_PERM_TWO_SIDE_ADD_FRIEND