mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: add HONOR_GAIN floating combat text for PvP honor gains
Show '+X Honor' floating text in gold when SMSG_PVP_CREDIT is received, matching WoW's native behavior. Also add HONOR_GAIN to the combat log panel for a complete record. Previously only a chat message was added.
This commit is contained in:
parent
b6ea78dfab
commit
8b57e6fa45
3 changed files with 11 additions and 1 deletions
|
|
@ -8631,6 +8631,10 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) {
|
|||
color = outgoing ? ImVec4(1.0f, 0.25f, 0.25f, alpha)
|
||||
: ImVec4(1.0f, 0.1f, 0.1f, alpha);
|
||||
break;
|
||||
case game::CombatTextEntry::HONOR_GAIN:
|
||||
snprintf(text, sizeof(text), "+%d Honor", entry.amount);
|
||||
color = ImVec4(1.0f, 0.85f, 0.0f, alpha); // Gold for honor
|
||||
break;
|
||||
default:
|
||||
snprintf(text, sizeof(text), "%d", entry.amount);
|
||||
color = ImVec4(1.0f, 1.0f, 1.0f, alpha);
|
||||
|
|
@ -20723,6 +20727,10 @@ void GameScreen::renderCombatLog(game::GameHandler& gameHandler) {
|
|||
snprintf(desc, sizeof(desc), "%s instantly kills %s", src, tgt);
|
||||
color = ImVec4(1.0f, 0.2f, 0.2f, 1.0f);
|
||||
break;
|
||||
case T::HONOR_GAIN:
|
||||
snprintf(desc, sizeof(desc), "You gain %d honor", e.amount);
|
||||
color = ImVec4(1.0f, 0.85f, 0.0f, 1.0f);
|
||||
break;
|
||||
default:
|
||||
snprintf(desc, sizeof(desc), "Combat event (type %d, amount %d)", (int)e.type, e.amount);
|
||||
color = ImVec4(0.7f, 0.7f, 0.7f, 1.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue