feat: add reputation bar above XP bar

Show a color-coded reputation progress bar for the most recently gained
faction above the XP bar. The bar is auto-shown when any faction rep
changes (watchedFactionId_ tracks the last changed faction). Colors
follow WoW conventions: red=Hated/Hostile, orange=Unfriendly,
yellow=Neutral, green=Friendly, blue=Honored, purple=Revered,
gold=Exalted. Tooltip shows exact standing values on hover.
This commit is contained in:
Kelsi 2026-03-12 05:03:03 -07:00
parent 0a03bf9028
commit 29a989e1f4
4 changed files with 126 additions and 0 deletions

View file

@ -1270,6 +1270,8 @@ public:
const std::vector<FactionStandingInit>& getInitialFactions() const { return initialFactions_; }
const std::unordered_map<uint32_t, int32_t>& getFactionStandings() const { return factionStandings_; }
const std::string& getFactionNamePublic(uint32_t factionId) const;
uint32_t getWatchedFactionId() const { return watchedFactionId_; }
void setWatchedFactionId(uint32_t id) { watchedFactionId_ = id; }
uint32_t getLastContactListMask() const { return lastContactListMask_; }
uint32_t getLastContactListCount() const { return lastContactListCount_; }
bool isServerMovementAllowed() const { return serverMovementAllowed_; }
@ -2636,6 +2638,7 @@ private:
// ---- Reputation change callback ----
RepChangeCallback repChangeCallback_;
uint32_t watchedFactionId_ = 0; // auto-set to most recently changed faction
// ---- Quest completion callback ----
QuestCompleteCallback questCompleteCallback_;

View file

@ -281,6 +281,7 @@ private:
void renderActionBar(game::GameHandler& gameHandler);
void renderBagBar(game::GameHandler& gameHandler);
void renderXpBar(game::GameHandler& gameHandler);
void renderRepBar(game::GameHandler& gameHandler);
void renderCastBar(game::GameHandler& gameHandler);
void renderMirrorTimers(game::GameHandler& gameHandler);
void renderCombatText(game::GameHandler& gameHandler);