mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-10-26 18:11:59 +00:00 
			
		
		
		
	Merge main into property-entrance-rewrite
This commit is contained in:
		| @@ -8,7 +8,7 @@ | ||||
| #include "Character.h" | ||||
| #include "Game.h" | ||||
| #include "GameMessages.h" | ||||
| #include "dLogger.h" | ||||
| #include "Logger.h" | ||||
| #include "dConfig.h" | ||||
| #include "CDClientManager.h" | ||||
| #include "GeneralUtils.h" | ||||
| @@ -236,7 +236,7 @@ void Leaderboard::SetupLeaderboard(bool weekly, uint32_t resultStart, uint32_t r | ||||
| 		baseLookup += std::to_string(static_cast<uint32_t>(this->relatedPlayer)); | ||||
| 	} | ||||
| 	baseLookup += " LIMIT 1"; | ||||
| 	Game::logger->LogDebug("LeaderboardManager", "query is %s", baseLookup.c_str()); | ||||
| 	LOG_DEBUG("query is %s", baseLookup.c_str()); | ||||
| 	std::unique_ptr<sql::PreparedStatement> baseQuery(Database::CreatePreppedStmt(baseLookup)); | ||||
| 	baseQuery->setInt(1, this->gameID); | ||||
| 	std::unique_ptr<sql::ResultSet> baseResult(baseQuery->executeQuery()); | ||||
| @@ -251,7 +251,7 @@ void Leaderboard::SetupLeaderboard(bool weekly, uint32_t resultStart, uint32_t r | ||||
| 	int32_t res = snprintf(lookupBuffer.get(), STRING_LENGTH, queryBase.c_str(), orderBase.data(), filter.c_str(), resultStart, resultEnd); | ||||
| 	DluAssert(res != -1); | ||||
| 	std::unique_ptr<sql::PreparedStatement> query(Database::CreatePreppedStmt(lookupBuffer.get())); | ||||
| 	Game::logger->LogDebug("LeaderboardManager", "Query is %s vars are %i %i %i", lookupBuffer.get(), this->gameID, this->relatedPlayer, relatedPlayerLeaderboardId); | ||||
| 	LOG_DEBUG("Query is %s vars are %i %i %i", lookupBuffer.get(), this->gameID, this->relatedPlayer, relatedPlayerLeaderboardId); | ||||
| 	query->setInt(1, this->gameID); | ||||
| 	if (this->infoType == InfoType::Friends) { | ||||
| 		query->setInt(2, this->relatedPlayer); | ||||
| @@ -358,7 +358,7 @@ void LeaderboardManager::SaveScore(const LWOOBJID& playerID, const GameID activi | ||||
| 		} | ||||
| 		case Leaderboard::Type::None: | ||||
| 		default: | ||||
| 			Game::logger->Log("LeaderboardManager", "Unknown leaderboard type %i for game %i. Cannot save score!", leaderboardType, activityId); | ||||
| 			LOG("Unknown leaderboard type %i for game %i. Cannot save score!", leaderboardType, activityId); | ||||
| 			return; | ||||
| 		} | ||||
| 		bool newHighScore = lowerScoreBetter ? newScore < oldScore : newScore > oldScore; | ||||
| @@ -377,7 +377,7 @@ void LeaderboardManager::SaveScore(const LWOOBJID& playerID, const GameID activi | ||||
| 	} else { | ||||
| 		saveQuery = FormatInsert(leaderboardType, newScore, false); | ||||
| 	} | ||||
| 	Game::logger->Log("LeaderboardManager", "save query %s %i %i", saveQuery.c_str(), playerID, activityId); | ||||
| 	LOG("save query %s %i %i", saveQuery.c_str(), playerID, activityId); | ||||
| 	std::unique_ptr<sql::PreparedStatement> saveStatement(Database::CreatePreppedStmt(saveQuery)); | ||||
| 	saveStatement->setInt(1, playerID); | ||||
| 	saveStatement->setInt(2, activityId); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jettford
					Jettford