mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +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
|
|
@ -5173,7 +5173,10 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) {
|
|||
: ImVec4(0.4f, 0.9f, 1.0f, alpha);
|
||||
break;
|
||||
case game::CombatTextEntry::BLOCK:
|
||||
snprintf(text, sizeof(text), outgoing ? "Block" : "You Block");
|
||||
if (entry.amount > 0)
|
||||
snprintf(text, sizeof(text), outgoing ? "Block %d" : "You Block %d", entry.amount);
|
||||
else
|
||||
snprintf(text, sizeof(text), outgoing ? "Block" : "You Block");
|
||||
color = outgoing ? ImVec4(0.6f, 0.6f, 0.6f, alpha)
|
||||
: ImVec4(0.4f, 0.9f, 1.0f, alpha);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue