![]() |
TrinityCore
|
#include <SocialMgr.h>
Public Member Functions | |
| PlayerSocial () | |
| PlayerSocial (PlayerSocial const &) | |
| PlayerSocial (PlayerSocial &&) noexcept | |
| PlayerSocial & | operator= (PlayerSocial const &) |
| PlayerSocial & | operator= (PlayerSocial &&) noexcept |
| ~PlayerSocial () | |
| bool | AddToSocialList (ObjectGuid const &guid, ObjectGuid const &accountGuid, SocialFlag flag) |
| void | RemoveFromSocialList (ObjectGuid const &guid, SocialFlag flag) |
| void | SetFriendNote (ObjectGuid const &guid, std::string const ¬e) |
| void | SendSocialList (Player *player, uint32 flags) |
| bool | HasFriend (ObjectGuid const &friendGuid) |
| bool | HasIgnore (ObjectGuid const &ignoreGuid, ObjectGuid const &ignoreAccountGuid) |
| ObjectGuid const & | GetPlayerGUID () const |
| void | SetPlayerGUID (ObjectGuid const &guid) |
| uint32 | GetNumberOfSocialsWithFlag (SocialFlag flag) |
Private Types | |
| typedef std::map< ObjectGuid, FriendInfo > | PlayerSocialMap |
Private Member Functions | |
| bool | _HasContact (ObjectGuid const &guid, SocialFlag flags) |
Private Attributes | |
| PlayerSocialMap | _playerSocialMap |
| GuidUnorderedSet | _ignoredAccounts |
| ObjectGuid | _playerGUID |
Friends | |
| class | SocialMgr |
Definition at line 103 of file SocialMgr.h.
|
private |
Definition at line 135 of file SocialMgr.h.
|
default |
|
default |
|
defaultnoexcept |
|
default |
|
private |
Definition at line 192 of file SocialMgr.cpp.
References _playerSocialMap, and flags.
Referenced by HasFriend(), and HasIgnore().
| bool PlayerSocial::AddToSocialList | ( | ObjectGuid const & | guid, |
| ObjectGuid const & | accountGuid, | ||
| SocialFlag | flag | ||
| ) |
Definition at line 44 of file SocialMgr.cpp.
References _ignoredAccounts, _playerSocialMap, CHAR_INS_CHARACTER_SOCIAL, CHAR_UPD_CHARACTER_SOCIAL_FLAGS, CharacterDatabase, ObjectGuid::GetCounter(), GetNumberOfSocialsWithFlag(), GetPlayerGUID(), PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), SOCIAL_FLAG_FRIEND, SOCIAL_FLAG_IGNORED, SOCIALMGR_FRIEND_LIMIT, and SOCIALMGR_IGNORE_LIMIT.
| uint32 PlayerSocial::GetNumberOfSocialsWithFlag | ( | SocialFlag | flag | ) |
Definition at line 34 of file SocialMgr.cpp.
Referenced by AddToSocialList().
|
inline |
Definition at line 127 of file SocialMgr.h.
Referenced by AddToSocialList(), RemoveFromSocialList(), and SetFriendNote().
| bool PlayerSocial::HasFriend | ( | ObjectGuid const & | friendGuid | ) |
Definition at line 201 of file SocialMgr.cpp.
References _HasContact(), and SOCIAL_FLAG_FRIEND.
Referenced by WorldSession::HandleAddFriendOpcode(), and WorldSession::HandlePartyInviteOpcode().
| bool PlayerSocial::HasIgnore | ( | ObjectGuid const & | ignoreGuid, |
| ObjectGuid const & | ignoreAccountGuid | ||
| ) |
Definition at line 206 of file SocialMgr.cpp.
References _HasContact(), _ignoredAccounts, and SOCIAL_FLAG_IGNORED.
Referenced by Guild::BroadcastAddonToGuild(), Guild::BroadcastToGuild(), Spell::EffectDuel(), Battlenet::Services::ClubService::HandleCreateMessage(), Guild::HandleInviteMember(), WorldSession::HandlePartyInviteOpcode(), lfg::LFGMgr::HasIgnore(), and Channel::Invite().
|
defaultnoexcept |
|
default |
| void PlayerSocial::RemoveFromSocialList | ( | ObjectGuid const & | guid, |
| SocialFlag | flag | ||
| ) |
Definition at line 86 of file SocialMgr.cpp.
References _ignoredAccounts, _playerSocialMap, CHAR_DEL_CHARACTER_SOCIAL, CHAR_UPD_CHARACTER_SOCIAL_FLAGS, CharacterDatabase, ObjectGuid::GetCounter(), GetPlayerGUID(), PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), and SOCIAL_FLAG_IGNORED.
Referenced by WorldSession::HandleDelFriendOpcode(), and WorldSession::HandleDelIgnoreOpcode().
Definition at line 148 of file SocialMgr.cpp.
References _playerSocialMap, WorldPackets::Social::ContactInfo::AreaID, ASSERT, WorldPackets::Social::ContactInfo::ClassID, WorldPackets::Social::ContactList::Contacts, flags, WorldPackets::Social::ContactList::Flags, SocialMgr::GetFriendInfo(), GetVirtualRealmAddress(), WorldPackets::Social::ContactInfo::Guid, WorldPackets::Social::ContactInfo::Level, WorldPackets::Social::ContactInfo::NativeRealmAddr, WorldPackets::Social::ContactInfo::Notes, Player::SendDirectMessage(), SOCIAL_FLAG_FRIEND, SOCIAL_FLAG_IGNORED, SOCIALMGR_FRIEND_LIMIT, SOCIALMGR_IGNORE_LIMIT, WorldPackets::Social::ContactInfo::Status, WorldPackets::Social::ContactInfo::TypeFlags, WorldPackets::Social::ContactInfo::VirtualRealmAddr, WorldPackets::Social::ContactInfo::WowAccountGuid, and WorldPackets::Social::ContactList::Write().
Referenced by WorldSession::HandleContactListOpcode(), and Player::SendInitialPacketsBeforeAddToMap().
| void PlayerSocial::SetFriendNote | ( | ObjectGuid const & | guid, |
| std::string const & | note | ||
| ) |
Definition at line 130 of file SocialMgr.cpp.
References _playerSocialMap, CHAR_UPD_CHARACTER_SOCIAL_NOTE, CharacterDatabase, ObjectGuid::GetCounter(), GetPlayerGUID(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt64(), and utf8truncate().
Referenced by WorldSession::HandleAddFriendOpcode(), and WorldSession::HandleSetContactNotesOpcode().
|
inline |
Definition at line 128 of file SocialMgr.h.
Referenced by SocialMgr::LoadFromDB().
|
friend |
Definition at line 105 of file SocialMgr.h.
|
private |
Definition at line 137 of file SocialMgr.h.
Referenced by AddToSocialList(), HasIgnore(), SocialMgr::LoadFromDB(), and RemoveFromSocialList().
|
private |
Definition at line 139 of file SocialMgr.h.
|
private |
Definition at line 136 of file SocialMgr.h.
Referenced by _HasContact(), AddToSocialList(), SocialMgr::GetFriendInfo(), SocialMgr::LoadFromDB(), RemoveFromSocialList(), SendSocialList(), and SetFriendNote().