From dd7a562f9dbb25159236cc758671c64ad18f869b Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Thu, 10 Dec 2009 15:58:44 -0600 Subject: [PATCH] Changed many meta gem effect names, made sure all meta gems had the proper effect names --- GemIds.lua | 74 ++++++++++++++++++++++++++-------------------------- Upgrade.lua | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ defaults.lua | 33 +++++++++++------------ 3 files changed, 136 insertions(+), 53 deletions(-) diff --git a/GemIds.lua b/GemIds.lua index e332ead..a5e90f1 100644 --- a/GemIds.lua +++ b/GemIds.lua @@ -350,13 +350,13 @@ GemIds = { "Meta", "Destructive Skyfire Diamond", 3, - {{"Critical Strike Rating", 14}, {"Spell Reflect Percent", 1}}, + {{"Critical Strike Rating", 14}, {"Spell Reflect (Percent)", 1}}, }, [2828] = { "Meta", "Mystical Skyfire Diamond", 3, - {{"Chance to Increase Spell Cast Speed", 1}}, + {{"Chance to Increase Spell Haste", 1}}, }, [2829] = { "Meta", @@ -368,19 +368,19 @@ GemIds = { "Meta", "Egnimatic Skyfire Diamond", 3, - {{"Critical Strike Rating", 12}, {"Snare/Root Duration Percent", -10}}, + {{"Critical Strike Rating", 12}, {"Snare/Root Duration Reduction (Percent)", 10}}, }, [2831] = { "Meta", "Powerful Earthstorm Diamond", 3, - {{"Stamina", 18}, {"Stun Duration Percent", -15}}, + {{"Stamina", 18}, {"Stun Duration Reduction (Percent)", 15}}, }, [2832] = { "Meta", "Bracing Earthstorm Diamond", 3, - {{"Spell Power", 14}, {"Threat Percent", -2}}, + {{"Spell Power", 14}, {"Threat Reduction (Percent)", 2}}, }, [2833] = { "Meta", @@ -398,7 +398,7 @@ GemIds = { "Meta", "Insightful Earthstorm Diamond", 3, - {{"Intellect", 12}, {"Chance to restore mana on spellcast", 1}}, + {{"Intellect", 12}, {"Chance to Restore Mana on Spellcast", 1}}, }, [2891] = { "Yellow", @@ -1204,13 +1204,13 @@ GemIds = { "Meta", "Relentless Earthstorm Diamond", 3, - {{"Agility", 12}, {"Critical Damage Percent", 3}}, + {{"Agility", 12}, {"Critical Damage (Percent)", 3}}, }, [3155] = { "Meta", "Thundering Skyfire Diamond", 3, - {{"Chance to Increase Melee/Ranged Attack Speed", 1}}, + {{"Chance to Increase Physical Haste", 1}}, }, [3156] = { "Purple", @@ -1252,13 +1252,13 @@ GemIds = { "Meta", "Potent Unstable Diamond", 3, - {{"Attack Power", 24}, {"Stun Resistance Percent", 5}}, + {{"Attack Power", 24}, {"Stun Resistance (Percent)", 5}}, }, [3163] = { "Meta", "Imbued Unstable Diamond", 3, - {{"Spell Power", 14}, {"Stun Resistance Percent", 5}}, + {{"Spell Power", 14}, {"Stun Resistance (Percent)", 5}}, }, [3197] = { "Green", @@ -1374,7 +1374,7 @@ GemIds = { "Meta", "Chaotic Skyfire Diamond", 3, - {{"Critical Strike Rating", 12}, {"Critical Damage Percent", 3}}, + {{"Critical Strike Rating", 12}, {"Critical Damage (Percent)", 3}}, }, [3262] = { "Blue", @@ -1410,13 +1410,13 @@ GemIds = { "Meta", "Eternal Earthstorm Diamond", 3, - {{"Defense Rating", 12}, {"Block Value Percent", 5}}, + {{"Defense Rating", 12}, {"Block Value (Percent)", 5}}, }, [3275] = { "Meta", "Ember Skyfire Diamond", 3, - {{"Spell Power", 14}, {"Intellect Percent", 2}}, + {{"Spell Power", 14}, {"Intellect (Percent)", 2}}, }, [3276] = { "Red", @@ -2846,25 +2846,25 @@ GemIds = { "Meta", "Chaotic Skyflare Diamond", 8, - {{"Critical Strike Rating", 21}, {"Critical Damage Percent", 3}}, + {{"Critical Strike Rating", 21}, {"Critical Damage (Percent)", 3}}, }, [3622] = { "Meta", "Destructive Skyflare Diamond", 8, - {{"Critical Strike Rating", 25}, {"Spell Reflect Percent", 1}}, + {{"Critical Strike Rating", 25}, {"Spell Reflect (Percent)", 1}}, }, [3623] = { "Meta", "Ember Skyflare Diamond", 8, - {{"Spell Power", 25}, {"Intellect Percent", 2}}, + {{"Spell Power", 25}, {"Intellect (Percent)", 2}}, }, [3624] = { "Meta", "Egnimatic Skyflare Diamond", 8, - {{"Critical Strike Rating", 21}, {"Snare/Root Duration Percent", -10}}, + {{"Critical Strike Rating", 21}, {"Snare/Root Duration Reduction (Percent)", 10}}, }, [3625] = { "Meta", @@ -2876,25 +2876,25 @@ GemIds = { "Meta", "Bracing Earthsiege Diamond", 8, - {{"Spell Power", 25}, {"Threat Percent", -2}}, + {{"Spell Power", 25}, {"Threat Reduction (Percent)", 2}}, }, [3627] = { "Meta", "Insightful Earthsiege Diamond", 8, - {{"Intellect", 21}, {"Chance to restore mana on spellcast", 1}}, + {{"Intellect", 21}, {"Chance to Restore Mana on Spellcast", 1}}, }, [3628] = { "Meta", "Relentless Earthsiege Diamond", 8, - {{"Agility", 21}, {"Critical Damage Percent", 3}}, + {{"Agility", 21}, {"Critical Damage (Percent)", 3}}, }, [3631] = { "Meta", "Eternal Earthsiege Diamond", 8, - {{"Defense Rating", 21}, {"Block Value Percent", 5}}, + {{"Defense Rating", 21}, {"Block Value (Percent)", 5}}, }, [3632] = { "Meta", @@ -2906,43 +2906,43 @@ GemIds = { "Meta", "Revitalizing Skyflare Diamond", 8, - {{"MP5", 11}, {"Critical Healing Percent", 3}}, + {{"MP5", 11}, {"Critical Healing (Percent)", 3}}, }, [3634] = { "Meta", "Effulgent Skyflare Diamond", 8, - {{"Stamina", 32}, {"Spell Damage Taken Percent", -2}}, + {{"Stamina", 32}, {"Spell Damage Taken Reduction (Percent)", 2}}, }, [3635] = { "Meta", "Forlorn Skyflare Diamond", 8, - {{"Spell Power", 25}, {"Silence Duration Percent", -10}}, + {{"Spell Power", 25}, {"Silence Duration Reduction (Percent)", 10}}, }, [3636] = { "Meta", "Impassive Skyflare Diamond", 8, - {{"Critical Strike Rating", 21}, {"Fear Duration Percent", -10}}, + {{"Critical Strike Rating", 21}, {"Fear Duration Reduction (Percent)", 10}}, }, [3637] = { "Meta", "Austere Earthsiege Diamond", 8, - {{"Stamina", 32}, {"Armor from Items Percent", 2}}, + {{"Stamina", 32}, {"Armor from Items (Percent)", 2}}, }, [3638] = { "Meta", "Persistent Earthsiege Diamond", 8, - {{"Attack Power", 42}, {"Stun Duration Percent", -10}}, + {{"Attack Power", 42}, {"Stun Duration Reduction (Percent)", 10}}, }, [3639] = { "Meta", "Trenchant Earthsiege Diamond", 8, - {{"Spell Power", 25}, {"Stun Duration Percent", -10}}, + {{"Spell Power", 25}, {"Stun Duration Reduction (Percent)", 10}}, }, [3640] = { "Meta", @@ -2954,19 +2954,19 @@ GemIds = { "Meta", "Beaming Earthsiege Diamond", 8, - {{"Critical Strike Rating", 21}, {"Mana Percent", 2}}, + {{"Critical Strike Rating", 21}, {"Mana (Percent)", 2}}, }, [3642] = { "Meta", "Powerful Earthsiege Diamond", 8, - {{"Stamina", 32}, {"Stun Duration Percent", -10}}, + {{"Stamina", 32}, {"Stun Duration Reduction (Percent)", 10}}, }, [3643] = { "Meta", "Thundering Skyflare Diamond", 8, - {{"Chance to Increase Melee/Ranged Attack Speed", 1}}, + {{"Chance to Increase Physical Haste", 1}}, }, [3644] = { "Red", @@ -3530,37 +3530,37 @@ GemIds = { "Meta", "Impassive Starflare Diamond", 8, - {{"Critical Strike Rating", 17}, {"Fear Duration Percent", -10}}, + {{"Critical Strike Rating", 17}, {"Fear Duration Reduction (Percent)", 10}}, }, [3801] = { "Meta", "Egnimatic Starflare Diamond", 8, - {{"Critical Strike Rating", 17}, {"Snare/Root Duration Percent", -10}}, + {{"Critical Strike Rating", 17}, {"Snare/Root Duration Reduction (Percent)", 10}}, }, [3802] = { "Meta", "Forlorn Starflare Diamond", 8, - {{"Spell Power", 20}, {"Silence Duration Percent", -10}}, + {{"Spell Power", 20}, {"Silence Duration Reduction (Percent)", 10}}, }, [3803] = { "Meta", "Persistent Earthshatter Diamond", 8, - {{"Attack Power", 34}, {"Stun Duration Percent", -10}}, + {{"Attack Power", 34}, {"Stun Duration Reduction (Percent)", 10}}, }, [3804] = { "Meta", "Powerful Earthshatter Diamond", 8, - {{"Stamina", 26}, {"Stun Duration Percent", -10}}, + {{"Stamina", 26}, {"Stun Duration Reduction (Percent)", 10}}, }, [3805] = { "Meta", "Trenchant Earthshatter Diamond", 8, - {{"Spell Power", 20}, {"Stun Duration Percent", -10}}, + {{"Spell Power", 20}, {"Stun Duration Reduction (Percent)", 10}}, }, [3861] = { "Red", diff --git a/Upgrade.lua b/Upgrade.lua index 8bec6fd..4097f46 100644 --- a/Upgrade.lua +++ b/Upgrade.lua @@ -135,6 +135,84 @@ function noop_major_up(vars) return vars end +function upgradeAccountToBetterMetaEffectNames(vars) + local newName + local conversion = { + ["armor from items percent"] = "armor from items (percent)", + ["block value percent"] = "block value (percent)", + ["chance to increase melee/ranged attack speed"] = "chance to increase physical haste", + ["chance to increase spell cast speed"] = "chance to increase spell haste", + ["critical damage percent"] = "critical damage (percent)", + ["critical healing percent"] = "critical healing (percent)", + ["fear duration reduction percent"] = "fear duration reduction (percent)", + ["silence duration reduction percent"] = "silence duration reduction (percent)", + ["snare/root duration reduction percent"] = "snare/root duration reduction (percent)", + ["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)", + ["threat percent"] = false, + ["threat reduction percent"] = "threat reduction (percent)", + } + + for _, class in ipairs(vars.weightsList) do + for _, weight in ipairs(vars.weightsList[class]) do + for stat, value in pairs(vars.weightsList[class][weight]) do + newName = conversion[stat] + -- Don't touch unchanged stat names, clear deleted stat names + if newName ~= nil then + vars.weightsList[class][weight][stat] = nil + end + -- move the value to the new stat name + if newName then + vars.weightsList[class][weight][newName] = value + end + end + end + end + + vars.dataMinorVersion = 1 + return vars +end + +downgradeAccountFromBetterMetaEffectNames = [[ + return function (vars) + local newName + local conversion = { + ["armor from items (percent)"] = "armor from items percent", + ["block value (percent)"] = "block value percent", + ["chance to increase physical haste"] = "chance to increase melee/ranged attack speed", + ["chance to increase spell haste"] = "chance to increase spell cast speed", + ["critical damage (percent)"] = "critical damage percent", + ["critical healing (percent)"] = "critical healing percent", + ["fear duration reduction (percent)"] = "fear duration reduction percent", + ["silence duration reduction (percent)"] = "silence duration reduction percent", + ["snare/root duration reduction (percent)"] = "snare/root duration reduction percent", + ["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", + ["threat reduction (percent)"] = "threat reduction percent", + } + + for _, class in ipairs(vars.weightsList) do + for _, weight in ipairs(vars.weightsList[class]) do + for stat, value in pairs(vars.weightsList[class][weight]) do + newName = conversion[stat] + -- move the value to the new stat name + if newName then + vars.weightsList[class][weight][stat] = nil + vars.weightsList[class][weight][newName] = value + end + end + end + end + + vars.dataMinorVersion = 0 + return vars + end +]] + downgradeAccountToDevelopment = [[ return function(vars) vars.dataMajorVersion = 0 @@ -420,6 +498,9 @@ upgradeAccountFunctions = { [9] = function(vars) return upgradeAccountToConfig(vars) end, [10] = function(vars) return noop_major_up(vars) end, }, + [1] = { + [0] = function(vars) return upgradeAccountToBetterMetaEffectNames(vars) end, + }, } downgradeAccountFunctions = { @@ -436,6 +517,7 @@ downgradeAccountFunctions = { }, [1] = { [0] = downgradeAccountToDevelopment, + [1] = downgradeAccountFromBetterMetaEffectNames, }, } diff --git a/defaults.lua b/defaults.lua index 3baef91..52f0c20 100644 --- a/defaults.lua +++ b/defaults.lua @@ -41,26 +41,27 @@ trackedStats = { "Spirit", }, ["Meta Gem Stats"] = { - "Armor from Items Percent", - "Block Value Percent", - "Chance to Increase Melee/Ranged Attack Speed", - "Chance to Increase Spell Cast Speed", + "Armor from Items (Percent)", + "Block Value (Percent)", + "Chance to Increase Physical Haste", + "Chance to Increase Spell Haste", "Chance to Restore Health on Hit", "Chance to Restore Mana on Spellcast", "Chance to Stun Target", - "Critical Damage Percent", - "Critical Healing Percent", - "Fear Duration Reduction Percent", + "Critical Damage (Percent)", + "Critical Healing (Percent)", + "Fear Duration Reduction (Percent)", + "Intellect (Percent)", + "Mana (Percent)", "Minor Run Speed", - "Silence Duration Reduction Percent", - "Snare/Root Duration Reduction Percent", + "Silence Duration Reduction (Percent)", + "Snare/Root Duration Reduction (Percent)", "Sometimes Heal on your Crits", - "Spell Damage Taken Reduction Percent", - "Spell Reflect Percent", - "Stun Duration Reduction Percent", - "Stun Resistance Percent", - "Threat Percent", - "Threat Reduction Percent", + "Spell Damage Taken Reduction (Percent)", + "Spell Reflect (Percent)", + "Stun Duration Reduction (Percent)", + "Stun Resistance (Percent)", + "Threat Reduction (Percent)", "Weapon Damage", }, ["Resistances"] = { @@ -136,7 +137,7 @@ classNameOptions = { defaultVars = { dataMajorVersion = 1, - dataMinorVersion = 0, + dataMinorVersion = 1, weightsList = { [1] = "DEATHKNIGHT", [2] = "DRUID", -- 1.7.9.5