![]() |
TrinityCore
|
#include <SocialMgr.h>
Public Member Functions | |
| PlayerSocial () | |
| bool | AddToSocialList (ObjectGuid const &guid, 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 & | 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 |
| ObjectGuid | _playerGUID |
Friends | |
| class | SocialMgr |
Definition at line 101 of file SocialMgr.h.
|
private |
Definition at line 127 of file SocialMgr.h.
| PlayerSocial::PlayerSocial | ( | ) |
Definition at line 27 of file SocialMgr.cpp.
|
private |
Definition at line 165 of file SocialMgr.cpp.
References _playerSocialMap, and flags.
Referenced by HasFriend(), and HasIgnore().
| bool PlayerSocial::AddToSocialList | ( | ObjectGuid const & | guid, |
| SocialFlag | flag | ||
| ) |
Definition at line 40 of file SocialMgr.cpp.
References _playerSocialMap, CHAR_INS_CHARACTER_SOCIAL, CHAR_UPD_CHARACTER_SOCIAL_FLAGS, CharacterDatabase, ObjectGuid::GetCounter(), GetNumberOfSocialsWithFlag(), GetPlayerGUID(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt8(), SOCIAL_FLAG_FRIEND, SOCIALMGR_FRIEND_LIMIT, and SOCIALMGR_IGNORE_LIMIT.
| uint32 PlayerSocial::GetNumberOfSocialsWithFlag | ( | SocialFlag | flag | ) |
Definition at line 30 of file SocialMgr.cpp.
References _playerSocialMap.
Referenced by AddToSocialList().
|
inline |
Definition at line 119 of file SocialMgr.h.
Referenced by AddToSocialList(), RemoveFromSocialList(), and SetFriendNote().
| bool PlayerSocial::HasFriend | ( | ObjectGuid const & | friendGuid | ) |
Definition at line 174 of file SocialMgr.cpp.
References _HasContact(), and SOCIAL_FLAG_FRIEND.
Referenced by WorldSession::HandleAddFriendOpcode(), and WorldSession::HandleGroupInviteOpcode().
| bool PlayerSocial::HasIgnore | ( | ObjectGuid const & | ignoreGuid | ) |
Definition at line 179 of file SocialMgr.cpp.
References _HasContact(), and SOCIAL_FLAG_IGNORED.
Referenced by Spell::EffectDuel(), WorldSession::HandleArenaTeamInviteOpcode(), WorldSession::HandleGroupInviteOpcode(), Guild::HandleInviteMember(), lfg::LFGMgr::HasIgnore(), and Channel::Invite().
| void PlayerSocial::RemoveFromSocialList | ( | ObjectGuid const & | guid, |
| SocialFlag | flag | ||
| ) |
Definition at line 75 of file SocialMgr.cpp.
References _playerSocialMap, CHAR_DEL_CHARACTER_SOCIAL, CHAR_UPD_CHARACTER_SOCIAL_FLAGS, CharacterDatabase, ObjectGuid::GetCounter(), GetPlayerGUID(), PreparedStatementBase::setUInt32(), and PreparedStatementBase::setUInt8().
Referenced by WorldSession::HandleDelFriendOpcode(), and WorldSession::HandleDelIgnoreOpcode().
Definition at line 124 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(), WorldPackets::Social::ContactInfo::Guid, WorldPackets::Social::ContactInfo::Level, 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, 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 106 of file SocialMgr.cpp.
References _playerSocialMap, CHAR_UPD_CHARACTER_SOCIAL_NOTE, CharacterDatabase, ObjectGuid::GetCounter(), GetPlayerGUID(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt32(), and utf8truncate().
Referenced by WorldSession::HandleAddFriendOpcode(), and WorldSession::HandleSetContactNotesOpcode().
|
inline |
Definition at line 120 of file SocialMgr.h.
Referenced by SocialMgr::LoadFromDB().
|
friend |
Definition at line 103 of file SocialMgr.h.
|
private |
Definition at line 130 of file SocialMgr.h.
|
private |
Definition at line 128 of file SocialMgr.h.
Referenced by _HasContact(), AddToSocialList(), SocialMgr::GetFriendInfo(), GetNumberOfSocialsWithFlag(), SocialMgr::LoadFromDB(), RemoveFromSocialList(), SendSocialList(), and SetFriendNote().