Fix talent system packet parsing and rank logic

- Parse SMSG_TALENTS_INFO with correct byte-for-byte structure:
  * Header: uint8 spec, uint8 unspent, be32 talentCount, be16 entryCount
  * Entries: entryCount × (le32 id + uint8 rank)
  * Glyphs: uint8 glyphSlots + glyphSlots × le16 glyphId
- Fix rank storage: store all talents from packet (rank 0 = first point)
- Fix UI rank logic: send rank 0 for new, rank+1 for upgrades
- Fix rank display: show (rank+1) for learned talents
- Add sanity checks: entryCount max 64, glyphSlots max 12
- Add network boundary logging for packet debugging
This commit is contained in:
Kelsi 2026-02-10 13:16:38 -08:00
parent e7556605d7
commit 3c13cf4b12
5 changed files with 141 additions and 31 deletions

View file

@ -1768,6 +1768,7 @@ struct TalentsInfoData {
uint8_t talentSpec = 0; // Active spec (0 or 1 for dual-spec)
uint8_t unspentPoints = 0; // Talent points available
std::vector<TalentInfo> talents; // Learned talents
std::vector<uint32_t> glyphs; // Glyph spell IDs
bool isValid() const { return true; }
};