Fix Gem dropdown tooltip not updating when hovering over gems (#9146)

The list was using the gemInstance of the top gem whenever you hovered over any of the gems to it never updated.
Used the same method as in PoB 2 with a slight difference to handle gem quality

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
This commit is contained in:
LocalIdentity
2025-11-03 12:03:26 +11:00
committed by GitHub
parent 18736464c9
commit dd56ab6e34

View File

@@ -480,7 +480,23 @@ function GemSelectClass:Draw(viewPort, noTooltip)
local calcFunc, calcBase = self.skillsTab.build.calcsTab:GetMiscCalculator(self.build)
if calcFunc then
self.tooltip:Clear()
local output, gemInstance = self:CalcOutputWithThisGem(calcFunc, self.gems[self.list[self.hoverSel]], self:GetQualityType(self.list[self.hoverSel]), self.skillsTab.sortGemsByDPSField == "FullDPS")
local gemData = self.gems[self.list[self.hoverSel]]
local qualityType = self:GetQualityType(self.list[self.hoverSel])
local output= self:CalcOutputWithThisGem(calcFunc, gemData, qualityType, self.skillsTab.sortGemsByDPSField == "FullDPS")
local gemInstance = {
level = self.skillsTab:ProcessGemLevel(gemData),
qualityId = qualityType,
quality = self.skillsTab.defaultGemQuality or 0,
count = 1,
enabled = true,
enableGlobal1 = true,
enableGlobal2 = true,
gemId = gemData.id,
nameSpec = gemData.name,
skillId = gemData.grantedEffectId,
displayEffect = nil,
gemData = gemData
}
self:AddGemTooltip(gemInstance)
self.tooltip:AddSeparator(10)
self.skillsTab.build:AddStatComparesToTooltip(self.tooltip, calcBase, output, "^7Selecting this gem will give you:")