mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
fix: handle EVADE/IMMUNE/DEFLECT victimStates in melee combat text
SMSG_ATTACKERSTATEUPDATE victimState values 5 (EVADE), 6 (IMMUNE), and 7 (DEFLECT) were previously falling through to the damage display path, showing incorrect damage numbers instead of the proper miss/immune feedback. Now correctly shows MISS for evade/deflect and IMMUNE for immune hits.
This commit is contained in:
parent
1646bef1c2
commit
35683920ff
1 changed files with 9 additions and 0 deletions
|
|
@ -13517,6 +13517,15 @@ void GameHandler::handleAttackerStateUpdate(network::Packet& packet) {
|
|||
addCombatText(CombatTextEntry::PARRY, 0, 0, isPlayerAttacker);
|
||||
} else if (data.victimState == 4) {
|
||||
addCombatText(CombatTextEntry::BLOCK, 0, 0, isPlayerAttacker);
|
||||
} else if (data.victimState == 5) {
|
||||
// VICTIMSTATE_EVADE: NPC evaded (out of combat zone). Show as miss.
|
||||
addCombatText(CombatTextEntry::MISS, 0, 0, isPlayerAttacker);
|
||||
} else if (data.victimState == 6) {
|
||||
// VICTIMSTATE_IS_IMMUNE: Target is immune to this attack.
|
||||
addCombatText(CombatTextEntry::IMMUNE, 0, 0, isPlayerAttacker);
|
||||
} else if (data.victimState == 7) {
|
||||
// VICTIMSTATE_DEFLECT: Attack was deflected (e.g. shield slam reflect).
|
||||
addCombatText(CombatTextEntry::MISS, 0, 0, isPlayerAttacker);
|
||||
} else {
|
||||
auto type = data.isCrit() ? CombatTextEntry::CRIT_DAMAGE : CombatTextEntry::MELEE_DAMAGE;
|
||||
addCombatText(type, data.totalDamage, 0, isPlayerAttacker);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue