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.
This commit is contained in:
Kelsi 2026-03-17 14:26:10 -07:00
parent 5513c4aad5
commit b6ea78dfab

View file

@ -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())