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:
Machiavelli
2010-09-25 17:08:55 +02:00
parent 5aaef4601a
commit a312a667cb
4 changed files with 5 additions and 5 deletions
+2 -1
View File
@@ -20978,7 +20978,8 @@ void Player::SetGroup(Group *group, int8 subgroup)
void Player::SendInitialPacketsBeforeAddToMap()
{
GetSocial()->SendSocialList();
/// Pass 'this' as argument because we're not stored in ObjectAccessor yet
GetSocial()->SendSocialList(this);
// guild bank list wtf?
@@ -115,9 +115,8 @@ void PlayerSocial::SetFriendNote(uint32 friend_guid, std::string note)
m_playerSocialMap[friend_guid].Note = note;
}
void PlayerSocial::SendSocialList()
void PlayerSocial::SendSocialList(Player* plr)
{
Player *plr = sObjectMgr.GetPlayer(GetPlayerGUID());
if (!plr)
return;
+1 -1
View File
@@ -126,7 +126,7 @@ class PlayerSocial
void RemoveFromSocialList(uint32 friend_guid, bool ignore);
void SetFriendNote(uint32 friend_guid, std::string note);
// Packet send's
void SendSocialList();
void SendSocialList(Player* plr);
// Misc
bool HasFriend(uint32 friend_guid);
bool HasIgnore(uint32 ignore_guid);
@@ -530,7 +530,7 @@ void WorldSession::HandleContactListOpcode(WorldPacket & recv_data)
uint32 unk;
recv_data >> unk;
sLog.outDebug("unk value is %u", unk);
_player->GetSocial()->SendSocialList();
_player->GetSocial()->SendSocialList(_player);
}
void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data)