mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
game,ui: add rest state tracking and rested XP bar overlay
- Track PLAYER_REST_STATE_EXPERIENCE update field for all expansions (WotLK=636, Classic=718, TBC=928, Turtle=718) - Set isResting_ flag from SMSG_SET_REST_START packet - XP bar shows rested bonus as a lighter purple overlay extending beyond the current fill to (currentXp + restedXp) position - Tooltip text changes to "%u / %u XP (+%u rested)" when bonus exists - "zzz" indicator shown at bar right edge while resting
This commit is contained in:
parent
0ea8e55ad4
commit
2a9d26e1ea
8 changed files with 49 additions and 8 deletions
|
|
@ -640,6 +640,8 @@ public:
|
|||
// XP tracking
|
||||
uint32_t getPlayerXp() const { return playerXp_; }
|
||||
uint32_t getPlayerNextLevelXp() const { return playerNextLevelXp_; }
|
||||
uint32_t getPlayerRestedXp() const { return playerRestedXp_; }
|
||||
bool isPlayerResting() const { return isResting_; }
|
||||
uint32_t getPlayerLevel() const { return serverPlayerLevel_; }
|
||||
const std::vector<uint32_t>& getPlayerExploredZoneMasks() const { return playerExploredZones_; }
|
||||
bool hasPlayerExploredZoneMasks() const { return hasPlayerExploredZones_; }
|
||||
|
|
@ -2199,6 +2201,8 @@ private:
|
|||
// ---- XP tracking ----
|
||||
uint32_t playerXp_ = 0;
|
||||
uint32_t playerNextLevelXp_ = 0;
|
||||
uint32_t playerRestedXp_ = 0;
|
||||
bool isResting_ = false;
|
||||
uint32_t serverPlayerLevel_ = 1;
|
||||
static uint32_t xpForLevel(uint32_t level);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ enum class UF : uint16_t {
|
|||
PLAYER_BYTES_2,
|
||||
PLAYER_XP,
|
||||
PLAYER_NEXT_LEVEL_XP,
|
||||
PLAYER_REST_STATE_EXPERIENCE,
|
||||
PLAYER_FIELD_COINAGE,
|
||||
PLAYER_QUEST_LOG_START,
|
||||
PLAYER_FIELD_INV_SLOT_HEAD,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue