Merge branch 'main' into main

This commit is contained in:
Aaron Kimbrell
2022-05-24 19:00:52 -05:00
committed by GitHub
169 changed files with 3164 additions and 1954 deletions

View File

@@ -26,9 +26,10 @@ void Database::Connect(const string& host, const string& database, const string&
con->setClientOption("MYSQL_OPT_RECONNECT", &myTrue);
} //Connect
void Database::Destroy() {
void Database::Destroy(std::string source) {
if (!con) return;
Game::logger->Log("Database", "Destroying MySQL connection!\n");
if (source != "") Game::logger->Log("Database", "Destroying MySQL connection from %s!\n", source.c_str());
else Game::logger->Log("Database", "Destroying MySQL connection!\n");
con->close();
delete con;
} //Destroy

View File

@@ -22,7 +22,7 @@ private:
public:
static void Connect(const std::string& host, const std::string& database, const std::string& username, const std::string& password);
static void Destroy();
static void Destroy(std::string source="");
static sql::Statement* CreateStmt();
static sql::PreparedStatement* CreatePreppedStmt(const std::string& query);
};

View File

@@ -3,6 +3,7 @@
// Custom Classes
#include "CDTable.h"
#include <map>
#include <cstdint>
/*!
\file CDMissionsTable.hpp
@@ -17,9 +18,9 @@ struct CDMissions {
int UISortOrder; //!< The UI Sort Order for the mission
int offer_objectID; //!< The LOT of the mission giver
int target_objectID; //!< The LOT of the mission's target
__int64 reward_currency; //!< The amount of currency to reward the player
int64_t reward_currency; //!< The amount of currency to reward the player
int LegoScore; //!< The amount of LEGO Score to reward the player
__int64 reward_reputation; //!< The reputation to award the player
int64_t reward_reputation; //!< The reputation to award the player
bool isChoiceReward; //!< Whether or not the user has the option to choose their loot
int reward_item1; //!< The first rewarded item
int reward_item1_count; //!< The count of the first item to be rewarded
@@ -40,7 +41,7 @@ struct CDMissions {
int reward_maxwidget; //!< ???
int reward_maxwallet; //!< ???
bool repeatable; //!< Whether or not this mission can be repeated (for instance, is it a daily mission)
__int64 reward_currency_repeatable; //!< The repeatable reward
int64_t reward_currency_repeatable; //!< The repeatable reward
int reward_item1_repeatable; //!< The first rewarded item
int reward_item1_repeat_count; //!< The count of the first item to be rewarded
int reward_item2_repeatable; //!< The second rewarded item
@@ -55,7 +56,7 @@ struct CDMissions {
std::string prereqMissionID; //!< A '|' seperated list of prerequisite missions
bool localize; //!< Whether or not to localize the mission
bool inMOTD; //!< In Match of the Day(?)
__int64 cooldownTime; //!< The mission cooldown time
int64_t cooldownTime; //!< The mission cooldown time
bool isRandom; //!< ???
std::string randomPool; //!< ???
int UIPrereqID; //!< ???