![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "SocialMgr.h"
Public Member Functions | |
| PlayerSocial () | |
| bool | AddToSocialList (ObjectGuid const &friend_guid, SocialFlag flag) |
| void | RemoveFromSocialList (ObjectGuid const &friend_guid, SocialFlag flag) |
| void | SetFriendNote (ObjectGuid const &friendGuid, std::string note) |
| void | SendSocialList (Player *player, uint32 flags) |
| bool | HasFriend (ObjectGuid const &friend_guid) const |
| bool | HasIgnore (ObjectGuid const &ignore_guid) const |
| ObjectGuid const & | GetPlayerGUID () const |
| void | SetPlayerGUID (ObjectGuid const &guid) |
| uint32 | GetNumberOfSocialsWithFlag (SocialFlag flag) const |
Private Types | |
| typedef std::map< ObjectGuid, FriendInfo > | PlayerSocialMap |
Private Member Functions | |
| bool | _checkContact (ObjectGuid const &guid, SocialFlag flags) const |
Private Attributes | |
| PlayerSocialMap | m_playerSocialMap |
| ObjectGuid | m_playerGUID |
Friends | |
| class | SocialMgr |
|
private |
| PlayerSocial::PlayerSocial | ( | ) |
|
private |
References m_playerSocialMap.
Referenced by HasFriend(), and HasIgnore().
| bool PlayerSocial::AddToSocialList | ( | ObjectGuid const & | friend_guid, |
| SocialFlag | flag | ||
| ) |
References CHAR_INS_CHARACTER_SOCIAL, CHAR_UPD_ADD_CHARACTER_SOCIAL_FLAGS, CharacterDatabase, ObjectGuid::GetCounter(), GetNumberOfSocialsWithFlag(), GetPlayerGUID(), m_playerSocialMap, PreparedStatementBase::SetData(), SOCIAL_FLAG_FRIEND, SOCIALMGR_FRIEND_LIMIT, and SOCIALMGR_IGNORE_LIMIT.
| uint32 PlayerSocial::GetNumberOfSocialsWithFlag | ( | SocialFlag | flag | ) | const |
References m_playerSocialMap.
Referenced by AddToSocialList().
|
inline |
References m_playerGUID.
Referenced by AddToSocialList(), RemoveFromSocialList(), and SetFriendNote().
| bool PlayerSocial::HasFriend | ( | ObjectGuid const & | friend_guid | ) | const |
References _checkContact(), and SOCIAL_FLAG_FRIEND.
Referenced by WorldSession::HandleGroupInviteOpcode().
| bool PlayerSocial::HasIgnore | ( | ObjectGuid const & | ignore_guid | ) | const |
References _checkContact(), 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 & | friend_guid, |
| SocialFlag | flag | ||
| ) |
References CHAR_DEL_CHARACTER_SOCIAL, CHAR_UPD_REM_CHARACTER_SOCIAL_FLAGS, CharacterDatabase, ObjectGuid::GetCounter(), GetPlayerGUID(), m_playerSocialMap, and PreparedStatementBase::SetData().
Referenced by WorldSession::HandleDelFriendOpcode(), and WorldSession::HandleDelIgnoreOpcode().
References FriendInfo::Area, FriendInfo::Class, FriendInfo::Flags, FriendInfo::Level, LOG_DEBUG, m_playerSocialMap, FriendInfo::Note, ByteBuffer::put(), Player::SendDirectMessage(), SMSG_CONTACT_LIST, SOCIAL_FLAG_FRIEND, SOCIAL_FLAG_IGNORED, SOCIALMGR_FRIEND_LIMIT, SOCIALMGR_IGNORE_LIMIT, sSocialMgr, FriendInfo::Status, and ByteBuffer::wpos().
Referenced by WorldSession::HandleContactListOpcode(), and Player::SendInitialPacketsBeforeAddToMap().
| void PlayerSocial::SetFriendNote | ( | ObjectGuid const & | friendGuid, |
| std::string | note | ||
| ) |
References CHAR_UPD_CHARACTER_SOCIAL_NOTE, CharacterDatabase, ObjectGuid::GetCounter(), GetPlayerGUID(), m_playerSocialMap, PreparedStatementBase::SetData(), and utf8truncate().
Referenced by WorldSession::HandleAddFriendOpcode(), and WorldSession::HandleSetContactNotesOpcode().
|
inline |
|
friend |
|
private |
Referenced by GetPlayerGUID(), and SetPlayerGUID().
|
private |