Quantcast

Add SageHitCapped function.

Silversage of Eitrigg [10-31-11 - 01:14]
Add SageHitCapped function.
Remove extraneous comment from stats.lua.
Repair error in Warlock stats.
Filename
SageGearLevelTooltip.lua
stats.lua
diff --git a/SageGearLevelTooltip.lua b/SageGearLevelTooltip.lua
index 51667e1..842068c 100644
--- a/SageGearLevelTooltip.lua
+++ b/SageGearLevelTooltip.lua
@@ -385,3 +385,16 @@ sage.gear.StatsForClass(playerClass, function(spec, class, stats, color)
       class,
       BestReforgedEvaluator:New(specInfo, stats):Cache())
 end)
+
+
+function SageHitCapped()
+  tooltipUpdater.commenters = {}
+  sage.gear.StatsForClass(playerClass, function(spec, class, stats, color)
+    color = color or DEFAULT_COLOR
+    local specInfo = {label = spec .. "-Hit", r=color.r, g=color.g, b=color.b}
+    stats.Hit = nil
+    tooltipUpdater:AddSelfEvaluator(
+        class,
+        BestReforgedEvaluator:New(specInfo, stats):Cache())
+  end)
+end
diff --git a/stats.lua b/stats.lua
index 78700b3..1d2a990 100644
--- a/stats.lua
+++ b/stats.lua
@@ -30,9 +30,6 @@ forClass("DEATHKNIGHT")
   :setColor({r=1.0, g=0.2, b=0.4})
   :stats({Mastery=100, Parry=83, Dodge=83, Stamina=54,
       Expertise=33, Strength=24, Hit=16, Armor=13})
---  :stats({MeleeDPS=500, Mastery=100, Stamina=100, Agility=69, Dodge=50,
---      Parry=43, Expertise=38, Strength=31, Armor=18, Haste=16, Hit=16,
---      AdditionalArmor=11})
   :registerAs("Blood DK")

 forClass("DEATHKNIGHT")
@@ -92,7 +89,7 @@ forClass("HUNTER")
 -- Mage
 forClass("MAGE")
   :setColor({r=1.0, g=1.0, b=1.0})
-  :stats({--[[Hit=100,]] Mastery=100, Haste=54, SP=49, Crit=37, Intellect=34,
+  :stats({Hit=100, Mastery=100, Haste=54, SP=49, Crit=37, Intellect=34,
       Spirit=14})
   :registerAs("Arcane Mage")

@@ -181,13 +178,13 @@ forClass("SHAMAN")
 --Warlock
 forClass("WARLOCK")
   :setColor({r=1.0, g=0.2, b=1.0})
-  :stats({Hit=100, Master=100, SP=72, Haste=61, Crit=38, Spirit=34,
+  :stats({Hit=100, Mastery=100, SP=72, Haste=61, Crit=38, Spirit=34,
       Intellect=15})
   :registerAs("Aff Warlock")

 forClass("WARLOCK")
   :setColor({r=0.8, g=0.2, b=1.0})
-  :stats({Hit=100, Master=100, Haste=50, SP=45, Crit=31, Spirit=29,
+  :stats({Hit=100, Mastery=100, Haste=50, SP=45, Crit=31, Spirit=29,
       Intellect=13})
   :registerAs("Dem Warlock")