Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ function ImportTabClass:ImportItemsAndSkills(json)
end

local rarityMap = { [0] = "NORMAL", "MAGIC", "RARE", "UNIQUE", [9] = "RELIC", [10] = "RELIC" }
local slotMap = { ["Weapon"] = "Weapon 1", ["Offhand"] = "Weapon 2", ["Weapon2"] = "Weapon 1 Swap", ["Offhand2"] = "Weapon 2 Swap", ["Helm"] = "Helmet", ["BodyArmour"] = "Body Armour", ["Gloves"] = "Gloves", ["Boots"] = "Boots", ["Amulet"] = "Amulet", ["Ring"] = "Ring 1", ["Ring2"] = "Ring 2", ["Belt"] = "Belt" }
local slotMap = { ["Weapon"] = "Weapon 1", ["Offhand"] = "Weapon 2", ["Weapon2"] = "Weapon 1 Swap", ["Offhand2"] = "Weapon 2 Swap", ["Helm"] = "Helmet", ["BodyArmour"] = "Body Armour", ["Gloves"] = "Gloves", ["Boots"] = "Boots", ["Amulet"] = "Amulet", ["Ring"] = "Ring 1", ["Ring2"] = "Ring 2", ["Ring3"] = "Ring 3", ["Belt"] = "Belt" }

function ImportTabClass:ImportItem(itemData, slotName)
if not slotName then
Expand Down
4 changes: 4 additions & 0 deletions src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,10 @@ function ItemClass:BuildModList()
for i = 1, 2 do
self.slotModList[i] = self:BuildModListForSlotNum(baseList, i)
end
-- Ring 3
if self.type == "Ring" then
self.slotModList[3] = self:BuildModListForSlotNum(baseList, 3)
end
else
self.modList = self:BuildModListForSlotNum(baseList)
end
Expand Down
24 changes: 23 additions & 1 deletion src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ local socketDropList = {
{ label = colorCodes.SCION.."W", color = "W" }
}

local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }
local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Ring 3", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }

local influenceInfo = itemLib.influenceInfo.all

Expand Down Expand Up @@ -132,6 +132,18 @@ local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Contro
end
swapSlot.abyssalSocketList[i] = abyssal
end
elseif slotName == "Ring 3" then
slot.shown = function()
if self.build.calcsTab.mainEnv.modDB:Flag(nil, "AdditionalRingSlot") then
return true
-- need to clear out Ring 3 in case something was equipped when the mod was removed
else
slot.selIndex = 1
slot:SetSelItemId(0)
self.build.buildFlag = true
return false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, good catch on this, we'll want to port this to PoB2 as well. I do think we want a check in here that isn't going to set the buildFlag every time, because when we do that we unnecessarily peg the CPU rebuilding on every frame. Maybe check if there is anything in there first?

end
end
end
if slotName == "Weapon 1" or slotName == "Weapon 2" or slotName == "Helmet" or slotName == "Gloves" or slotName == "Body Armour" or slotName == "Boots" or slotName == "Belt" then
-- Add Abyssal Socket slots
Expand All @@ -148,6 +160,16 @@ local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Contro
slot.abyssalSocketList[i] = abyssal
end
end
-- Item Disabled Flags
slot.enabled = function()
if self.build.calcsTab.mainEnv.modDB:Flag(nil, "CanNotUse" .. slotName) then
slot.selIndex = 1
slot:SetSelItemId(0)
self.build.buildFlag = true
return false
end
return slot.enabled
end
end

-- Passive tree dropdown controls
Expand Down
1 change: 1 addition & 0 deletions src/Classes/SkillListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ local slot_map = {
["Amulet"] = { icon = NewImageHandle(), path = "Assets/icon_amulet.png" },
["Ring 1"] = { icon = NewImageHandle(), path = "Assets/icon_ring_left.png" },
["Ring 2"] = { icon = NewImageHandle(), path = "Assets/icon_ring_right.png" },
["Ring 3"] = { icon = NewImageHandle(), path = "Assets/icon_ring_right.png" },
["Belt"] = { icon = NewImageHandle(), path = "Assets/icon_belt.png" },
}

Expand Down
1 change: 1 addition & 0 deletions src/Classes/SkillsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local groupSlotDropList = {
{ label = "Amulet", slotName = "Amulet" },
{ label = "Ring 1", slotName = "Ring 1" },
{ label = "Ring 2", slotName = "Ring 2" },
{ label = "Ring 3", slotName = "Ring 3" },
{ label = "Belt", slotName = "Belt" },
}

Expand Down
2 changes: 1 addition & 1 deletion src/Classes/TradeQuery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local m_min = math.min
local m_ceil = math.ceil
local s_format = string.format

local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }
local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Ring 3", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }

local TradeQueryClass = newClass("TradeQuery", function(self, itemsTab)
self.itemsTab = itemsTab
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/TradeQueryGenerator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ function TradeQueryGeneratorClass:StartQuery(slot, options)
elseif slot.slotName == "Amulet" then
itemCategoryQueryStr = "accessory.amulet"
itemCategory = "Amulet"
elseif slot.slotName == "Ring 1" or slot.slotName == "Ring 2" then
elseif slot.slotName == "Ring 1" or slot.slotName == "Ring 2" or slot.slotName == "Ring 3" then
itemCategoryQueryStr = "accessory.ring"
itemCategory = "Ring"
elseif slot.slotName == "Belt" then
Expand Down
Loading
Loading