diff --git a/src/core/application.cpp b/src/core/application.cpp index 8919256b..e3a4a9e1 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -2954,6 +2954,21 @@ void Application::render() { map->setScreenRect(mm->left * sc, io.DisplaySize.y - (mm->bottom + mm->rectH) * sc, mm->rectW * sc, mm->rectH * sc); + + // The zoom buttons move a number on the frame, and the + // map has to be told: Minimap:SetZoom is the interface + // saying what it wants, not the map changing. Five + // levels as WoW has them, zero furthest out. + static int appliedZoom = -1; + if (mm->zoomLevel != appliedZoom) { + appliedZoom = mm->zoomLevel; + static const float kRadius[5] = { + 800.0f, 620.0f, 460.0f, 320.0f, 200.0f + }; + const int lvl = (mm->zoomLevel < 0) ? 0 + : (mm->zoomLevel > 4 ? 4 : mm->zoomLevel); + map->setViewRadius(kRadius[lvl]); + } } else { map->clearScreenRect(); } diff --git a/src/game/game_handler_callbacks.cpp b/src/game/game_handler_callbacks.cpp index 2d3b2202..f9f753f8 100644 --- a/src/game/game_handler_callbacks.cpp +++ b/src/game/game_handler_callbacks.cpp @@ -926,6 +926,25 @@ void GameHandler::handleLoginVerifyWorld(network::Packet& packet) { if (initialWorldEntry) { fireAddonEvent("PLAYER_LOGIN", {}); } + + // The player's own values, said again now. + // + // Every UNIT_ event this client sends is a change notice: it fires when + // an update block carries a different number. That is right for keeping + // a frame current and useless for filling one in, because a frame built + // before the player existed has missed every one of them and nothing + // will change health or level just because someone is looking. The + // original interface fills its unit frames on PLAYER_ENTERING_WORLD for + // exactly this reason, and it reads the current values rather than the + // event's — so the event alone is enough, and this is where it belongs. + for (const char* what : {"UNIT_HEALTH", "UNIT_MAXHEALTH", "UNIT_LEVEL", + "UNIT_DISPLAYPOWER", "UNIT_MANA", "UNIT_MAXMANA", + "UNIT_RAGE", "UNIT_MAXRAGE", "UNIT_ENERGY", + "UNIT_MAXENERGY", "UNIT_FOCUS", "UNIT_MAXFOCUS", + "UNIT_NAME_UPDATE", "UNIT_FACTION"}) { + fireAddonEvent(what, {"player"}); + } + fireAddonEvent("PLAYER_XP_UPDATE", {"player"}); } } diff --git a/src/ui/framexml_takeover.cpp b/src/ui/framexml_takeover.cpp index cb14f8cb..d2d173d7 100644 --- a/src/ui/framexml_takeover.cpp +++ b/src/ui/framexml_takeover.cpp @@ -143,7 +143,9 @@ std::vector frameXmlCheckFrames() { {UiElement::WorldMap, "WorldMapFrame WorldMapDetailFrame WorldMapButton " "WorldMapZoneMinimapDropDown"}, {UiElement::CharacterFrame, "CharacterFrame PaperDollFrame CharacterModelFrame " - "CharacterNameText CharacterHeadSlot"}, + "CharacterNameText CharacterHeadSlot " + "CharacterResistanceFrame CharacterAttributesFrame " + "MagicResFrame1 CharacterMainHandSlot"}, {UiElement::Bags, "ContainerFrame1 ContainerFrame1Item1 " "ContainerFrame1Name"}, {UiElement::Spellbook, "SpellBookFrame SpellButton1 SpellBookSkillLineTab1"},