mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 00:40:15 +00:00
feat: implement WotLK glyph display in talent screen
Store glyph IDs from SMSG_TALENTS_INFO (previously discarded) in learnedGlyphs_[2][6] per talent spec. Load GlyphProperties.dbc to map glyphId to spellId and major/minor type. Add a Glyphs tab to the talent screen showing all 6 slots with spell icons and names. Also clear vehicleId_ on SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA.
This commit is contained in:
parent
b7c1aa39a9
commit
882cb1bae3
4 changed files with 130 additions and 1 deletions
|
|
@ -706,6 +706,14 @@ public:
|
|||
static std::unordered_map<uint32_t, uint8_t> empty;
|
||||
return spec < 2 ? learnedTalents_[spec] : empty;
|
||||
}
|
||||
|
||||
// Glyphs (WotLK): up to 6 glyph slots per spec (3 major + 3 minor)
|
||||
static constexpr uint8_t MAX_GLYPH_SLOTS = 6;
|
||||
const std::array<uint16_t, MAX_GLYPH_SLOTS>& getGlyphs() const { return learnedGlyphs_[activeTalentSpec_]; }
|
||||
const std::array<uint16_t, MAX_GLYPH_SLOTS>& getGlyphs(uint8_t spec) const {
|
||||
static std::array<uint16_t, MAX_GLYPH_SLOTS> empty{};
|
||||
return spec < 2 ? learnedGlyphs_[spec] : empty;
|
||||
}
|
||||
uint8_t getTalentRank(uint32_t talentId) const {
|
||||
auto it = learnedTalents_[activeTalentSpec_].find(talentId);
|
||||
return (it != learnedTalents_[activeTalentSpec_].end()) ? it->second : 0;
|
||||
|
|
@ -2308,6 +2316,7 @@ private:
|
|||
uint8_t activeTalentSpec_ = 0; // Currently active spec (0 or 1)
|
||||
uint8_t unspentTalentPoints_[2] = {0, 0}; // Unspent points per spec
|
||||
std::unordered_map<uint32_t, uint8_t> learnedTalents_[2]; // Learned talents per spec
|
||||
std::array<std::array<uint16_t, MAX_GLYPH_SLOTS>, 2> learnedGlyphs_{}; // Glyphs per spec
|
||||
std::unordered_map<uint32_t, TalentEntry> talentCache_; // talentId -> entry
|
||||
std::unordered_map<uint32_t, TalentTabEntry> talentTabCache_; // tabId -> entry
|
||||
bool talentDbcLoaded_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue