mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 00:40:15 +00:00
Implement SMSG_SPELLENERGIZELOG and fix missing combat text cases
Parse SPELLENERGIZELOG (victim/caster packed GUIDs + spellId + powerType + amount) and emit ENERGIZE combat text for mana/energy gains. Add ENERGIZE to CombatTextEntry::Type enum (blue +N text). Also add explicit renderCombatText cases for BLOCK, PERIODIC_DAMAGE, PERIODIC_HEAL, and ENVIRONMENTAL — previously all fell through to the colourless default handler.
This commit is contained in:
parent
22bc5954d7
commit
f1d31643fc
3 changed files with 43 additions and 2 deletions
|
|
@ -4470,6 +4470,29 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) {
|
|||
color = outgoing ? ImVec4(0.6f, 0.6f, 0.6f, alpha)
|
||||
: ImVec4(0.4f, 0.9f, 1.0f, alpha);
|
||||
break;
|
||||
case game::CombatTextEntry::BLOCK:
|
||||
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;
|
||||
case game::CombatTextEntry::PERIODIC_DAMAGE:
|
||||
snprintf(text, sizeof(text), "-%d", entry.amount);
|
||||
color = outgoing ?
|
||||
ImVec4(1.0f, 0.9f, 0.3f, alpha) : // Outgoing DoT = pale yellow
|
||||
ImVec4(1.0f, 0.4f, 0.4f, alpha); // Incoming DoT = pale red
|
||||
break;
|
||||
case game::CombatTextEntry::PERIODIC_HEAL:
|
||||
snprintf(text, sizeof(text), "+%d", entry.amount);
|
||||
color = ImVec4(0.4f, 1.0f, 0.5f, alpha);
|
||||
break;
|
||||
case game::CombatTextEntry::ENVIRONMENTAL:
|
||||
snprintf(text, sizeof(text), "-%d", entry.amount);
|
||||
color = ImVec4(0.9f, 0.5f, 0.2f, alpha); // Orange for environmental
|
||||
break;
|
||||
case game::CombatTextEntry::ENERGIZE:
|
||||
snprintf(text, sizeof(text), "+%d", entry.amount);
|
||||
color = ImVec4(0.3f, 0.6f, 1.0f, alpha); // Blue for mana/energy
|
||||
break;
|
||||
default:
|
||||
snprintf(text, sizeof(text), "%d", entry.amount);
|
||||
color = ImVec4(1.0f, 1.0f, 1.0f, alpha);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue