Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 12 additions & 14 deletions spec/System/TestImportTab_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,18 @@ describe("ImportTab", function()
it("imports Split Personality alternate class start from character JSON", function()
local spec = build.spec
local socketNode = spec.nodes[60735]
local rangerStartPassive = spec.nodes[56651]
local templarStartPassive = spec.nodes[13855]
assert.is_not_nil(socketNode)
assert.is_not_nil(rangerStartPassive)
assert.is_not_nil(templarStartPassive)
assert.is_nil(spec.tree.classNameMap.Templar)
assert.are.equals(61525, spec.tree.classStartNodeNameMap.Templar)

local hashes = { socketNode.id, rangerStartPassive.id }
local hashes = { socketNode.id, templarStartPassive.id }
for _, pathNode in ipairs(socketNode.path or { }) do
table.insert(hashes, pathNode.id)
end

local rangerStart = spec.nodes[spec.tree.classes[spec.tree.classNameMap.Ranger].startNodeId]
local importPayload = {
build.importTab:ImportPassiveTreeAndJewels({
name = "Split Import Test",
class = "Witch2",
league = "Test",
Expand All @@ -73,7 +74,7 @@ describe("ImportTab", function()
ilvl = 84,
properties = { },
explicitMods = {
"Can Allocate Passive Skills from the Ranger's starting point",
"Can Allocate Passive Skills from the Templar's starting point",
},
},
},
Expand All @@ -84,17 +85,14 @@ describe("ImportTab", function()
jewel_data = { },
quest_stats = { },
},
}

build.importTab:ImportPassiveTreeAndJewels(importPayload)
})

local importedSpec = build.spec
local importedJewel = build.itemsTab.items[importedSpec.jewels[socketNode.id]]
assert.are.equals("Ranger", importedJewel.jewelData.alternateClassStart)

assert.are.equals(0, importedSpec.nodes[rangerStart.id].pathDist)
assert.True(importedSpec.nodes[rangerStartPassive.id].alloc)
assert.True(importedSpec.nodes[rangerStartPassive.id].connectedToStart)
assert.are.equals("Templar", importedJewel.jewelData.alternateClassStart)
assert.are.equals(0, importedSpec.nodes[spec.tree.classStartNodeNameMap.Templar].pathDist)
assert.True(importedSpec.nodes[templarStartPassive.id].alloc)
assert.True(importedSpec.nodes[templarStartPassive.id].connectedToStart)
end)
end)

Expand Down
4 changes: 2 additions & 2 deletions src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1231,8 +1231,8 @@ function PassiveSpecClass:BuildAllDependsAndPaths()
if self.allocNodes[socketNodeId] then
local item = self:GetJewel(itemId)
local className = item and item.jewelData.alternateClassStart
local classData = className and self.tree.classes[self.tree.classNameMap[className]]
local startNode = classData and self.nodes[classData.startNodeId]
local startNodeId = self.tree.classStartNodeNameMap[className]
local startNode = startNodeId and self.nodes[startNodeId]
if startNode then
alternateClassStartNodes[startNode.id] = startNode
end
Expand Down
2 changes: 2 additions & 0 deletions src/Classes/PassiveTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
self.ascendNameMap = { }
self.classIntegerIdMap = { }
self.internalAscendNameMap = { }
self.classStartNodeNameMap = { }
self.classNotables = { }

for classId, class in pairs(self.classes) do
Expand Down Expand Up @@ -203,6 +204,7 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
if node.classesStart then
node.type = "ClassStart"
for _, className in ipairs(node.classesStart) do
self.classStartNodeNameMap[className] = node.id
local class = self.classes[self.classNameMap[className]]
if class ~= nil then
class.startNodeId = node.id
Expand Down
4 changes: 4 additions & 0 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4899,7 +4899,11 @@ c["Buffs on you expire 10% slower"]={{[1]={[1]={skillType=5,type="SkillType"},fl
c["Bulwark"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",value="Bulwark"}},nil}
c["Burning Enemies you kill have a 5% chance to Explode, dealing a"]={nil,"Burning Enemies you kill have a 5% chance to Explode, dealing a "}
c["Burning Enemies you kill have a 5% chance to Explode, dealing a tenth of their maximum Life as Fire Damage"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Burning"},flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=10,keyOfScaledMod="value",type="Fire",value=5}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil}
c["Can Allocate Passive Skills from the Mercenary's starting point"]={{[1]={flags=0,keywordFlags=0,name="AlternateClassStart",type="LIST",value="Mercenary"}},nil}
c["Can Allocate Passive Skills from the Ranger's starting point"]={{[1]={flags=0,keywordFlags=0,name="AlternateClassStart",type="LIST",value="Ranger"}},nil}
c["Can Allocate Passive Skills from the Shadow's starting point"]={{[1]={flags=0,keywordFlags=0,name="AlternateClassStart",type="LIST",value="Shadow"}},nil}
c["Can Allocate Passive Skills from the Sorceress's starting point"]={{[1]={flags=0,keywordFlags=0,name="AlternateClassStart",type="LIST",value="Sorceress"}},nil}
c["Can Allocate Passive Skills from the Templar's starting point"]={{[1]={flags=0,keywordFlags=0,name="AlternateClassStart",type="LIST",value="Templar"}},nil}
c["Can Allocate Passive Skills from the Warrior's starting point"]={{[1]={flags=0,keywordFlags=0,name="AlternateClassStart",type="LIST",value="Warrior"}},nil}
c["Can Attack as though using a One Handed Mace while both of your hand slots are empty"]={{[1]={flags=0,keywordFlags=0,name="CanAttackAsOneHandMaceUnarmed",type="FLAG",value=true}},nil}
c["Can Attack as though using a Quarterstaff while both of your hand slots are empty"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty "}
Expand Down
18 changes: 18 additions & 0 deletions src/Data/Uniques/jewel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ Limited to: 3
{variant:1}+4% to all Elemental Resistances per socketed Grand Spectrum
{variant:2}+6% to all Elemental Resistances per socketed Grand Spectrum
]],[[
Split Personality
Ruby
Variant: Mercenary
Variant: Ranger
Variant: Shadow
Variant: Sorceress
Variant: Templar
Variant: Warrior
League: Runes of Aldur
Limited to: 1
{variant:2}Can Allocate Passive Skills from the Ranger's starting point
{variant:3}Can Allocate Passive Skills from the Shadow's starting point
{variant:4}Can Allocate Passive Skills from the Sorceress's starting point
{variant:6}Can Allocate Passive Skills from the Warrior's starting point
{variant:1}Can Allocate Passive Skills from the Mercenary's starting point
{variant:5}Can Allocate Passive Skills from the Templar's starting point
Corrupted
]],[[
Voices
Sapphire
Variant: 2 Sinister Sockets
Expand Down
18 changes: 18 additions & 0 deletions src/Export/Uniques/jewel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,24 @@ Limited to: 3
{variant:1}UniqueAllResistancePerStackableJewel1[4,4]
{variant:2}UniqueAllResistancePerStackableJewel1
]],[[
Split Personality
Ruby
Variant: Mercenary
Variant: Ranger
Variant: Shadow
Variant: Sorceress
Variant: Templar
Variant: Warrior
League: Runes of Aldur
Limited to: 1
{variant:1}UniqueJewelSplitPersonalityClassStart4
{variant:2}UniqueJewelSplitPersonalityClassStart2
{variant:3}UniqueJewelSplitPersonalityClassStart6
{variant:4}UniqueJewelSplitPersonalityClassStart3
{variant:5}UniqueJewelSplitPersonalityClassStart5
{variant:6}UniqueJewelSplitPersonalityClassStart1
Corrupted
]],[[
Voices
Sapphire
Variant: 2 Sinister Sockets
Expand Down
Loading