mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 00:03:50 +00:00
fix(combatlog): distinguish spellsteal from dispel
This commit is contained in:
parent
a48eab43b8
commit
c45951b368
3 changed files with 22 additions and 3 deletions
|
|
@ -53,7 +53,7 @@ struct CombatTextEntry {
|
||||||
MELEE_DAMAGE, SPELL_DAMAGE, HEAL, MISS, DODGE, PARRY, BLOCK,
|
MELEE_DAMAGE, SPELL_DAMAGE, HEAL, MISS, DODGE, PARRY, BLOCK,
|
||||||
CRIT_DAMAGE, CRIT_HEAL, PERIODIC_DAMAGE, PERIODIC_HEAL, ENVIRONMENTAL,
|
CRIT_DAMAGE, CRIT_HEAL, PERIODIC_DAMAGE, PERIODIC_HEAL, ENVIRONMENTAL,
|
||||||
ENERGIZE, XP_GAIN, IMMUNE, ABSORB, RESIST, PROC_TRIGGER,
|
ENERGIZE, XP_GAIN, IMMUNE, ABSORB, RESIST, PROC_TRIGGER,
|
||||||
DISPEL, INTERRUPT
|
DISPEL, STEAL, INTERRUPT
|
||||||
};
|
};
|
||||||
Type type;
|
Type type;
|
||||||
int32_t amount = 0;
|
int32_t amount = 0;
|
||||||
|
|
|
||||||
|
|
@ -6240,10 +6240,10 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
std::snprintf(buf, sizeof(buf), "%s was stolen.", stolenName.c_str());
|
std::snprintf(buf, sizeof(buf), "%s was stolen.", stolenName.c_str());
|
||||||
addSystemChatMessage(buf);
|
addSystemChatMessage(buf);
|
||||||
}
|
}
|
||||||
// Add dispel/steal to combat log using DISPEL type (isStolen=true for steals)
|
// Preserve spellsteal as a distinct event so the UI wording stays accurate.
|
||||||
if (firstStolenId != 0) {
|
if (firstStolenId != 0) {
|
||||||
bool isPlayerCaster = (stealCaster == playerGuid);
|
bool isPlayerCaster = (stealCaster == playerGuid);
|
||||||
addCombatText(CombatTextEntry::DISPEL, 0, firstStolenId, isPlayerCaster, 0,
|
addCombatText(CombatTextEntry::STEAL, 0, firstStolenId, isPlayerCaster, 0,
|
||||||
stealCaster, stealVictim);
|
stealCaster, stealVictim);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8397,6 +8397,14 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) {
|
||||||
color = ImVec4(1.0f, 0.85f, 0.0f, alpha); // Gold for proc
|
color = ImVec4(1.0f, 0.85f, 0.0f, alpha); // Gold for proc
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case game::CombatTextEntry::DISPEL:
|
||||||
|
snprintf(text, sizeof(text), "Dispel");
|
||||||
|
color = ImVec4(0.6f, 0.9f, 1.0f, alpha);
|
||||||
|
break;
|
||||||
|
case game::CombatTextEntry::STEAL:
|
||||||
|
snprintf(text, sizeof(text), "Spellsteal");
|
||||||
|
color = ImVec4(0.8f, 0.7f, 1.0f, alpha);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
snprintf(text, sizeof(text), "%d", entry.amount);
|
snprintf(text, sizeof(text), "%d", entry.amount);
|
||||||
color = ImVec4(1.0f, 1.0f, 1.0f, alpha);
|
color = ImVec4(1.0f, 1.0f, 1.0f, alpha);
|
||||||
|
|
@ -20276,6 +20284,17 @@ void GameScreen::renderCombatLog(game::GameHandler& gameHandler) {
|
||||||
snprintf(desc, sizeof(desc), "%s dispels from %s", src, tgt);
|
snprintf(desc, sizeof(desc), "%s dispels from %s", src, tgt);
|
||||||
color = ImVec4(0.6f, 0.9f, 1.0f, 1.0f);
|
color = ImVec4(0.6f, 0.9f, 1.0f, 1.0f);
|
||||||
break;
|
break;
|
||||||
|
case T::STEAL:
|
||||||
|
if (spell && e.isPlayerSource)
|
||||||
|
snprintf(desc, sizeof(desc), "You steal %s from %s", spell, tgt);
|
||||||
|
else if (spell)
|
||||||
|
snprintf(desc, sizeof(desc), "%s steals %s from %s", src, spell, tgt);
|
||||||
|
else if (e.isPlayerSource)
|
||||||
|
snprintf(desc, sizeof(desc), "You steal from %s", tgt);
|
||||||
|
else
|
||||||
|
snprintf(desc, sizeof(desc), "%s steals from %s", src, tgt);
|
||||||
|
color = ImVec4(0.8f, 0.7f, 1.0f, 1.0f);
|
||||||
|
break;
|
||||||
case T::INTERRUPT:
|
case T::INTERRUPT:
|
||||||
if (spell && e.isPlayerSource)
|
if (spell && e.isPlayerSource)
|
||||||
snprintf(desc, sizeof(desc), "You interrupt %s's %s", tgt, spell);
|
snprintf(desc, sizeof(desc), "You interrupt %s's %s", tgt, spell);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue