mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
feat: show blocked amount and reduced damage on VICTIMSTATE_BLOCKS
When an attack is partially blocked, the server sends the remaining damage in totalDamage and the blocked amount in data.blocked. Show both: the damage taken and a 'Block N' entry. When block amount is zero (full block with no damage), just show 'Block'.
This commit is contained in:
parent
d1c5e09127
commit
fb01361837
2 changed files with 8 additions and 2 deletions
|
|
@ -13543,7 +13543,10 @@ void GameHandler::handleAttackerStateUpdate(network::Packet& packet) {
|
|||
} else if (data.victimState == 2) {
|
||||
addCombatText(CombatTextEntry::PARRY, 0, 0, isPlayerAttacker);
|
||||
} else if (data.victimState == 4) {
|
||||
addCombatText(CombatTextEntry::BLOCK, 0, 0, isPlayerAttacker);
|
||||
// VICTIMSTATE_BLOCKS: show reduced damage and the blocked amount
|
||||
if (data.totalDamage > 0)
|
||||
addCombatText(CombatTextEntry::MELEE_DAMAGE, data.totalDamage, 0, isPlayerAttacker);
|
||||
addCombatText(CombatTextEntry::BLOCK, static_cast<int32_t>(data.blocked), 0, isPlayerAttacker);
|
||||
} else if (data.victimState == 5) {
|
||||
// VICTIMSTATE_EVADE: NPC evaded (out of combat zone). Show as miss.
|
||||
addCombatText(CombatTextEntry::MISS, 0, 0, isPlayerAttacker);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue