diff --git a/include/game/spell_defines.hpp b/include/game/spell_defines.hpp index a3944a0e..92deadd7 100644 --- a/include/game/spell_defines.hpp +++ b/include/game/spell_defines.hpp @@ -53,7 +53,7 @@ struct CombatTextEntry { MELEE_DAMAGE, SPELL_DAMAGE, HEAL, MISS, DODGE, PARRY, BLOCK, CRIT_DAMAGE, CRIT_HEAL, PERIODIC_DAMAGE, PERIODIC_HEAL, ENVIRONMENTAL, ENERGIZE, XP_GAIN, IMMUNE, ABSORB, RESIST, PROC_TRIGGER, - DISPEL, INTERRUPT + DISPEL, STEAL, INTERRUPT }; Type type; int32_t amount = 0; diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 7fc8fb55..d9bc93c5 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -6240,10 +6240,10 @@ void GameHandler::handlePacket(network::Packet& packet) { std::snprintf(buf, sizeof(buf), "%s was stolen.", stolenName.c_str()); 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) { bool isPlayerCaster = (stealCaster == playerGuid); - addCombatText(CombatTextEntry::DISPEL, 0, firstStolenId, isPlayerCaster, 0, + addCombatText(CombatTextEntry::STEAL, 0, firstStolenId, isPlayerCaster, 0, stealCaster, stealVictim); } } diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 2f30ee64..228b1b70 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -8397,6 +8397,14 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) { color = ImVec4(1.0f, 0.85f, 0.0f, alpha); // Gold for proc 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: snprintf(text, sizeof(text), "%d", entry.amount); 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); color = ImVec4(0.6f, 0.9f, 1.0f, 1.0f); 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: if (spell && e.isPlayerSource) snprintf(desc, sizeof(desc), "You interrupt %s's %s", tgt, spell);