diff --git a/CHANGELOG.md b/CHANGELOG.md index 73bbd94d..42e8a219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.12.3](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v2.12.3) (2021/10/28) + +[Full Changelog](https://github.com/PathOfBuildingCommunity/PathOfBuilding/compare/v2.12.2...v2.12.3) + +**Fixed bugs:** + +- Fix crash when importing/opening builds ([LocalIdentity](https://github.com/LocalIdentity)) + ## [2.12.2](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v2.12.2) (2021/10/28) [Full Changelog](https://github.com/PathOfBuildingCommunity/PathOfBuilding/compare/v2.12.1...v2.12.2) diff --git a/changelog.txt b/changelog.txt index eba7947c..a254ccd5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +VERSION[2.12.3][2021/10/28] + +* Fix crash when importing/opening builds (LocalIdentity) + VERSION[2.12.2][2021/10/28] * Fix crash when using Blood Magic Keystone (LocalIdentity) diff --git a/manifest.xml b/manifest.xml index 0f2ab516..6972113f 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,6 +1,6 @@ - + @@ -10,7 +10,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/src/Classes/ModStore.lua b/src/Classes/ModStore.lua index 500989bf..82d122ef 100644 --- a/src/Classes/ModStore.lua +++ b/src/Classes/ModStore.lua @@ -222,7 +222,7 @@ function ModStoreClass:GetStat(stat, cfg) if stat == "ManaUnreserved" and self.actor.output[stat] ~= self.actor.output[stat] then -- 0% reserved = total mana return self.actor.output["Mana"] - elseif self.actor.output["Mana"] > 0 and stat == "ManaUnreserved" and self.actor.output[stat] < 0 then + elseif stat == "ManaUnreserved" and not self.actor.output[stat] == nil and self.actor.output[stat] < 0 then -- This reverse engineers how much mana is unreserved before efficiency for accurate Arcane Cloak calcs local reservedPercentBeforeEfficiency = (math.abs(self.actor.output["ManaUnreservedPercent"]) + 100) * ((100 + self.actor["ManaEfficiency"]) / 100) return self.actor.output["Mana"] * (math.ceil(reservedPercentBeforeEfficiency) / 100);