Removed some hardcoded logic for racing (#1075)

Including return world and what activity ID to use for rewards
This commit is contained in:
Aaron Kimbrell
2023-05-08 04:38:08 -05:00
committed by GitHub
parent 7e61638595
commit 8ceabadcde
6 changed files with 27 additions and 48 deletions

View File

@@ -12,6 +12,8 @@
#include "CDZoneTableTable.h"
#include <chrono>
#include "eObjectBits.h"
#include "CDZoneTableTable.h"
#include "AssetManager.h"
#include "../dWorldServer/ObjectIDManager.h"
@@ -227,6 +229,17 @@ uint32_t dZoneManager::GetUniqueMissionIdStartingValue() {
return m_UniqueMissionIdStart;
}
bool dZoneManager::CheckIfAccessibleZone(LWOMAPID zoneID) {
//We're gonna go ahead and presume we've got the db loaded already:
CDZoneTableTable* zoneTable = CDClientManager::Instance().GetTable<CDZoneTableTable>();
const CDZoneTable* zone = zoneTable->Query(zoneID);
if (zone != nullptr) {
return Game::assetManager->HasFile(("maps/" + zone->zoneName).c_str());
} else {
return false;
}
}
void dZoneManager::LoadWorldConfig() {
Game::logger->Log("dZoneManager", "Loading WorldConfig into memory");

View File

@@ -50,6 +50,7 @@ public:
Entity* GetZoneControlObject() { return m_ZoneControlObject; }
bool GetPlayerLoseCoinOnDeath() { return m_PlayerLoseCoinsOnDeath; }
uint32_t GetUniqueMissionIdStartingValue();
bool CheckIfAccessibleZone(LWOMAPID zoneID);
// The world config should not be modified by a caller.
const WorldConfig* GetWorldConfig() {