mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-23 05:02:48 +00:00
refactor(dashboard): routes name zones, objects and phrases through GameText
The routes' own zone name helpers and the CDClient's English zone and leaderboard header copies give way to GameText, so every name comes from the locale in the viewer's language; the Network page's world labels, mail, missions, leaderboards, item info (cached per language) and the settings/vanity help strings too. Reward code 4 and the plaque text name their zone from the locale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "Inspector.h"
|
||||
#include "GameText.h"
|
||||
#include "MasterPackets.h"
|
||||
|
||||
#include <chrono>
|
||||
@@ -114,9 +115,7 @@ namespace {
|
||||
}
|
||||
|
||||
std::string ZoneName(uint32_t zoneId) {
|
||||
const auto& zones = ZoneNames();
|
||||
const auto zone = std::to_string(zoneId);
|
||||
return zoneId == 0 ? "" : zones.contains(zone) ? zones[zone].get<std::string>() : "Zone " + zone;
|
||||
return zoneId == 0 ? "" : GameText::ZoneName(zoneId);
|
||||
}
|
||||
|
||||
// A session for the page; `state` is the live state, or "ended" for one only in the database
|
||||
|
||||
Reference in New Issue
Block a user