From 19bee763bdb1957dbca046433919b572622cfae1 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sat, 15 Jul 2017 09:36:43 -0400 Subject: [PATCH] Make world messages about logging in and logging out more detailed. Previously logging in (from desktop) and out (from game) both of which land you at char select both said Logging (In). Now it tells you which is occuring. There really is no Logging Out Compleetely message - not sure where that could or should be added. --- world/client.cpp | 29 ++++++++++++++++++++++++----- world/cliententry.h | 1 + 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/world/client.cpp b/world/client.cpp index 19c7747b5..31ec305ba 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -449,17 +449,33 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) { return false; } - cle->SetOnline(); - if(minilogin){ + cle->SetOnline(); WorldConfig::DisableStats(); Log(Logs::General, Logs::World_Server, "MiniLogin Account #%d",cle->AccountID()); } else { - if (!is_player_zoning) { - Log(Logs::General, Logs::World_Server, - "Account (%s) Logging in :: LSID: %d ", cle->AccountName(), cle->LSID()); + // Track who is in and who is out of the game + char *inout= (char *) ""; + + if (cle->GetOnline() < CLE_Status_Online){ + // Desktop -> Char Select + inout = (char *) "In"; } + else { + // Game -> Char Select + inout=(char *) "Out"; + } + + // Always at Char select at this point. + // Either from a fresh client launch or coming back from the game. + // Exiting the game entirely does not come through here. + // Could use a Logging Out Completely message somewhere. + cle->SetOnline(CLE_Status_CharSelect); + + Log(Logs::General, Logs::World_Server, + "Account (%s) Logging(%s) to character select :: LSID: %d ", + cle->AccountName(), inout, cle->LSID()); } const WorldConfig *Config=WorldConfig::get(); @@ -1021,6 +1037,9 @@ bool Client::HandlePacket(const EQApplicationPacket *app) { } case OP_WorldLogout: { + //Log(Logs::General, Logs::World_Server, + //"Account (%s) Logging Off :: LSID: %d ", cle->AccountName(), cle->LSID()); + //online.erase(cle->LSID()); eqs->Close(); cle->SetOnline(CLE_Status_Offline); //allows this player to log in again without an ip restriction. return false; diff --git a/world/cliententry.h b/world/cliententry.h index cb096950c..24a837ae9 100644 --- a/world/cliententry.h +++ b/world/cliententry.h @@ -50,6 +50,7 @@ public: inline const char* LSName() const { return plsname; } inline int16 WorldAdmin() const { return pworldadmin; } inline const char* GetLSKey() const { return plskey; } + inline const int8 GetOnline() const { return pOnline; } // Account stuff inline uint32 AccountID() const { return paccountid; }