1
This commit is contained in:
parent
15afd14d88
commit
2132b1f008
@ -7,6 +7,7 @@
|
||||
void Player::Init()
|
||||
{
|
||||
SyncLocToMasterServer();
|
||||
NotifyOnline();
|
||||
}
|
||||
|
||||
void Player::UnInit()
|
||||
@ -81,3 +82,13 @@ void Player::SyncLocToMasterServer()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Player::NotifyOnline()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Player::NotifyOffline()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -34,4 +34,6 @@ class Player
|
||||
|
||||
void ReLogin(f8::MsgHdr& hdr, const cs::CMLogin& msg);
|
||||
void SyncLocToMasterServer();
|
||||
void NotifyOnline();
|
||||
void NotifyOffline();
|
||||
};
|
||||
|
@ -298,7 +298,10 @@ void PlayerMgr::OnClientSocketDisconnect(int socket_handle)
|
||||
{
|
||||
Player* hum = GetPlayerBySocket(socket_handle);
|
||||
if (hum) {
|
||||
|
||||
hum->NotifyOffline();
|
||||
hum->UnInit();
|
||||
socket_hash_.erase(socket_handle);
|
||||
accountid_hash_.erase(hum->account_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user