From b6ea78dfabdcf43e65329a4649ec8d627a3b2374 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 17 Mar 2026 14:26:10 -0700 Subject: [PATCH] fix: show spell name in REFLECT floating combat text REFLECT entries already stored the reflected spell ID but the floating text display showed only "Reflected"/"You Reflect" without the name. Now shows "Reflected: Fireball" or "Reflect: Frost Nova", matching the pattern already used by INTERRUPT, DISPEL, and STEAL entries. --- src/ui/game_screen.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 771a1ba2..c2cee9da 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -8574,11 +8574,16 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) { color = outgoing ? ImVec4(0.7f, 0.7f, 0.7f, alpha) : ImVec4(0.5f, 0.9f, 1.0f, alpha); break; - case game::CombatTextEntry::REFLECT: - snprintf(text, sizeof(text), outgoing ? "Reflected" : "You Reflect"); + case game::CombatTextEntry::REFLECT: { + const std::string& reflectName = entry.spellId ? gameHandler.getSpellName(entry.spellId) : ""; + if (!reflectName.empty()) + snprintf(text, sizeof(text), outgoing ? "Reflected: %s" : "Reflect: %s", reflectName.c_str()); + else + snprintf(text, sizeof(text), outgoing ? "Reflected" : "You Reflect"); color = outgoing ? ImVec4(0.85f, 0.75f, 1.0f, alpha) : ImVec4(0.75f, 0.85f, 1.0f, alpha); break; + } case game::CombatTextEntry::PROC_TRIGGER: { const std::string& procName = entry.spellId ? gameHandler.getSpellName(entry.spellId) : ""; if (!procName.empty())