1
This commit is contained in:
parent
84a5f23a26
commit
a0f19fa303
@ -15,3 +15,13 @@ void GameLog::UnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GameLog::Login(Player* hum)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GameLog::Logout(Player* hum)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,9 @@ class GameLog : public a8::Singleton<GameLog>
|
||||
void Init();
|
||||
void UnInit();
|
||||
|
||||
void Login(Player* hum);
|
||||
void Logout(Player* hum);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "dbengine.h"
|
||||
#include "WSListener.h"
|
||||
#include "app.h"
|
||||
#include "gamelog.h"
|
||||
|
||||
#include "framework/cpp/utils.h"
|
||||
|
||||
@ -386,6 +387,7 @@ void PlayerMgr::AsyncLoginOnOk(const std::string& account_id,
|
||||
}
|
||||
socket_hash_[hdr->socket_handle] = hum;
|
||||
accountid_hash_[account_id] = hum;
|
||||
GameLog::Instance()->Login(hum);
|
||||
}
|
||||
pending_socket_hash_.erase(hdr->socket_handle);
|
||||
pending_account_hash_.erase(account_id);
|
||||
@ -423,6 +425,7 @@ void PlayerMgr::OnClientSocketDisconnect(int socket_handle)
|
||||
{
|
||||
Player* hum = GetPlayerBySocket(socket_handle);
|
||||
if (hum) {
|
||||
GameLog::Instance()->Logout(hum);
|
||||
hum->NotifyOffline();
|
||||
hum->UnInit();
|
||||
socket_hash_.erase(socket_handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user