mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 08:30:13 +00:00
fix: show friendly map names on loading screen (Outland not Expansion01)
Add mapDisplayName() with friendly names for continents: "Eastern Kingdoms", "Kalimdor", "Outland", "Northrend". The loading screen previously showed WDT directory names like "Expansion01" when Map.dbc's localized name field was empty or matched the internal name.
This commit is contained in:
parent
9a6a430768
commit
891b9e5822
2 changed files with 24 additions and 7 deletions
|
|
@ -97,6 +97,7 @@ private:
|
|||
void spawnPlayerCharacter();
|
||||
std::string getPlayerModelPath() const;
|
||||
static const char* mapIdToName(uint32_t mapId);
|
||||
static const char* mapDisplayName(uint32_t mapId);
|
||||
void loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float z);
|
||||
void buildFactionHostilityMap(uint8_t playerRace);
|
||||
pipeline::M2Model loadCreatureM2Sync(const std::string& m2Path);
|
||||
|
|
|
|||
|
|
@ -87,6 +87,17 @@ bool envFlagEnabled(const char* key, bool defaultValue = false) {
|
|||
} // namespace
|
||||
|
||||
|
||||
const char* Application::mapDisplayName(uint32_t mapId) {
|
||||
// Friendly display names for the loading screen
|
||||
switch (mapId) {
|
||||
case 0: return "Eastern Kingdoms";
|
||||
case 1: return "Kalimdor";
|
||||
case 530: return "Outland";
|
||||
case 571: return "Northrend";
|
||||
default: return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
const char* Application::mapIdToName(uint32_t mapId) {
|
||||
// Fallback when Map.dbc is unavailable. Names must match WDT directory names
|
||||
// (case-insensitive — AssetManager lowercases all paths).
|
||||
|
|
@ -4468,13 +4479,18 @@ void Application::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
|||
window->swapBuffers();
|
||||
};
|
||||
|
||||
// Set zone name on loading screen from Map.dbc
|
||||
if (gameHandler) {
|
||||
std::string mapDisplayName = gameHandler->getMapName(mapId);
|
||||
if (!mapDisplayName.empty())
|
||||
loadingScreen.setZoneName(mapDisplayName);
|
||||
else
|
||||
loadingScreen.setZoneName("Loading...");
|
||||
// Set zone name on loading screen — prefer friendly display name, then DBC
|
||||
{
|
||||
const char* friendly = mapDisplayName(mapId);
|
||||
if (friendly) {
|
||||
loadingScreen.setZoneName(friendly);
|
||||
} else if (gameHandler) {
|
||||
std::string dbcName = gameHandler->getMapName(mapId);
|
||||
if (!dbcName.empty())
|
||||
loadingScreen.setZoneName(dbcName);
|
||||
else
|
||||
loadingScreen.setZoneName("Loading...");
|
||||
}
|
||||
}
|
||||
|
||||
showProgress("Entering world...", 0.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue