fix(ui): resolve map 0 name and allow guild queries at character screen

getMapName() returned empty for mapId 0 (Eastern Kingdoms) due to an
early return guard. Remove it since 0 is a valid map ID.

queryGuildInfo() required IN_WORLD state but the character screen is at
CHAR_LIST_RECEIVED. The server accepts CMSG_GUILD_QUERY before login,
so just check for a connected socket.
This commit is contained in:
Kelsi 2026-04-05 04:30:32 -07:00
parent 2e30490fc5
commit 535ae8aa89
2 changed files with 3 additions and 2 deletions

View file

@ -7104,7 +7104,6 @@ void GameHandler::loadMapNameCache() const {
}
std::string GameHandler::getMapName(uint32_t mapId) const {
if (mapId == 0) return {};
loadMapNameCache();
auto it = mapNameCache_.find(mapId);
return (it != mapNameCache_.end()) ? it->second : std::string{};