Handle BLOCK (victimState 4) in melee hit combat text

Block rolls previously fell through to the damage case and were shown as
a 0-damage hit.  Now correctly emitted as a BLOCK combat text entry, which
renderCombatText already handles with 'Block' / 'You Block' label.
This commit is contained in:
Kelsi 2026-03-09 17:10:57 -07:00
parent 068deabb0e
commit 6e03866b56

View file

@ -11744,12 +11744,14 @@ void GameHandler::handleAttackerStateUpdate(network::Packet& packet) {
addCombatText(CombatTextEntry::DODGE, 0, 0, isPlayerAttacker);
} else if (data.victimState == 2) {
addCombatText(CombatTextEntry::PARRY, 0, 0, isPlayerAttacker);
} else if (data.victimState == 4) {
addCombatText(CombatTextEntry::BLOCK, 0, 0, isPlayerAttacker);
} else {
auto type = data.isCrit() ? CombatTextEntry::CRIT_DAMAGE : CombatTextEntry::MELEE_DAMAGE;
addCombatText(type, data.totalDamage, 0, isPlayerAttacker);
}
(void)isPlayerTarget; // Used for future incoming damage display
(void)isPlayerTarget;
}
void GameHandler::handleSpellDamageLog(network::Packet& packet) {