diff --git a/Classes/ImportTab.lua b/Classes/ImportTab.lua index 9c396c37..8f81f876 100644 --- a/Classes/ImportTab.lua +++ b/Classes/ImportTab.lua @@ -460,27 +460,29 @@ function ImportTabClass:ImportSocketedSkills(item, socketedItems, slotName) -- Import the socket groups for _, itemSocketGroup in pairs(itemSocketGroupList) do -- Check if this socket group matches an existing one - local repIndex + local repGroup for index, socketGroup in pairs(self.build.skillsTab.socketGroupList) do if #socketGroup.gemList == #itemSocketGroup.gemList then local match = true for gemIndex, gem in pairs(socketGroup.gemList) do - if gem.nameSpec ~= itemSocketGroup.gemList[gemIndex].nameSpec then + if gem.nameSpec:lower() ~= itemSocketGroup.gemList[gemIndex].nameSpec:lower() then match = false break end end if match then - repIndex = index + repGroup = socketGroup break end end end - if repIndex then - -- Replace the existing one - itemSocketGroup.label = self.build.skillsTab.socketGroupList[repIndex].label - itemSocketGroup.enabled = self.build.skillsTab.socketGroupList[repIndex].enabled - self.build.skillsTab.socketGroupList[repIndex] = itemSocketGroup + if repGroup then + -- Update the existing one + for gemIndex, gem in pairs(repGroup.gemList) do + local itemGem = itemSocketGroup.gemList[gemIndex] + gem.level = itemGem.level + gem.quality = itemGem.quality + end else t_insert(self.build.skillsTab.socketGroupList, itemSocketGroup) end diff --git a/Classes/ItemSlotControl.lua b/Classes/ItemSlotControl.lua index 5dee9116..95ca87fe 100644 --- a/Classes/ItemSlotControl.lua +++ b/Classes/ItemSlotControl.lua @@ -55,17 +55,19 @@ function ItemSlotClass:Draw(viewPort) local width, height = self:GetSize() DrawString(x - 2, y + 2, "RIGHT_X", height - 4, "VAR", "^7"..self.label..":") self.DropDownControl:Draw() + local highlight = false for _, control in pairs({self.itemsTab.controls.itemList, self.itemsTab.controls.uniqueDB, self.itemsTab.controls.rareDB}) do if control:IsShown() and control.selDragging and control.selDragActive and self.itemsTab:IsItemValidForSlot(control.selItem, self.slotName) then + highlight = true SetDrawColor(0, 1, 0, 0.25) DrawImage(nil, x, y, width, height) break end end - if self.nodeId and (self.dropped or (self:IsMouseOver() and not self.itemsTab.selControl)) then + if self.nodeId and (self.dropped or (self:IsMouseOver() and (highlight or not self.itemsTab.selControl))) then SetDrawLayer(nil, 10) local viewerX = x + width + 5 - local viewerY = m_min(y, viewPort.y + viewPort.height - 300) + local viewerY = m_min(y, viewPort.y + viewPort.height - 304) SetDrawColor(1, 1, 1) DrawImage(nil, viewerX, viewerY, 304, 304) local viewer = self.itemsTab.socketViewer @@ -74,7 +76,7 @@ function ItemSlotClass:Draw(viewPort) viewer.zoomX = -node.x / 11.85 viewer.zoomY = -node.y / 11.85 SetViewport(viewerX + 2, viewerY + 2, 300, 300) - viewer:Draw(self.itemsTab.build, { x = 0, y = 0, width = 300, height = 300}, { }) + viewer:Draw(self.itemsTab.build, { x = 0, y = 0, width = 300, height = 300 }, { }) SetDrawColor(1, 1, 1, 0.1) DrawImage(nil, 149, 0, 2, 300) DrawImage(nil, 0, 149, 300, 2) diff --git a/Data/Gems/sup_int.lua b/Data/Gems/sup_int.lua index cac98f0c..17772c81 100644 --- a/Data/Gems/sup_int.lua +++ b/Data/Gems/sup_int.lua @@ -316,7 +316,7 @@ gems["Controlled Destruction"] = { [30] = { spell_damageMore = 1.54, }, } } -gems["Curse on Hit"] = { +gems["Curse On Hit"] = { intelligence = true, support = true, trigger = true, diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua index 3b34afb2..850e60e5 100644 --- a/Modules/Calcs.lua +++ b/Modules/Calcs.lua @@ -1528,8 +1528,8 @@ local function performCalcs(env, output) endWatch(env, "duration") end - -- Calculate trap and mine stats stats - if startWatch(env, "trapMine") then + -- Calculate trap, mine and totem stats + if startWatch(env, "trapMineTotem") then if env.skillFlags.trap then output.total_trapCooldown = getMiscVal(modDB, "skill", "trapCooldown", 4) / (1 + getMiscVal(modDB, nil, "trapCooldownRecoveryInc", 0) / 100) output.total_activeTrapLimit = sumMods(modDB, false, "activeTrapLimit") @@ -1537,7 +1537,10 @@ local function performCalcs(env, output) if env.skillFlags.mine then output.total_activeMineLimit = sumMods(modDB, false, "activeMineLimit") end - endWatch(env, "trapMine") + if env.skillFlags.totem then + output.totem_lifeMod = (1 + sumMods(modDB, false, "totemLifeInc") / 100) * sumMods(modDB, true, "totemLifeMore") + end + endWatch(env, "trapMineTotem") end -- Calculate enemy stun modifiers diff --git a/Modules/CalcsView.lua b/Modules/CalcsView.lua index 2e9b2212..b5678add 100644 --- a/Modules/CalcsView.lua +++ b/Modules/CalcsView.lua @@ -349,6 +349,9 @@ columns[7] = { }, { flag = "mine", { "output", "Active Mine Limit:", "total_activeMineLimit" }, + }, { + flag = "totem", + { "output", "Totem Life Mod:", "totem_lifeMod", formatPercent }, }, { flag = "dot", { "output", "Tree DoT Dmg %:", fieldNames("spec_dot", "Inc", "pfa") }, diff --git a/Modules/ModParser.lua b/Modules/ModParser.lua index 354af3b5..ae9496f4 100644 --- a/Modules/ModParser.lua +++ b/Modules/ModParser.lua @@ -532,7 +532,6 @@ local function getPerStat(dst, stat, factor) if nodeMods then data[stat] = (data[stat] or 0) + (nodeMods[stat] or 0) else - ConPrintf("%s %d %f", dst, data[stat], math.floor(data[stat] * factor + 0.5)) modLib.listMerge(out, dst, math.floor(data[stat] * factor + 0.5)) end end diff --git a/README.md b/README.md index ede29481..b9d76edc 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ 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.3 - 2016/09/26 + * Fixed issue causing certain skill setups to always be added when importing even if that skill is already in the build + * Re-importing a skill no longer resets gem's enabled states + ### 1.1.2 - 2016/09/20 * In the gem name dropdown list, support gems are now marked with a tick if they can apply to any of the active skills in the current socket group diff --git a/changelog.txt b/changelog.txt index 8ef9cb01..315680f6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +VERSION[1.1.3][2016/09/26] + * Fixed issue causing certain skill setups to always be added when importing even if that skill is already in the build + * Re-importing a skill no longer resets gem's enabled states VERSION[1.1.2][2016/09/20] * In the gem name dropdown list, support gems are now marked with a tick if they can apply to any of the active skills in the current socket group diff --git a/manifest.xml b/manifest.xml index b800b99d..92cf5d8c 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,13 @@ - + - + @@ -18,10 +18,10 @@ - + - + @@ -39,13 +39,13 @@ - - + + - + @@ -56,7 +56,7 @@ - +