Added upgrade function to change wrath epic gem settings to cataclysm epic
Kevin Lyles [01-10-11 - 04:04]
Added upgrade function to change wrath epic gem settings to cataclysm epic
Updated to version 1.4r3
diff --git a/Upgrade.lua b/Upgrade.lua
index 2b860d3..f9d50cf 100644
--- a/Upgrade.lua
+++ b/Upgrade.lua
@@ -55,6 +55,15 @@ local function noop_major_up(vars)
return vars
end
+local function upgradeAccountToCataclysmGems(vars)
+ if vars.options.gems.qualityLimit == 7 then
+ vars.options.gems.qualityLimit = 10
+ end
+
+ vars.dataMinorVersion = 24
+ return vars
+end
+
local function upgradeAccountToMeleeCrit(vars)
for _, class in ipairs(vars.weightsList) do
for _, weight in ipairs(vars.weightsList[class]) do
@@ -1039,6 +1048,7 @@ local upgradeAccountFunctions = {
[20] = upgradeAccountToNewClassNameDisplayOptions,
[21] = upgradeAccountToMastery,
[22] = upgradeAccountToMeleeCrit,
+ [23] = upgradeAccountToCataclysmGems,
},
}
@@ -1079,6 +1089,7 @@ local downgradeAccountFunctions = {
[21] = downgradeAccountFromNewClassNameDisplayOptions,
[22] = noop_down,
[23] = noop_down,
+ [24] = noop_down,
},
}
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index ac832ba..3bb515d 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -803,7 +803,7 @@ end
function WeightsWatcher.bestGemForSocket(socketColor, weightScale, qualityLimit)
local bestGem, bestWeight, weight = {}, 0
if not qualityLimit then
- qualityLimit = #(ww_gems["Normal"])
+ qualityLimit = #(ww_gemQualityNames)
end
for gemSource, gems in pairs(ww_gems) do
diff --git a/WeightsWatcher.toc b/WeightsWatcher.toc
index 2491e5f..0a20847 100644
--- a/WeightsWatcher.toc
+++ b/WeightsWatcher.toc
@@ -2,7 +2,7 @@
## Title: Weights Watcher
## Notes: Ranks gear according to customizable stat weights
## Author: The Flying Squirrels
-## Version: 1.4r2
+## Version: 1.4r3
## OptionalDeps: AtlasLoot
## SavedVariables: ww_vars
## SavedVariablesPerCharacter: ww_charVars
diff --git a/defaults.lua b/defaults.lua
index bda38d6..a06a8ba 100644
--- a/defaults.lua
+++ b/defaults.lua
@@ -192,7 +192,7 @@ ww_classNameOptions = {
ww_defaultVars = {
dataMajorVersion = 1,
- dataMinorVersion = 23,
+ dataMinorVersion = 24,
weightsList = {
"DEATHKNIGHT",
"DRUID",
@@ -715,7 +715,7 @@ ww_defaultVars = {
},
options = {
gems = {
- qualityLimit = 7,
+ qualityLimit = 10,
breakSocketColors = true,
neverBreakSocketColors = false,
types = {