feat: show spell name in proc trigger combat text when spellId is known

This commit is contained in:
Kelsi 2026-03-12 09:41:45 -07:00
parent aaae07e477
commit 84b31d3bbd

View file

@ -7081,10 +7081,15 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) {
snprintf(text, sizeof(text), "Resisted");
color = ImVec4(0.7f, 0.7f, 0.7f, alpha); // Grey for resist
break;
case game::CombatTextEntry::PROC_TRIGGER:
snprintf(text, sizeof(text), "PROC!");
case game::CombatTextEntry::PROC_TRIGGER: {
const std::string& procName = entry.spellId ? gameHandler.getSpellName(entry.spellId) : "";
if (!procName.empty())
snprintf(text, sizeof(text), "%s!", procName.c_str());
else
snprintf(text, sizeof(text), "PROC!");
color = ImVec4(1.0f, 0.85f, 0.0f, alpha); // Gold for proc
break;
}
default:
snprintf(text, sizeof(text), "%d", entry.amount);
color = ImVec4(1.0f, 1.0f, 1.0f, alpha);