mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
feat: track and display honor/arena points from update fields
Add PLAYER_FIELD_HONOR_CURRENCY and PLAYER_FIELD_ARENA_CURRENCY to the update field system for WotLK (indices 1422/1423) and TBC (1505/1506). Parse values from both CREATE_OBJECT and VALUES update paths, and show them in the character Stats tab under a PvP Currency section.
This commit is contained in:
parent
0830215b31
commit
f88d90ee88
6 changed files with 50 additions and 0 deletions
|
|
@ -299,6 +299,10 @@ public:
|
|||
// Money (copper)
|
||||
uint64_t getMoneyCopper() const { return playerMoneyCopper_; }
|
||||
|
||||
// PvP currency (TBC/WotLK only)
|
||||
uint32_t getHonorPoints() const { return playerHonorPoints_; }
|
||||
uint32_t getArenaPoints() const { return playerArenaPoints_; }
|
||||
|
||||
// Server-authoritative armor (UNIT_FIELD_RESISTANCES[0])
|
||||
int32_t getArmorRating() const { return playerArmorRating_; }
|
||||
|
||||
|
|
@ -3067,6 +3071,8 @@ private:
|
|||
float pendingLootMoneyNotifyTimer_ = 0.0f;
|
||||
std::unordered_map<uint64_t, float> recentLootMoneyAnnounceCooldowns_;
|
||||
uint64_t playerMoneyCopper_ = 0;
|
||||
uint32_t playerHonorPoints_ = 0;
|
||||
uint32_t playerArenaPoints_ = 0;
|
||||
int32_t playerArmorRating_ = 0;
|
||||
int32_t playerResistances_[6] = {}; // [0]=Holy,[1]=Fire,[2]=Nature,[3]=Frost,[4]=Shadow,[5]=Arcane
|
||||
// Server-authoritative primary stats: [0]=STR [1]=AGI [2]=STA [3]=INT [4]=SPI; -1 = not received yet
|
||||
|
|
|
|||
|
|
@ -77,6 +77,10 @@ enum class UF : uint16_t {
|
|||
PLAYER_SPELL_CRIT_PERCENTAGE1, // Spell crit chance % (first school; 7 consecutive float fields)
|
||||
PLAYER_FIELD_COMBAT_RATING_1, // First of 25 int32 combat rating slots (CR_* indices)
|
||||
|
||||
// Player PvP currency (TBC/WotLK only — Classic uses the old weekly honor system)
|
||||
PLAYER_FIELD_HONOR_CURRENCY, // Accumulated honor points (uint32)
|
||||
PLAYER_FIELD_ARENA_CURRENCY, // Accumulated arena points (uint32)
|
||||
|
||||
// GameObject fields
|
||||
GAMEOBJECT_DISPLAYID,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue