This commit is contained in:
aozhiwei 2020-06-22 15:55:17 +08:00
parent 84a5f23a26
commit a0f19fa303
3 changed files with 16 additions and 0 deletions

View File

@ -15,3 +15,13 @@ void GameLog::UnInit()
{
}
void GameLog::Login(Player* hum)
{
}
void GameLog::Logout(Player* hum)
{
}

View File

@ -11,6 +11,9 @@ class GameLog : public a8::Singleton<GameLog>
void Init();
void UnInit();
void Login(Player* hum);
void Logout(Player* hum);
private:
};

View File

@ -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);