From 9dc5c0f6c473b0a0ed3aae7d56b96c277b26b8bf Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Sun, 9 Jan 2011 21:59:19 -0600 Subject: [PATCH] Handle cogwheel gems --- GemIds.lua | 45 +++++++++++++++++++++++++++++++++++++++++++ Locales/enUS/gems.lua | 10 ++++++++++ Locales/enUS/patterns.lua | 1 + WeightsWatcher.lua | 22 +++++++++++---------- create-gem-ids-file.lua | 5 +++++ gem-ids-converted.lua | 47 ++++++++++++++++++++++++++++++++++++++++++++- gem-ids.lua | 16 +++++++-------- unknown-gems | 41 --------------------------------------- 8 files changed, 127 insertions(+), 60 deletions(-) diff --git a/GemIds.lua b/GemIds.lua index 4696df6..1a8347e 100644 --- a/GemIds.lua +++ b/GemIds.lua @@ -34,6 +34,9 @@ local L = ww_localizedStats -- 5: wrath green -- 6: wrath blue -- 7: wrath epic +-- 8: cataclysm epic +-- 9: cataclysm epic +-- 10: cataclysm epic ww_gems = { ["Vendor"] = { @@ -105,6 +108,48 @@ ww_gems = { {[L["dodge rating"]] = 4}, }, }, + [9] = { + [4166] = { + "cogwheel", + "Subtle Cogwheel", + {[L["dodge rating"]] = 208}, + }, + [4167] = { + "cogwheel", + "Smooth Cogwheel", + {[L["critical strike rating"]] = 208}, + }, + [4168] = { + "cogwheel", + "Quick Cogwheel", + {[L["haste rating"]] = 208}, + }, + [4169] = { + "cogwheel", + "Fractured Cogwheel", + {[L["mastery rating"]] = 208}, + }, + [4170] = { + "cogwheel", + "Precise Cogwheel", + {[L["expertise rating"]] = 208}, + }, + [4171] = { + "cogwheel", + "Flashing Cogwheel", + {[L["parry rating"]] = 208}, + }, + [4172] = { + "cogwheel", + "Rigid Cogwheel", + {[L["hit rating"]] = 208}, + }, + [4173] = { + "cogwheel", + "Sparkling Cogwheel", + {[L["spirit"]] = 208}, + }, + }, }, }, ["Crafted"] = { diff --git a/Locales/enUS/gems.lua b/Locales/enUS/gems.lua index e7bd088..6ae7bcd 100644 --- a/Locales/enUS/gems.lua +++ b/Locales/enUS/gems.lua @@ -131,6 +131,7 @@ ww_gemDisplayNames = { ["Flashing Cardinal Ruby"] = "Flashing Cardinal Ruby", ["Flashing Carnelian"] = "Flashing Carnelian", ["Flashing Chimera's Eye"] = "Flashing Chimera's Eye", + ["Flashing Cogwheel"] = "Flashing Cogwheel", ["Flashing Crimson Spinel"] = "Flashing Crimson Spinel", ["Flashing Dragon's Eye"] = "Flashing Dragon's Eye", ["Flashing Inferno Ruby"] = "Flashing Inferno Ruby", @@ -150,6 +151,7 @@ ww_gemDisplayNames = { ["Fractured Alicite"] = "Fractured Alicite", ["Fractured Amberjewel"] = "Fractured Amberjewel", ["Fractured Chimera's Eye"] = "Fractured Chimera's Eye", + ["Fractured Cogwheel"] = "Fractured Cogwheel", ["Glinting Demonseye"] = "Glinting Demonseye", ["Glinting Dreadstone"] = "Glinting Dreadstone", ["Glinting Nightseye"] = "Glinting Nightseye", @@ -230,6 +232,7 @@ ww_gemDisplayNames = { ["Nimble Eye of Zul"] = "Nimble Eye of Zul", ["Nimble Forest Emerald"] = "Nimble Forest Emerald", ["Nimble Jasper"] = "Nimble Jasper", + ["None"] = "None", ["Perfect Accurate Nightstone"] = "Perfect Accurate Nightstone", ["Perfect Accurate Shadow Crystal"] = "Perfect Accurate Shadow Crystal", ["Perfect Adept Hessonite"] = "Perfect Adept Hessonite", @@ -350,6 +353,7 @@ ww_gemDisplayNames = { ["Precise Cardinal Ruby"] = "Precise Cardinal Ruby", ["Precise Carnelian"] = "Precise Carnelian", ["Precise Chimera's Eye"] = "Precise Chimera's Eye", + ["Precise Cogwheel"] = "Precise Cogwheel", ["Precise Dragon's Eye"] = "Precise Dragon's Eye", ["Precise Inferno Ruby"] = "Precise Inferno Ruby", ["Precise Scarlet Ruby"] = "Precise Scarlet Ruby", @@ -372,6 +376,7 @@ ww_gemDisplayNames = { ["Quick Amberjewel"] = "Quick Amberjewel", ["Quick Autumn's Glow"] = "Quick Autumn's Glow", ["Quick Chimera's Eye"] = "Quick Chimera's Eye", + ["Quick Cogwheel"] = "Quick Cogwheel", ["Quick Dawnstone"] = "Quick Dawnstone", ["Quick Dragon's Eye"] = "Quick Dragon's Eye", ["Quickened Starfire Diamond"] = "Quickened Starfire Diamond", @@ -423,6 +428,7 @@ ww_gemDisplayNames = { ["Rigid Azure Moonstone"] = "Rigid Azure Moonstone", ["Rigid Chalcedony"] = "Rigid Chalcedony", ["Rigid Chimera's Eye"] = "Rigid Chimera's Eye", + ["Rigid Cogwheel"] = "Rigid Cogwheel", ["Rigid Dragon's Eye"] = "Rigid Dragon's Eye", ["Rigid Empyrean Sapphire"] = "Rigid Empyrean Sapphire", ["Rigid Majestic Zircon"] = "Rigid Majestic Zircon", @@ -455,6 +461,7 @@ ww_gemDisplayNames = { ["Smooth Amber"] = "Smooth Amber", ["Smooth Autumn's Glow"] = "Smooth Autumn's Glow", ["Smooth Chimera's Eye"] = "Smooth Chimera's Eye", + ["Smooth Cogwheel"] = "Smooth Cogwheel", ["Smooth Dawnstone"] = "Smooth Dawnstone", ["Smooth Dragon's Eye"] = "Smooth Dragon's Eye", ["Smooth Golden Draenite"] = "Smooth Golden Draenite", @@ -487,6 +494,7 @@ ww_gemDisplayNames = { ["Sparkling Azure Moonstone"] = "Sparkling Azure Moonstone", ["Sparkling Chalcedony"] = "Sparkling Chalcedony", ["Sparkling Chimera's Eye"] = "Sparkling Chimera's Eye", + ["Sparkling Cogwheel"] = "Sparkling Cogwheel", ["Sparkling Dragon's Eye"] = "Sparkling Dragon's Eye", ["Sparkling Empyrean Sapphire"] = "Sparkling Empyrean Sapphire", ["Sparkling Majestic Zircon"] = "Sparkling Majestic Zircon", @@ -525,6 +533,7 @@ ww_gemDisplayNames = { ["Subtle Amber"] = "Subtle Amber", ["Subtle Autumn's Glow"] = "Subtle Autumn's Glow", ["Subtle Chimera's Eye"] = "Subtle Chimera's Eye", + ["Subtle Cogwheel"] = "Subtle Cogwheel", ["Subtle Dawnstone"] = "Subtle Dawnstone", ["Subtle Dragon's Eye"] = "Subtle Dragon's Eye", ["Subtle Golden Draenite"] = "Subtle Golden Draenite", @@ -578,6 +587,7 @@ ww_gemDisplayNames = { ww_gemColorDisplayNames = { ["blue"] = "Blue", + ["cogwheel"] = "Cogwheel", ["green"] = "Green", ["meta"] = "Meta", ["orange"] = "Orange", diff --git a/Locales/enUS/patterns.lua b/Locales/enUS/patterns.lua index 00bd5d5..cd9982f 100644 --- a/Locales/enUS/patterns.lua +++ b/Locales/enUS/patterns.lua @@ -100,6 +100,7 @@ ww_IgnoredLines = { "^prime glyph$", "^major glyph$", "^minor glyph$", + "^cogwheel$", "^<.*>$", -- TODO: add these for ALL professions "^prospectable$", diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua index d41bd71..ac832ba 100644 --- a/WeightsWatcher.lua +++ b/WeightsWatcher.lua @@ -103,10 +103,9 @@ ww_weightIdealCacheWeightMetatable = { if key == "bestGems" then local bestGems = {} - bestGems.red, bestGems.redScore = WeightsWatcher.bestGemForSocket("red", tbl.weight, ww_vars.options.gems.qualityLimit) - bestGems.yellow, bestGems.yellowScore = WeightsWatcher.bestGemForSocket("yellow", tbl.weight, ww_vars.options.gems.qualityLimit) - bestGems.blue, bestGems.blueScore = WeightsWatcher.bestGemForSocket("blue", tbl.weight, ww_vars.options.gems.qualityLimit) - bestGems.meta, bestGems.metaScore = WeightsWatcher.bestGemForSocket("meta", tbl.weight, ww_vars.options.gems.qualityLimit) + for color in pairs(ww_localizedSocketColors) do + bestGems[color], bestGems[color .. "Score"] = WeightsWatcher.bestGemForSocket(color, tbl.weight, ww_vars.options.gems.qualityLimit) + end bestGems.prismatic = bestGems.red bestGems.prismaticScore = bestGems.redScore @@ -134,7 +133,7 @@ ww_weightIdealCacheWeightMetatable = { color = ww_englishSocketColors[color] table.insert(bestGems, tbl.bestGems[color]) gemScore = gemScore + tbl.bestGems[color .. "Score"] - if breakSocketColors and color ~= "meta" then + if breakSocketColors and color ~= "meta" and color ~= "cogwheel" then table.insert(bestGemsIgnoreSocket, tbl.bestGems.prismatic) gemScoreIgnoreSocket = gemScoreIgnoreSocket + tbl.bestGems.prismaticScore end @@ -850,11 +849,8 @@ local socketColors = { ["prismatic"] = true, ["purple"] = true, }, - ["red"] = { - ["orange"] = true, - ["prismatic"] = true, - ["purple"] = true, - ["red"] = true, + ["cogwheel"] = { + ["cogwheel"] = true, }, ["meta"] = { ["meta"] = true, @@ -868,6 +864,12 @@ local socketColors = { ["red"] = true, ["yellow"] = true, }, + ["red"] = { + ["orange"] = true, + ["prismatic"] = true, + ["purple"] = true, + ["red"] = true, + }, ["yellow"] = { ["green"] = true, ["orange"] = true, diff --git a/create-gem-ids-file.lua b/create-gem-ids-file.lua index 11ad598..acd5f22 100644 --- a/create-gem-ids-file.lua +++ b/create-gem-ids-file.lua @@ -157,6 +157,11 @@ for gemId, gemInfo in pairs(gem_ids_to_item_info) do if start then break end + start = line.left:find("Only fits in a Cogwheel socket") + if start then + color = "cogwheel" + break + end end end if not color then diff --git a/gem-ids-converted.lua b/gem-ids-converted.lua index 16bdcdd..24873c9 100644 --- a/gem-ids-converted.lua +++ b/gem-ids-converted.lua @@ -34,6 +34,9 @@ local L = ww_localizedStats -- 5: wrath green -- 6: wrath blue -- 7: wrath epic +-- 8: wrath epic +-- 9: wrath epic +-- 10: wrath epic ww_gems = { ["Vendor"] = { @@ -105,6 +108,48 @@ ww_gems = { {[L["dodge rating"]] = 4}, }, }, + [9] = { + [4166] = { + "cogwheel", + "Subtle Cogwheel", + {[L["dodge rating"]] = 208}, + }, + [4167] = { + "cogwheel", + "Smooth Cogwheel", + {[L["critical strike rating"]] = 208}, + }, + [4168] = { + "cogwheel", + "Quick Cogwheel", + {[L["haste rating"]] = 208}, + }, + [4169] = { + "cogwheel", + "Fractured Cogwheel", + {[L["mastery rating"]] = 208}, + }, + [4170] = { + "cogwheel", + "Precise Cogwheel", + {[L["expertise rating"]] = 208}, + }, + [4171] = { + "cogwheel", + "Flashing Cogwheel", + {[L["parry rating"]] = 208}, + }, + [4172] = { + "cogwheel", + "Rigid Cogwheel", + {[L["hit rating"]] = 208}, + }, + [4173] = { + "cogwheel", + "Sparkling Cogwheel", + {[L["spirit"]] = 208}, + }, + }, }, }, ["Crafted"] = { @@ -2659,7 +2704,7 @@ ww_gems = { {[L["spell penetration"]] = 43}, }, }, - [9] = { + [10] = { [4031] = { "red", "Bold Chimera's Eye", diff --git a/gem-ids.lua b/gem-ids.lua index fb40fbf..1dd3c70 100644 --- a/gem-ids.lua +++ b/gem-ids.lua @@ -5962,56 +5962,56 @@ gemIdInfo = { }, }, [4166] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Subtle Cogwheel", [3] = { ["dodge rating"] = 208, }, }, [4167] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Smooth Cogwheel", [3] = { ["critical strike rating"] = 208, }, }, [4168] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Quick Cogwheel", [3] = { ["haste rating"] = 208, }, }, [4169] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Fractured Cogwheel", [3] = { ["mastery rating"] = 208, }, }, [4170] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Precise Cogwheel", [3] = { ["expertise rating"] = 208, }, }, [4171] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Flashing Cogwheel", [3] = { ["parry rating"] = 208, }, }, [4172] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Rigid Cogwheel", [3] = { ["hit rating"] = 208, }, }, [4173] = { - [1] = "UNKNOWN", + [1] = "cogwheel", [2] = "Sparkling Cogwheel", [3] = { spirit = 208, diff --git a/unknown-gems b/unknown-gems index e63c86b..b09944f 100644 --- a/unknown-gems +++ b/unknown-gems @@ -36,47 +36,6 @@ "Stackable Ruby", {[L["strength"]] = 50}, }, - -- Not handling cogwheels for the time being - [4166] = { - "UNKNOWN", - "Subtle Cogwheel", - {[L["dodge rating"]] = 208}, - }, - [4167] = { - "UNKNOWN", - "Smooth Cogwheel", - {[L["critical strike rating"]] = 208}, - }, - [4168] = { - "UNKNOWN", - "Quick Cogwheel", - {[L["haste rating"]] = 208}, - }, - [4169] = { - "UNKNOWN", - "Fractured Cogwheel", - {[L["mastery rating"]] = 208}, - }, - [4170] = { - "UNKNOWN", - "Precise Cogwheel", - {[L["expertise rating"]] = 208}, - }, - [4171] = { - "UNKNOWN", - "Flashing Cogwheel", - {[L["parry rating"]] = 208}, - }, - [4172] = { - "UNKNOWN", - "Rigid Cogwheel", - {[L["hit rating"]] = 208}, - }, - [4173] = { - "UNKNOWN", - "Sparkling Cogwheel", - {[L["spirit"]] = 208}, - }, [2703] = { "UNKNOWN", "zzDEPRECATEDHeart of the Sky", -- 1.7.9.5