mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 14:03:34 +00:00
Merge branch 'first-draft-leaderboard-re-write' of https://github.com/EmosewaMC/DarkflameServer into first-draft-leaderboard-re-write
This commit is contained in:
commit
e32cec6691
@ -20,7 +20,6 @@ enum class MetricVariable : int32_t
|
|||||||
CPUTime,
|
CPUTime,
|
||||||
Sleep,
|
Sleep,
|
||||||
Frame,
|
Frame,
|
||||||
Leaderboard,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Metric
|
struct Metric
|
||||||
|
@ -109,7 +109,7 @@ void MigrationRunner::RunSQLiteMigrations() {
|
|||||||
|
|
||||||
// Check if there is an entry in the migration history table on the cdclient database.
|
// Check if there is an entry in the migration history table on the cdclient database.
|
||||||
cdstmt = CDClientDatabase::CreatePreppedStmt("SELECT name FROM migration_history WHERE name = ?;");
|
cdstmt = CDClientDatabase::CreatePreppedStmt("SELECT name FROM migration_history WHERE name = ?;");
|
||||||
cdstmt.bind((int32_t)1, migration.name.c_str());
|
cdstmt.bind((int32_t) 1, migration.name.c_str());
|
||||||
auto cdres = cdstmt.execQuery();
|
auto cdres = cdstmt.execQuery();
|
||||||
bool doExit = !cdres.eof();
|
bool doExit = !cdres.eof();
|
||||||
cdres.finalize();
|
cdres.finalize();
|
||||||
@ -127,7 +127,7 @@ void MigrationRunner::RunSQLiteMigrations() {
|
|||||||
if (doExit) {
|
if (doExit) {
|
||||||
// Insert into cdclient database if there is an entry in the main database but not the cdclient database.
|
// Insert into cdclient database if there is an entry in the main database but not the cdclient database.
|
||||||
cdstmt = CDClientDatabase::CreatePreppedStmt("INSERT INTO migration_history (name) VALUES (?);");
|
cdstmt = CDClientDatabase::CreatePreppedStmt("INSERT INTO migration_history (name) VALUES (?);");
|
||||||
cdstmt.bind((int32_t)1, migration.name.c_str());
|
cdstmt.bind((int32_t) 1, migration.name.c_str());
|
||||||
cdstmt.execQuery().finalize();
|
cdstmt.execQuery().finalize();
|
||||||
cdstmt.finalize();
|
cdstmt.finalize();
|
||||||
continue;
|
continue;
|
||||||
@ -148,7 +148,7 @@ void MigrationRunner::RunSQLiteMigrations() {
|
|||||||
|
|
||||||
// Insert into cdclient database.
|
// Insert into cdclient database.
|
||||||
cdstmt = CDClientDatabase::CreatePreppedStmt("INSERT INTO migration_history (name) VALUES (?);");
|
cdstmt = CDClientDatabase::CreatePreppedStmt("INSERT INTO migration_history (name) VALUES (?);");
|
||||||
cdstmt.bind((int32_t)1, migration.name.c_str());
|
cdstmt.bind((int32_t) 1, migration.name.c_str());
|
||||||
cdstmt.execQuery().finalize();
|
cdstmt.execQuery().finalize();
|
||||||
cdstmt.finalize();
|
cdstmt.finalize();
|
||||||
CDClientDatabase::ExecuteQuery("COMMIT;");
|
CDClientDatabase::ExecuteQuery("COMMIT;");
|
||||||
|
@ -45,7 +45,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System
|
|||||||
Entity* entity = EntityManager::Instance()->GetEntity(objectID);
|
Entity* entity = EntityManager::Instance()->GetEntity(objectID);
|
||||||
|
|
||||||
User* usr = UserManager::Instance()->GetUser(sysAddr);
|
User* usr = UserManager::Instance()->GetUser(sysAddr);
|
||||||
if (messageID != eGameMessageType::READY_FOR_UPDATES) Game::logger->Log("GameMessageHandler", "message %i", messageID);
|
|
||||||
if (!entity) {
|
if (!entity) {
|
||||||
Game::logger->Log("GameMessageHandler", "Failed to find associated entity (%llu), aborting GM (%X)!", objectID, messageID);
|
Game::logger->Log("GameMessageHandler", "Failed to find associated entity (%llu), aborting GM (%X)!", objectID, messageID);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user