From c4a19f46e4c32a92a34d7662d6820dfcbe01c4d7 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:20:00 -0600 Subject: [PATCH] fix loading wiki for granted skills from items and passives (#7309) --- src/Classes/SkillListControl.lua | 3 ++- src/Modules/ItemTools.lua | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Classes/SkillListControl.lua b/src/Classes/SkillListControl.lua index 9143b072f3..e2126f3841 100644 --- a/src/Classes/SkillListControl.lua +++ b/src/Classes/SkillListControl.lua @@ -171,7 +171,8 @@ function SkillListClass:OnHoverKeyUp(key) -- Get the first gem in the group local gem = item.gemList[1] if gem then - itemLib.wiki.openGem(gem.gemData) + -- either the skill is from a gem or granted from an item/passive + itemLib.wiki.openGem(gem.gemData or gem.grantedEffect.name) end elseif key == "RIGHTBUTTON" then if IsKeyDown("CTRL") then diff --git a/src/Modules/ItemTools.lua b/src/Modules/ItemTools.lua index 47851f012d..074955b00f 100644 --- a/src/Modules/ItemTools.lua +++ b/src/Modules/ItemTools.lua @@ -129,10 +129,14 @@ end itemLib.wiki = { key = "F1", openGem = function(gemData) - local name = gemData.name; - - if gemData.tags.support then - name = name .. " Support" + local name + if gemData.name then -- skill + name = gemData.name + if gemData.tags.support then + name = name .. " Support" + end + else -- grantedEffect from item/passive + name = gemData; end itemLib.wiki.open(name)