From 19623833179b288940c3fa7cc6f6dad14dd7f704 Mon Sep 17 00:00:00 2001 From: Openarl Date: Wed, 30 May 2018 23:55:48 +1000 Subject: [PATCH] Release 1.4.89 - Added 3.2 -> 3.3 tree Shadow migration --- CHANGELOG.md | 3 +++ Classes/PassiveSpec.lua | 19 ++++++++++++++++++- changelog.txt | 2 ++ manifest.xml | 6 +++--- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6df43c66a..cd694dea9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.4.89 - 2018/05/31 + * 3.2 Shadow passive trees will now migrate to 3.3 without a full reset + ### 1.4.88 - 2018/05/30 * Sorting unique flasks by DPS now works correctly * Fixed issue where Slavedriver's Hand was granting Blood Magic to all skills diff --git a/Classes/PassiveSpec.lua b/Classes/PassiveSpec.lua index 4bc6f017b..f100fe97a 100644 --- a/Classes/PassiveSpec.lua +++ b/Classes/PassiveSpec.lua @@ -13,6 +13,14 @@ local m_min = math.min local m_max = math.max local m_floor = math.floor +local nodeMigrate32_33 = { + [17788] = 38129, + [38807] = 63639, + [5607] = 62069, + [61547] = 31583, + [29619] = 1600, +} + local PassiveSpecClass = common.NewClass("PassiveSpec", "UndoHandler", function(self, build) self.UndoHandler() @@ -96,11 +104,20 @@ function PassiveSpecClass:Save(xml) self.modFlag = false end +function PassiveSpecClass:MigrateNodeId(nodeId) + if self.build.targetVersion == "3_0" then + -- Migration for 3.2 -> 3.3 + return nodeMigrate32_33[nodeId] or nodeId + end + return nodeId +end + -- Import passive spec from the provided class IDs and node hash list function PassiveSpecClass:ImportFromNodeList(classId, ascendClassId, hashList) self:ResetNodes() self:SelectClass(classId) for _, id in pairs(hashList) do + id = self:MigrateNodeId(id) local node = self.nodes[id] if node then node.alloc = true @@ -152,7 +169,7 @@ function PassiveSpecClass:DecodeURL(url) self:ResetNodes() self:SelectClass(classId) for i = 1, #nodes - 1, 2 do - local id = nodes:byte(i) * 256 + nodes:byte(i + 1) + local id = self:MigrateNodeId(nodes:byte(i) * 256 + nodes:byte(i + 1)) local node = self.nodes[id] if node then node.alloc = true diff --git a/changelog.txt b/changelog.txt index 02ee0eca8..6e1eec318 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,5 @@ +VERSION[1.4.89][2018/05/31] + * 3.2 Shadow passive trees will now migrate to 3.3 without a full reset VERSION[1.4.88][2018/05/30] * Sorting unique flasks by DPS now works correctly * Fixed issue where Slavedriver's Hand was granting Blood Magic to all skills diff --git a/manifest.xml b/manifest.xml index f04edd330..cc1d0c763 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,13 @@ - + - + @@ -35,7 +35,7 @@ - +