Added logic to Convert UScore to Coins for Level 45 Characters (#348)

This commit is contained in:
David Markowitz
2022-02-02 22:50:02 -08:00
committed by GitHub
parent dac8ec621c
commit 13980c4133
8 changed files with 54 additions and 16 deletions

View File

@@ -118,6 +118,24 @@ LWOZONEID dZoneManager::GetZoneID() const
return m_ZoneID;
}
uint32_t dZoneManager::GetMaxLevel() {
if (m_MaxLevel == 0) {
auto tableData = CDClientDatabase::ExecuteQuery("SELECT LevelCap FROM WorldConfig WHERE WorldConfigID = 1 LIMIT 1;");
m_MaxLevel = tableData.getIntField(0, -1);
tableData.finalize();
}
return m_MaxLevel;
}
int32_t dZoneManager::GetLevelCapCurrencyConversion() {
if (m_CurrencyConversionRate == 0) {
auto tableData = CDClientDatabase::ExecuteQuery("SELECT LevelCapCurrencyConversion FROM WorldConfig WHERE WorldConfigID = 1 LIMIT 1;");
m_CurrencyConversionRate = tableData.getIntField(0, -1);
tableData.finalize();
}
return m_CurrencyConversionRate;
}
void dZoneManager::Update(float deltaTime) {
for (auto spawner : m_Spawners) {
spawner.second->Update(deltaTime);