diff --git a/CHANGELOG.md b/CHANGELOG.md index 66bd0eb1..9539298e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Hearth fire light no longer turns the surrounding brickwork orange. Local lights are unshadowed, so their radius is how far the glow reaches straight through whatever surrounds the fire; at 11 units a hearth lit its entire chimney from the inside out ### UI +- **Readable letter/note items resolve their `$`-tokens.** The item-text window drew the body raw, so a quest letter showed literal markup like "$g himself : herself;". It now runs the same placeholder replacer as quest and chat text, filling in gender ($g), player name ($n), line breaks ($b), and the rest - **The achievements window shows each achievement's real icon** instead of a gold star. Achievement.dbc's IconID (added to the DBC layout) resolves through SpellIcon.dbc to the artwork, rendered as a bordered 32px icon with the name and point value beside it; a star placeholder still fills the slot while an icon streams in or if it's missing - **Raid target markers never appeared on marked enemies.** Three separate faults stacked: `GameHandler` kept its own copy of the marks that nothing ever wrote, so the target frame, nameplates, minimap and party list all read zeros; the wire format was inverted, with the full list (which carries only the icons that are set, not a fixed eight) and the single-mark form (which leads with the setter's GUID on WotLK but not on classic or TBC) swapped; and the marks were drawn as text symbols the font has no code points for, so they rendered as '?' boxes. Marks now use Blizzard's icon artwork, floating above the unit as in the original client, and are covered by tests across both wire layouts - Solo players can set target markers. The server only broadcasts them to a group, so marking while ungrouped did nothing and the feature could not be used, or tested, without a second player. Grouped marking stays server-authoritative diff --git a/src/ui/dialog_manager.cpp b/src/ui/dialog_manager.cpp index 85f17882..f629896c 100644 --- a/src/ui/dialog_manager.cpp +++ b/src/ui/dialog_manager.cpp @@ -1,6 +1,7 @@ #include "ui/dialog_manager.hpp" #include "ui/inventory_screen.hpp" #include "ui/chat_panel.hpp" +#include "ui/chat/chat_utils.hpp" #include "ui/ui_colors.hpp" #include "game/game_handler.hpp" #include "core/application.hpp" @@ -178,9 +179,11 @@ void DialogManager::renderItemTextWindow(game::GameHandler& gameHandler) { return; } - // Parchment-toned background text + // Parchment-toned background text. Resolve WoW $-tokens ($g himself:herself, $n + // player name, $b line break, ...) the same way quest and chat text does. + std::string itemText = chat_utils::replaceGenderPlaceholders(gameHandler.getItemText(), gameHandler); ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.2f, 0.1f, 0.0f, 1.0f)); - ImGui::TextWrapped("%s", gameHandler.getItemText().c_str()); + ImGui::TextWrapped("%s", itemText.c_str()); ImGui::PopStyleColor(); ImGui::Spacing();