![]() |
TrinityCore
|
#include <SocialMgr.h>
Public Member Functions | |
| void | RemovePlayerSocial (ObjectGuid const &guid) |
| void | SendFriendStatus (Player *player, FriendsResult result, ObjectGuid const &friendGuid, bool broadcast=false) |
| void | BroadcastToFriendListers (Player *player, WorldPacket const *packet) |
| PlayerSocial * | LoadFromDB (PreparedQueryResult result, ObjectGuid const &guid) |
Static Public Member Functions | |
| static SocialMgr * | instance () |
| static void | GetFriendInfo (Player *player, ObjectGuid const &friendGUID, FriendInfo &friendInfo) |
Private Types | |
| typedef std::map< ObjectGuid, PlayerSocial > | SocialMap |
Private Member Functions | |
| SocialMgr () | |
| ~SocialMgr () | |
Private Attributes | |
| SocialMap | _socialMap |
Definition at line 133 of file SocialMgr.h.
|
private |
Definition at line 155 of file SocialMgr.h.
|
inlineprivate |
Definition at line 136 of file SocialMgr.h.
|
inlineprivate |
Definition at line 137 of file SocialMgr.h.
| void SocialMgr::BroadcastToFriendListers | ( | Player * | player, |
| WorldPacket const * | packet | ||
| ) |
Definition at line 259 of file SocialMgr.cpp.
References _socialMap, ASSERT, CONFIG_GM_LEVEL_IN_WHO_LIST, ObjectAccessor::FindPlayer(), Object::GetGUID(), WorldSession::GetSecurity(), Player::GetSession(), Player::GetTeam(), WorldSession::HasPermission(), Player::IsVisibleGloballyFor(), rbac::RBAC_PERM_TWO_SIDE_WHO_LIST, rbac::RBAC_PERM_WHO_SEE_ALL_SEC_LEVELS, WorldSession::SendPacket(), SOCIAL_FLAG_FRIEND, and sWorld.
Referenced by SendFriendStatus().
|
static |
Definition at line 190 of file SocialMgr.cpp.
References PlayerSocial::_playerSocialMap, FriendInfo::Area, FriendInfo::Class, CONFIG_GM_LEVEL_IN_WHO_LIST, ObjectAccessor::FindPlayer(), FRIEND_STATUS_AFK, FRIEND_STATUS_DND, FRIEND_STATUS_OFFLINE, FRIEND_STATUS_ONLINE, FRIEND_STATUS_RAF, WorldSession::GetAccountId(), Unit::GetClass(), Unit::GetLevel(), WorldSession::GetRecruiterId(), WorldSession::GetSecurity(), Player::GetSession(), Player::GetSocial(), Player::GetTeam(), WorldObject::GetZoneId(), WorldSession::HasPermission(), Player::isAFK(), Player::isDND(), Player::IsVisibleGloballyFor(), FriendInfo::Level, FriendInfo::Note, rbac::RBAC_PERM_TWO_SIDE_WHO_LIST, rbac::RBAC_PERM_WHO_SEE_ALL_SEC_LEVELS, FriendInfo::Status, and sWorld.
Referenced by SendFriendStatus(), and PlayerSocial::SendSocialList().
|
static |
| PlayerSocial * SocialMgr::LoadFromDB | ( | PreparedQueryResult | result, |
| ObjectGuid const & | guid | ||
| ) |
Definition at line 286 of file SocialMgr.cpp.
References PlayerSocial::_playerSocialMap, _socialMap, Field::GetUInt8(), and PlayerSocial::SetPlayerGUID().
|
inline |
Definition at line 143 of file SocialMgr.h.
References _socialMap.
| void SocialMgr::SendFriendStatus | ( | Player * | player, |
| FriendsResult | result, | ||
| ObjectGuid const & | friendGuid, | ||
| bool | broadcast = false |
||
| ) |
Definition at line 239 of file SocialMgr.cpp.
References FriendInfo::Area, WorldPackets::Social::FriendStatus::AreaID, BroadcastToFriendListers(), FriendInfo::Class, WorldPackets::Social::FriendStatus::ClassID, WorldPackets::Social::FriendStatus::FriendResult, GetFriendInfo(), WorldPackets::Social::FriendStatus::Guid, FriendInfo::Level, WorldPackets::Social::FriendStatus::Level, FriendInfo::Note, WorldPackets::Social::FriendStatus::Notes, Player::SendDirectMessage(), FriendInfo::Status, WorldPackets::Social::FriendStatus::Status, and WorldPackets::Social::FriendStatus::Write().
|
private |
Definition at line 156 of file SocialMgr.h.
Referenced by BroadcastToFriendListers(), LoadFromDB(), and RemovePlayerSocial().