From fc7d9036a695c415d000df80ef50c93bfe7c69ce Mon Sep 17 00:00:00 2001 From: Openarl Date: Sun, 2 Oct 2016 22:50:15 +1000 Subject: [PATCH] Release 1.16 - Fixed bug with jewel attribute totals --- Classes/ItemsTab.lua | 7 ++++--- Classes/PassiveTreeView.lua | 2 +- Modules/Calcs.lua | 6 +++++- README.md | 3 +++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Classes/ItemsTab.lua b/Classes/ItemsTab.lua index 8c0752b2..b04490cf 100644 --- a/Classes/ItemsTab.lua +++ b/Classes/ItemsTab.lua @@ -438,13 +438,14 @@ function ItemsTabClass:AddItemTooltip(item, slot, dbMode) if item.jewelRadiusIndex then main:AddTooltipLine(16, "^x7F7F7FRadius: ^7"..data.jewelRadius[item.jewelRadiusIndex].label) end - if item.jewelRadiusData then + if item.jewelRadiusData and slot and item.jewelRadiusData[slot.nodeId] then + local radiusData = item.jewelRadiusData[slot.nodeId] local line local labels = { "Str", "Dex", "Int" } local codes = { data.colorCodes.MARAUDER, data.colorCodes.RANGER, data.colorCodes.WITCH } for i, stat in ipairs({"strBase","dexBase","intBase"}) do - if item.jewelRadiusData[stat] and item.jewelRadiusData[stat] ~= 0 then - line = (line and line .. ", " or "") .. s_format("%s%d %s^7", codes[i], item.jewelRadiusData[stat], labels[i]) + if radiusData[stat] and radiusData[stat] ~= 0 then + line = (line and line .. ", " or "") .. s_format("%s%d %s^7", codes[i], radiusData[stat], labels[i]) end end if line then diff --git a/Classes/PassiveTreeView.lua b/Classes/PassiveTreeView.lua index 032db0b9..45804c61 100644 --- a/Classes/PassiveTreeView.lua +++ b/Classes/PassiveTreeView.lua @@ -485,7 +485,7 @@ function PassiveTreeViewClass:AddNodeTooltip(node, build) if node.type == "socket" and node.alloc then local socket, jewel = build.itemsTab:GetSocketAndJewelForNodeID(node.id) if jewel then - build.itemsTab:AddItemTooltip(jewel) + build.itemsTab:AddItemTooltip(jewel, { nodeId = node.id }) else main:AddTooltipLine(24, "^7"..node.dn..(launch.devMode and IsKeyDown("ALT") and " ["..node.id.."]" or "")) end diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua index 6bbb78b3..30150df5 100644 --- a/Modules/Calcs.lua +++ b/Modules/Calcs.lua @@ -347,7 +347,10 @@ local function buildNodeModList(env, nodeList, finishJewels) for _, rad in pairs(env.radiusJewelList) do rad.func(nil, modList, rad.data) if env.mode == "MAIN" then - rad.item.jewelRadiusData = rad.data + if not rad.item.jewelRadiusData then + rad.item.jewelRadiusData = { } + end + rad.item.jewelRadiusData[rad.nodeId] = rad.data end end end @@ -567,6 +570,7 @@ local function mergeMainMods(env, repSlotName, repItem) y = node.y, func = func, item = item, + nodeId = slot.nodeId, data = { } }) end diff --git a/README.md b/README.md index 94f39ea9..8f719226 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,9 @@ Head over to the [Releases](https://github.com/Openarl/PathOfBuilding/releases) ![ss3](https://cloud.githubusercontent.com/assets/19189971/18089780/f0ff234a-6f04-11e6-8c88-6193fe59a5c4.png) ## Changelog +### 1.1.6 - 2016/10/02 + * Fixed bug causing issues with the new jewel attribute totals when a jewel is used multiple times + ### 1.1.5 - 2016/10/01 * Jewel tooltips now show totals for any relevant attributes (Str, Dex, Int) allocated within their radius * For example, Eldritch Knowledge shows Intelligence, and Spire of Stone shows Strength