mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: show partial absorb/resist amounts in spell combat text
handleSpellDamageLog now emits ABSORB/RESIST entries when data.absorbed or data.resisted are nonzero, so players see 'Absorbed 123' alongside damage numbers (e.g. vs. Power Word: Shield or Ice Barrier). handleSpellHealLog does the same for heal absorbs (e.g. Vampiric Embrace counter-absorbs). renderCombatText now formats amount when nonzero.
This commit is contained in:
parent
e902375763
commit
d2ae4d8215
2 changed files with 16 additions and 3 deletions
|
|
@ -13548,7 +13548,12 @@ void GameHandler::handleSpellDamageLog(network::Packet& packet) {
|
|||
}
|
||||
|
||||
auto type = data.isCrit ? CombatTextEntry::CRIT_DAMAGE : CombatTextEntry::SPELL_DAMAGE;
|
||||
addCombatText(type, static_cast<int32_t>(data.damage), data.spellId, isPlayerSource);
|
||||
if (data.damage > 0)
|
||||
addCombatText(type, static_cast<int32_t>(data.damage), data.spellId, isPlayerSource);
|
||||
if (data.absorbed > 0)
|
||||
addCombatText(CombatTextEntry::ABSORB, static_cast<int32_t>(data.absorbed), data.spellId, isPlayerSource);
|
||||
if (data.resisted > 0)
|
||||
addCombatText(CombatTextEntry::RESIST, static_cast<int32_t>(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<int32_t>(data.heal), data.spellId, isPlayerSource);
|
||||
if (data.absorbed > 0)
|
||||
addCombatText(CombatTextEntry::ABSORB, static_cast<int32_t>(data.absorbed), data.spellId, isPlayerSource);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue