mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Fix missions re-ordering on reload (#686)
* Fix missions re-ordering on reload Check for success rather than failure * Add a comment * Get base value from database * Update Mission.h
This commit is contained in:
@@ -240,3 +240,12 @@ std::vector<Spawner*> dZoneManager::GetSpawnersInGroup(std::string group) {
|
||||
|
||||
return spawnersInGroup;
|
||||
}
|
||||
|
||||
uint32_t dZoneManager::GetUniqueMissionIdStartingValue() {
|
||||
if (m_UniqueMissionIdStart == 0) {
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Missions WHERE isMission = 0 GROUP BY isMission;");
|
||||
m_UniqueMissionIdStart = tableData.getIntField(0, -1);
|
||||
tableData.finalize();
|
||||
}
|
||||
return m_UniqueMissionIdStart;
|
||||
}
|
||||
|
@@ -43,6 +43,7 @@ public:
|
||||
void Update(float deltaTime);
|
||||
Entity* GetZoneControlObject() { return m_ZoneControlObject; }
|
||||
bool GetPlayerLoseCoinOnDeath() { return m_PlayerLoseCoinsOnDeath; }
|
||||
uint32_t GetUniqueMissionIdStartingValue();
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -55,6 +56,11 @@ private:
|
||||
*/
|
||||
int32_t m_CurrencyConversionRate = 0;
|
||||
|
||||
/**
|
||||
* The starting unique mission ID.
|
||||
*/
|
||||
uint32_t m_UniqueMissionIdStart = 0;
|
||||
|
||||
static dZoneManager* m_Address; //Singleton
|
||||
Zone* m_pZone;
|
||||
LWOZONEID m_ZoneID;
|
||||
|
Reference in New Issue
Block a user