feat: show zone entry text on every zone crossing via SMSG_INIT_WORLD_STATES

Previously the "Entering: [Zone]" overlay only triggered when the terrain
renderer loaded a new map. Now it also fires whenever worldStateZoneId_
changes (sent by the server via SMSG_INIT_WORLD_STATES on each zone
crossing), giving correct "Entering: Ironforge", "Entering: Wailing
Caverns" etc. display for sub-zones and dungeon entries without requiring
a full map reload.

- Added lastKnownWorldStateZoneId_ to track server-reported zone changes
- renderZoneText() now takes GameHandler& to access getWorldStateZoneId()
  and getWhoAreaName() for name lookup via WorldMapArea.dbc cache
- Renderer zone name still checked as a fallback for map-level transitions
- Both sources de-duplicate to avoid triggering the same text twice
This commit is contained in:
Kelsi 2026-03-17 19:14:17 -07:00
parent 4a439fb0d1
commit f9947300da
2 changed files with 23 additions and 6 deletions

View file

@ -634,7 +634,8 @@ private:
float zoneTextTimer_ = 0.0f;
std::string zoneTextName_;
std::string lastKnownZoneName_;
void renderZoneText();
uint32_t lastKnownWorldStateZoneId_ = 0;
void renderZoneText(game::GameHandler& gameHandler);
void renderWeatherOverlay(game::GameHandler& gameHandler);
// Cooldown tracker