diff --git a/GemIds.lua b/GemIds.lua
index f23f437..3a7c8a9 100644
--- a/GemIds.lua
+++ b/GemIds.lua
@@ -2939,12 +2939,12 @@ GemIds = {
[3162] = {
"meta",
"Potent Unstable Diamond",
- {["attack power"] = 24, ["stun resistance (percent)"] = 5},
+ {["attack power"] = 24, ["stun resist chance (percent)"] = 5},
},
[3163] = {
"meta",
"Imbued Unstable Diamond",
- {["spell power"] = 14, ["stun resistance (percent)"] = 5},
+ {["spell power"] = 14, ["stun resist chance (percent)"] = 5},
},
},
[4] = {
diff --git a/Regexps.lua b/Regexps.lua
index 59c0be8..7cb634a 100644
--- a/Regexps.lua
+++ b/Regexps.lua
@@ -1384,7 +1384,7 @@ SingleStatLines = {
},
{"^(%d+)%% stun resistance$",
function(text, pattern)
- return WeightsWatcher.singleStatValueOnly(text, pattern, "stun resistance (percent)")
+ return WeightsWatcher.singleStatValueOnly(text, pattern, "stun resist chance (percent)")
end,
{"generic"},
},
diff --git a/Upgrade.lua b/Upgrade.lua
index 45a48d2..6f92854 100644
--- a/Upgrade.lua
+++ b/Upgrade.lua
@@ -135,6 +135,36 @@ function noop_major_up(vars)
return vars
end
+function upgradeAccountToFixStunResistChance(vars)
+ for _, class in ipairs(vars.weightsList) do
+ for _, weight in ipairs(vars.weightsList[class]) do
+ if weight["stun resistance (percent)"] ~= nil then
+ weight["stun resist chance (percent)"] = weight["stun resistance (percent)"]
+ weight["stun resistance (percent)"] = nil
+ end
+ end
+ end
+
+ vars.dataMinorVersion = 14
+ return vars
+end
+
+downgradeAccountFromFixStunResistChance = [[
+ return function(vars)
+ for _, class in ipairs(vars.weightsList) do
+ for _, weight in ipairs(vars.weightsList[class]) do
+ if weight["stun resist chance (percent)"] ~= nil then
+ weight["stun resistance (percent)"] = weight["stun resist chance (percent)"]
+ weight["stun resist chance (percent)"] = nil
+ end
+ end
+ end
+
+ vars.dataMinorVersion = 13
+ return vars
+ end
+]]
+
function upgradeAccountToDebugKey(vars)
if vars.options.tooltip.showDebugInfo == nil then
vars.options.tooltip.showDebugInfo = "Never"
@@ -869,6 +899,7 @@ upgradeAccountFunctions = {
[10] = upgradeAccountToUseEffectRatio,
[11] = upgradeAccountToTriggers,
[12] = upgradeAccountToDebugKey,
+ [13] = upgradeAccountToFixStunResistChance,
},
}
@@ -899,6 +930,7 @@ downgradeAccountFunctions = {
[11] = noop_down,
[12] = downgradeAccountFromTriggers,
[13] = noop_down,
+ [14] = downgradeAccountFromFixStunResistChance,
},
}
diff --git a/defaults.lua b/defaults.lua
index e7f65ca..3868e6d 100644
--- a/defaults.lua
+++ b/defaults.lua
@@ -72,7 +72,7 @@ trackedStats = {
"Spell Damage Taken Reduction (Percent)",
"Spell Reflect (Percent)",
"Stun Duration Reduction (Percent)",
- "Stun Resistance (Percent)",
+ "Stun Resist Chance (Percent)",
"Threat (Percent)",
"Threat Reduction (Percent)",
},
@@ -186,7 +186,7 @@ statNames = {
["spell damage taken reduction (percent)"] = "Spell Damage Taken Reduction (Percent)",
["spell reflect (percent)"] = "Spell Reflect (Percent)",
["stun duration reduction (percent)"] = "Stun Duration Reduction (Percent)",
- ["stun resistance (percent)"] = "Stun Resistance (Percent)",
+ ["stun resist chance (percent)"] = "Stun Resist Chance (Percent)",
["threat reduction (percent)"] = "Threat Reduction (Percent)",
["arcane resistance"] = "Arcane Resistance",
["fire resistance"] = "Fire Resistance",
@@ -232,7 +232,7 @@ classNameOptions = {
defaultVars = {
dataMajorVersion = 1,
- dataMinorVersion = 13,
+ dataMinorVersion = 14,
weightsList = {
[1] = "DEATHKNIGHT",
[2] = "DRUID",