Add shift-click spell linking to chat from spellbook

This commit is contained in:
Kelsi 2026-03-11 21:57:13 -07:00
parent 25c5d257ae
commit f5de4d2031
3 changed files with 36 additions and 3 deletions

View file

@ -54,6 +54,13 @@ public:
uint32_t getDragSpellId() const { return dragSpellId_; }
void consumeDragSpell() { draggingSpell_ = false; dragSpellId_ = 0; dragSpellIconTex_ = VK_NULL_HANDLE; }
/// Returns a WoW spell link string if the user shift-clicked a spell, then clears it.
std::string getAndClearPendingChatLink() {
std::string out = std::move(pendingChatSpellLink_);
pendingChatSpellLink_.clear();
return out;
}
private:
bool open = false;
bool pKeyWasDown = false;
@ -87,6 +94,9 @@ private:
uint32_t dragSpellId_ = 0;
VkDescriptorSet dragSpellIconTex_ = VK_NULL_HANDLE;
// Pending chat spell link from shift-click
std::string pendingChatSpellLink_;
void loadSpellDBC(pipeline::AssetManager* assetManager);
void loadSpellIconDBC(pipeline::AssetManager* assetManager);
void loadSkillLineDBCs(pipeline::AssetManager* assetManager);