35 TC_LOG_DEBUG(
"network",
"WorldSession::HandleContactListOpcode: Flags: {}", packet.
Flags);
44 TC_LOG_DEBUG(
"network",
"WorldSession::HandleAddFriendOpcode: {} asked to add friend: {}",
48 if (!friendCharacterInfo)
54 auto processFriendRequest = [
this,
56 friendGuid = friendCharacterInfo->
Guid,
57 friendAccountGuid = ObjectGuid::Create<HighGuid::WowAccount>(friendCharacterInfo->
AccountId),
59 friendNote = std::move(packet.
Notes)]()
89 processFriendRequest();
102 processFriendRequest();
108 [
this, continuation = std::move(processFriendRequest)](
uint32 friendSecurity)
110 if (!AccountMgr::IsPlayerAccount(friendSecurity))
112 sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_NOT_FOUND, ObjectGuid::Empty);
135 TC_LOG_DEBUG(
"network",
"WorldSession::HandleAddIgnoreOpcode: {} asked to Ignore: {}",
143 ignoreGuid = characterInfo->Guid;
144 ObjectGuid ignoreAccountGuid = ObjectGuid::Create<HighGuid::WowAccount>(characterInfo->AccountId);
145 if (ignoreGuid ==
GetPlayer()->GetGUID())
147 else if (
GetPlayer()->GetSocial()->HasIgnore(ignoreGuid, ignoreAccountGuid))
#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 Team TeamForRace(uint8 race)
PlayerSocial * GetSocial() const
bool IsVisibleGloballyFor(Player const *player) const
WorldPacket const * Write() override
void HandleDelFriendOpcode(WorldPackets::Social::DelFriend &packet)
std::string GetPlayerInfo() const
void HandleSetContactNotesOpcode(WorldPackets::Social::SetContactNotes &packet)
Player * GetPlayer() const
QueryCallbackProcessor & GetQueryProcessor()
ObjectGuid::LowType m_GUIDLow
bool HasPermission(uint32 permissionId)
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
void HandleAddIgnoreOpcode(WorldPackets::Social::AddIgnore &packet)
void HandleAddFriendOpcode(WorldPackets::Social::AddFriend &packet)
void HandleDelIgnoreOpcode(WorldPackets::Social::DelIgnore &packet)
void HandleContactListOpcode(WorldPackets::Social::SendContactList &packet)
void HandleSocialContractRequest(WorldPackets::Social::SocialContractRequest &socialContractRequest)
TC_GAME_API bool GetName(uint32 accountId, std::string &name)
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
@ RBAC_PERM_ALLOW_GM_FRIEND
@ RBAC_PERM_TWO_SIDE_ADD_FRIEND
Battlenet::RealmHandle Id