diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 34486b53..038f57f8 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -13548,7 +13548,12 @@ void GameHandler::handleSpellDamageLog(network::Packet& packet) { } auto type = data.isCrit ? CombatTextEntry::CRIT_DAMAGE : CombatTextEntry::SPELL_DAMAGE; - addCombatText(type, static_cast(data.damage), data.spellId, isPlayerSource); + if (data.damage > 0) + addCombatText(type, static_cast(data.damage), data.spellId, isPlayerSource); + if (data.absorbed > 0) + addCombatText(CombatTextEntry::ABSORB, static_cast(data.absorbed), data.spellId, isPlayerSource); + if (data.resisted > 0) + addCombatText(CombatTextEntry::RESIST, static_cast(data.resisted), data.spellId, isPlayerSource); } void GameHandler::handleSpellHealLog(network::Packet& packet) { @@ -13561,6 +13566,8 @@ void GameHandler::handleSpellHealLog(network::Packet& packet) { auto type = data.isCrit ? CombatTextEntry::CRIT_HEAL : CombatTextEntry::HEAL; addCombatText(type, static_cast(data.heal), data.spellId, isPlayerSource); + if (data.absorbed > 0) + addCombatText(CombatTextEntry::ABSORB, static_cast(data.absorbed), data.spellId, isPlayerSource); } // ============================================================ diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 4e8c29a5..5f213707 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -5204,11 +5204,17 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) { color = ImVec4(0.9f, 0.9f, 0.9f, alpha); // White for immune break; case game::CombatTextEntry::ABSORB: - snprintf(text, sizeof(text), "Absorb"); + if (entry.amount > 0) + snprintf(text, sizeof(text), "Absorbed %d", entry.amount); + else + snprintf(text, sizeof(text), "Absorbed"); color = ImVec4(0.5f, 0.8f, 1.0f, alpha); // Light blue for absorb break; case game::CombatTextEntry::RESIST: - snprintf(text, sizeof(text), "Resist"); + if (entry.amount > 0) + snprintf(text, sizeof(text), "Resisted %d", entry.amount); + else + snprintf(text, sizeof(text), "Resisted"); color = ImVec4(0.7f, 0.7f, 0.7f, alpha); // Grey for resist break; default: