From d82552b1f579e2a7eba27e5f6c258e16782225ee Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Wed, 25 Nov 2009 22:37:15 -0600 Subject: [PATCH] Added ranged dps, given to ranged and projectile items only --- Regexps.lua | 4 ++++ WeightsWatcher.lua | 11 +++++++++++ defaults.lua | 7 ++++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Regexps.lua b/Regexps.lua index b6a07d1..2bca48c 100644 --- a/Regexps.lua +++ b/Regexps.lua @@ -81,6 +81,10 @@ SingleStatLines = { function(text, pattern) return WeightsWatcher:singleStatValueOnly(text, pattern, "DPS") end}, + {"^Adds (%d[%d.]+) damage per second$", + function(text, pattern) + return WeightsWatcher:singleStatValueOnly(text, pattern, "DPS") + end}, {"^Increases attack power by (%d+) in Cat/Bear/Dire Bear/Moonkin forms only%.", function(text, pattern) return WeightsWatcher:singleStatValueOnly(text, pattern, "Feral AP") diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua index 64b9c98..ef9e280 100644 --- a/WeightsWatcher.lua +++ b/WeightsWatcher.lua @@ -376,6 +376,7 @@ end function WeightsWatcher:getItemStats(link) local ttleft, ttright, origTextL, textL, textR, pattern, func, start local normalStats, socketList, socketBonusStat = {}, {} + local ranged = false -- Populate hidden tooltip WeightsWatcherHiddenTooltip:ClearLines() @@ -423,6 +424,9 @@ function WeightsWatcher:getItemStats(link) matched = true table.insert(normalStats, {"Slot", textL}) table.insert(normalStats, {"Subslot", textR}) + if textL == "Ranged" or textL == "Projectile" then + ranged = true + end break end end @@ -460,6 +464,13 @@ function WeightsWatcher:getItemStats(link) end end end + if ranged then + for _, stat in ipairs(normalStats) do + if stat[1] == "DPS" then + stat[1] = "Ranged DPS" + end + end + end return normalStats, socketList, socketBonusStat end diff --git a/defaults.lua b/defaults.lua index 3c125c4..f47cda5 100644 --- a/defaults.lua +++ b/defaults.lua @@ -29,6 +29,7 @@ trackedStats = { "Armor Penetration Rating", "Expertise Rating", "DPS", + "Ranged DPS", "Minimum Weapon Damage", "Maximum Weapon Damage", }, @@ -219,7 +220,7 @@ defaultVars = { [2] = "Marksmanship", [3] = "Survival", ["Beast Mastery"] = { - ["dps"] = 213, + ["ranged dps"] = 213, ["hit rating"] = 100, ["agility"] = 58, ["critical strike rating"] = 40, @@ -229,7 +230,7 @@ defaultVars = { ["haste rating"] = 21, }, ["Marksmanship"] = { - ["dps"] = 379, + ["ranged dps"] = 379, ["hit rating"] = 100, ["agility"] = 74, ["critical strike rating"] = 57, @@ -239,7 +240,7 @@ defaultVars = { ["haste rating"] = 24, }, ["Survival"] = { - ["dps"] = 181, + ["ranged dps"] = 181, ["hit rating"] = 100, ["agility"] = 76, ["critical strike rating"] = 42, -- 1.7.9.5