From 26cbb01556f2860bab65abf6e3dece01fe4affd9 Mon Sep 17 00:00:00 2001 From: DasBlub Date: Sun, 25 Apr 2010 18:28:43 +0200 Subject: [PATCH] [9793] Add 'Logout Player' output to the Char.log --- src/game/CharacterHandler.cpp | 10 +++++----- src/game/WorldSession.cpp | 2 ++ src/shared/revision_nr.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index ae7e3f166..f810636f9 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -474,14 +474,14 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data ) loginDatabase.PExecute("DELETE FROM realmcharacters WHERE acctid= '%d' AND realmid = '%d'", GetAccountId(), realmID); loginDatabase.PExecute("INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (%u, %u, %u)", charcount, GetAccountId(), realmID); - delete pNewChar; // created only to call SaveToDB() - data << (uint8)CHAR_CREATE_SUCCESS; SendPacket( &data ); std::string IP_str = GetRemoteAddress(); - sLog.outBasic("Account: %d (IP: %s) Create Character:[%s]", GetAccountId(), IP_str.c_str(), name.c_str()); - sLog.outChar("Account: %d (IP: %s) Create Character:[%s]", GetAccountId(), IP_str.c_str(), name.c_str()); + sLog.outBasic("Account: %d (IP: %s) Create Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow()); + sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow()); + + delete pNewChar; // created only to call SaveToDB() } void WorldSession::HandleCharDeleteOpcode( WorldPacket & recv_data ) @@ -787,7 +787,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder) SendNotification(LANG_GM_ON); std::string IP_str = GetRemoteAddress(); - sLog.outChar("Account: %d (IP: %s) Login Character:[%s] (guid:%u)", + sLog.outChar("Account: %d (IP: %s) Login Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), pCurrChar->GetName(), pCurrChar->GetGUIDLow()); if(!pCurrChar->IsStandState() && !pCurrChar->hasUnitState(UNIT_STAT_STUNNED)) diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index a30ebc709..2ac744e4b 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -302,6 +302,8 @@ void WorldSession::LogoutPlayer(bool Save) if (_player) { + sLog.outChar("Account: %d (IP: %s) Logout Character:[%s] (guid: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName() ,_player->GetGUIDLow()); + if (uint64 lguid = GetPlayer()->GetLootGUID()) DoLootRelease(lguid); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9ece4d522..55ee35a02 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9792" + #define REVISION_NR "9793" #endif // __REVISION_NR_H__