From 73cf41de2746531dea8695c1ac5358c51e1f0aa9 Mon Sep 17 00:00:00 2001 From: lotodore Date: Sun, 22 Aug 2010 18:42:54 +0000 Subject: [PATCH] Store hash of last used avatar in db. --- src/db/common/serverdbgeneric.cpp | 2 +- src/db/serverdbgeneric.h | 2 +- src/db/serverdbinterface.h | 2 +- src/db/serverdbnoaction.h | 2 +- src/net/common/serverlobbythread.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/db/common/serverdbgeneric.cpp b/src/db/common/serverdbgeneric.cpp index 1c65af79..f8573d35 100644 --- a/src/db/common/serverdbgeneric.cpp +++ b/src/db/common/serverdbgeneric.cpp @@ -49,7 +49,7 @@ ServerDBGeneric::Stop() } void -ServerDBGeneric::AsyncPlayerLogin(unsigned requestId, const string &/*playerName*/) +ServerDBGeneric::AsyncPlayerLogin(unsigned requestId, const string &/*playerName*/, const std::string &/*avatarHash*/) { m_ioService->post(boost::bind(&ServerDBCallback::PlayerLoginFailed, &m_callback, requestId)); } diff --git a/src/db/serverdbgeneric.h b/src/db/serverdbgeneric.h index 2f68e5fc..f48072ba 100644 --- a/src/db/serverdbgeneric.h +++ b/src/db/serverdbgeneric.h @@ -38,7 +38,7 @@ public: virtual void Start(); virtual void Stop(); - virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName); + virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName, const std::string &avatarHash); virtual void PlayerLogout(DB_id playerId); virtual void AsyncCreateGame(unsigned requestId, const std::string &gameName); diff --git a/src/db/serverdbinterface.h b/src/db/serverdbinterface.h index c4323924..e3eda273 100644 --- a/src/db/serverdbinterface.h +++ b/src/db/serverdbinterface.h @@ -38,7 +38,7 @@ public: virtual void Start() = 0; virtual void Stop() = 0; - virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName) = 0; + virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName, const std::string &avatarHash) = 0; virtual void PlayerLogout(DB_id playerId) = 0; virtual void AsyncCreateGame(unsigned requestId, const std::string &gameName) = 0; diff --git a/src/db/serverdbnoaction.h b/src/db/serverdbnoaction.h index c6c86128..b3b9a19d 100644 --- a/src/db/serverdbnoaction.h +++ b/src/db/serverdbnoaction.h @@ -36,7 +36,7 @@ public: virtual void Start() {} virtual void Stop() {} - virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName) {} + virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName, const std::string &avatarHash) {} virtual void PlayerLogout(DB_id playerId) {} virtual void AsyncCreateGame(unsigned requestId, const std::string &gameName) {} diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 4855441b..6282a194 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1528,7 +1528,7 @@ void ServerLobbyThread::AuthenticatePlayer(SessionWrapper session) { if(session.playerData) - m_database->AsyncPlayerLogin(session.playerData->GetUniqueId(), session.playerData->GetName()); + m_database->AsyncPlayerLogin(session.playerData->GetUniqueId(), session.playerData->GetName(), session.playerData->GetAvatarMD5().ToString()); } void