Skip to content

Commit

Permalink
fix loading wiki for granted skills from items and passives (#7309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peechey authored Jan 25, 2024
1 parent 22d60bb commit c4a19f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Classes/SkillListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions src/Modules/ItemTools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c4a19f4

Please sign in to comment.