AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "SocialMgr.h"
Public Member Functions | |
void | RemovePlayerSocial (ObjectGuid guid) |
void | MakeFriendStatusPacket (FriendsResult result, ObjectGuid friend_guid, WorldPacket *data) |
void | SendFriendStatus (Player *player, FriendsResult result, ObjectGuid friend_guid, bool broadcast) |
void | BroadcastToFriendListers (Player *player, WorldPacket *packet) |
PlayerSocial * | LoadFromDB (PreparedQueryResult result, ObjectGuid guid) |
Static Public Member Functions | |
static SocialMgr * | instance () |
static void | GetFriendInfo (Player *player, ObjectGuid friendGUID, FriendInfo &friendInfo) |
Private Types | |
typedef std::map< ObjectGuid, PlayerSocial > | SocialMap |
Private Member Functions | |
SocialMgr () | |
~SocialMgr () | |
Private Attributes | |
SocialMap | m_socialMap |
|
private |
|
private |
|
private |
void SocialMgr::BroadcastToFriendListers | ( | Player * | player, |
WorldPacket * | packet | ||
) |
References CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_GM_LEVEL_IN_WHO_LIST, ObjectAccessor::FindPlayer(), Object::GetGUID(), WorldSession::GetSecurity(), Player::GetSession(), Player::GetTeamId(), AccountMgr::IsPlayerAccount(), Player::IsVisibleGloballyFor(), m_socialMap, WorldSession::SendPacket(), SOCIAL_FLAG_FRIEND, and sWorld.
Referenced by SendFriendStatus().
|
static |
References FriendInfo::Area, FriendInfo::Class, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_GM_LEVEL_IN_WHO_LIST, ObjectAccessor::FindConnectedPlayer(), FRIEND_STATUS_AFK, FRIEND_STATUS_DND, FRIEND_STATUS_OFFLINE, FRIEND_STATUS_ONLINE, Unit::getClass(), Unit::GetLevel(), WorldSession::GetSecurity(), Player::GetSession(), Player::GetSocial(), Player::GetTeamId(), WorldObject::GetZoneId(), Player::isAFK(), Player::isDND(), WorldSession::IsGMAccount(), AccountMgr::IsPlayerAccount(), Player::IsVisibleGloballyFor(), FriendInfo::Level, PlayerSocial::m_playerSocialMap, FriendInfo::Note, FriendInfo::Status, and sWorld.
Referenced by SendFriendStatus().
|
static |
PlayerSocial * SocialMgr::LoadFromDB | ( | PreparedQueryResult | result, |
ObjectGuid | guid | ||
) |
References Field::Get(), PlayerSocial::m_playerSocialMap, m_socialMap, and PlayerSocial::SetPlayerGUID().
void SocialMgr::MakeFriendStatusPacket | ( | FriendsResult | result, |
ObjectGuid | friend_guid, | ||
WorldPacket * | data | ||
) |
References WorldPacket::Initialize(), and SMSG_FRIEND_STATUS.
|
inline |
References m_socialMap.
void SocialMgr::SendFriendStatus | ( | Player * | player, |
FriendsResult | result, | ||
ObjectGuid | friend_guid, | ||
bool | broadcast | ||
) |
References FriendInfo::Area, BroadcastToFriendListers(), FriendInfo::Class, FRIEND_ADDED_OFFLINE, FRIEND_ADDED_ONLINE, FRIEND_ONLINE, GetFriendInfo(), Player::GetSession(), FriendInfo::Level, FriendInfo::Note, WorldSession::SendPacket(), SMSG_FRIEND_STATUS, and FriendInfo::Status.
|
private |
Referenced by BroadcastToFriendListers(), LoadFromDB(), and RemovePlayerSocial().