Core/Player: Correctly send social list to player on login. Fixes display of number of online friends in the icon on the chat pane.
Fixes issue #3807. --HG-- branch : trunk
This commit is contained in:
@@ -20978,7 +20978,8 @@ void Player::SetGroup(Group *group, int8 subgroup)
|
|||||||
|
|
||||||
void Player::SendInitialPacketsBeforeAddToMap()
|
void Player::SendInitialPacketsBeforeAddToMap()
|
||||||
{
|
{
|
||||||
GetSocial()->SendSocialList();
|
/// Pass 'this' as argument because we're not stored in ObjectAccessor yet
|
||||||
|
GetSocial()->SendSocialList(this);
|
||||||
|
|
||||||
// guild bank list wtf?
|
// guild bank list wtf?
|
||||||
|
|
||||||
|
|||||||
@@ -115,9 +115,8 @@ void PlayerSocial::SetFriendNote(uint32 friend_guid, std::string note)
|
|||||||
m_playerSocialMap[friend_guid].Note = note;
|
m_playerSocialMap[friend_guid].Note = note;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerSocial::SendSocialList()
|
void PlayerSocial::SendSocialList(Player* plr)
|
||||||
{
|
{
|
||||||
Player *plr = sObjectMgr.GetPlayer(GetPlayerGUID());
|
|
||||||
if (!plr)
|
if (!plr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class PlayerSocial
|
|||||||
void RemoveFromSocialList(uint32 friend_guid, bool ignore);
|
void RemoveFromSocialList(uint32 friend_guid, bool ignore);
|
||||||
void SetFriendNote(uint32 friend_guid, std::string note);
|
void SetFriendNote(uint32 friend_guid, std::string note);
|
||||||
// Packet send's
|
// Packet send's
|
||||||
void SendSocialList();
|
void SendSocialList(Player* plr);
|
||||||
// Misc
|
// Misc
|
||||||
bool HasFriend(uint32 friend_guid);
|
bool HasFriend(uint32 friend_guid);
|
||||||
bool HasIgnore(uint32 ignore_guid);
|
bool HasIgnore(uint32 ignore_guid);
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ void WorldSession::HandleContactListOpcode(WorldPacket & recv_data)
|
|||||||
uint32 unk;
|
uint32 unk;
|
||||||
recv_data >> unk;
|
recv_data >> unk;
|
||||||
sLog.outDebug("unk value is %u", unk);
|
sLog.outDebug("unk value is %u", unk);
|
||||||
_player->GetSocial()->SendSocialList();
|
_player->GetSocial()->SendSocialList(_player);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data)
|
void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user