1
This commit is contained in:
parent
2836f7c213
commit
36fbb3a574
@ -775,6 +775,11 @@ void Player::RemoveFriend(const std::string& account_id)
|
||||
}
|
||||
}
|
||||
|
||||
void Player::Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const std::string Player::AccountId()
|
||||
{
|
||||
return myself.base_data.account_id;
|
||||
|
@ -98,6 +98,7 @@ class Player
|
||||
void NotifyOffline();
|
||||
void NotifyUserInfoUpdate(Friend* friend_data);
|
||||
void FillIMMsgConext(ss::MFIMMsgConext* context);
|
||||
void Update();
|
||||
|
||||
const std::string AccountId();
|
||||
|
||||
|
@ -143,6 +143,13 @@ int PlayerMgr::OnlineNum()
|
||||
return socket_hash_.size();
|
||||
}
|
||||
|
||||
void PlayerMgr::Update()
|
||||
{
|
||||
for (auto& pair : accountid_hash_) {
|
||||
pair.second->Update();
|
||||
}
|
||||
}
|
||||
|
||||
Player* PlayerMgr::GetPlayerBySocket(int socket)
|
||||
{
|
||||
auto itr = socket_hash_.find(socket);
|
||||
|
@ -48,6 +48,7 @@ class PlayerMgr : public a8::Singleton<PlayerMgr>
|
||||
void WatchPlayer(Friend* friend_data);
|
||||
void UnWatchPlayer(Friend* friend_data);
|
||||
int OnlineNum();
|
||||
void Update();
|
||||
|
||||
private:
|
||||
void OnClientDisconnect(a8::XParams& param);
|
||||
|
Loading…
x
Reference in New Issue
Block a user