Quantcast

Added all class weights from wowhead.com

James Whitehead II [11-28-10 - 12:35]
Added all class weights from wowhead.com
Filename
WowheadPoints.lua
diff --git a/WowheadPoints.lua b/WowheadPoints.lua
index 071e823..d23e373 100644
--- a/WowheadPoints.lua
+++ b/WowheadPoints.lua
@@ -1,10 +1,10 @@
 local addonName, addon = ...
 local L = addon.L

-local class = UnitClass("player")
+local class = select(2, UnitClass("player"))

 local info = {
-    Druid = {
+    DRUID = {
         ["Restoration (Healing)"] = {
             weights = {
                 SPELL_POWER = 100,
@@ -54,7 +54,7 @@ local info = {
             },
         },
     },
-    Warrior = {
+    WARRIOR = {
         ["Protection (Tank)"] = {
             weights = {
                 STAMINA = 100,
@@ -95,6 +95,293 @@ local info = {
             },
         },
     },
+    DEATHKNIGHT = {
+        ["Blood (Tank)"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 500,
+                MASTERY_RATING = 100,
+                STAMINA = 100,
+                AGILITY = 69,
+                DODGE_RATING = 50,
+                PARRY_RATING = 43,
+                EXPERTISE_RATING = 38,
+                STRENGTH = 31,
+                CRIT_RATING = 22,
+                ARMOR = 18,
+                HASTE_RATING = 16,
+                HIT_RATING = 16,
+                ARMOR = 11,
+            },
+        },
+        ["Frost (DPS)"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 337,
+                MASTERY_RATING = 100,
+                HIT_RATING = 100,
+                STRENGTH = 97,
+                EXPERTISE_RATING = 81,
+                CRIT_RATING = 45,
+                HASTE_RATING = 28,
+                ARMOR = 1,
+            },
+        },
+        ["Unholy (DPS)"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 209,
+                STRENGTH = 100,
+                MASTERY_RATING = 100,
+                HIT_RATING = 66,
+                EXPERTISE_RATING = 51,
+                HASTE_RATING = 48,
+                CRIT_RATING = 45,
+                ARMOR = 1,
+            },
+        },
+    },
+    HUNTER = {
+        ["Beast Mastery"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 213,
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                AGILITY = 58,
+                CRIT_RATING = 40,
+                INTELLECT = 37,
+                HASTE_RATING = 21,
+            },
+        },
+        ["Marksmanship"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 379,
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                AGILITY = 74,
+                CRIT_RATING = 57,
+                INTELLECT = 39,
+                HASTE_RATING = 24,
+            },
+        },
+        ["Survival"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 181,
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                AGILITY = 76,
+                CRIT_RATING = 42,
+                INTELLECT = 35,
+                HASTE_RATING = 31,
+            },
+        },
+    },
+    MAGE = {
+        ["Arcane"] = {
+            weights = {
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                HASTE_RATING = 54,
+                SPELL_POWER = 49,
+                CRIT_RATING = 37,
+                INTELLECT = 34,
+                SPIRIT = 14,
+            },
+        },
+        ["Fire"] = {
+            weights = {
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                HASTE_RATING = 53,
+                SPELL_POWER = 46,
+                CRIT_RATING = 43,
+                INTELLECT = 13,
+            },
+        },
+        ["Frost"] = {
+            weights = {
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                HASTE_RATING = 42,
+                SPELL_POWER = 39,
+                CRIT_RATING = 19,
+                INTELLECT = 6,
+            },
+        },
+    },
+    PALADIN = {
+        ["Holy (Healing)"] = {
+            weights = {
+                INTELLECT = 100,
+                MASTERY_RATING = 100,
+                SPELL_POWER = 58,
+                CRIT_RATING = 46,
+                HASTE_RATING = 35,
+            },
+        },
+        ["Protection (Tank)"] = {
+            weights = {
+                MASTERY_RATING = 100,
+                STAMINA = 100,
+                AGILITY = 60,
+                EXPERTISE_RATING = 59,
+                DODGE_RATING = 55,
+                PARRY_RATING = 30,
+                STRENGTH = 16,
+                ARMOR = 8,
+            },
+        },
+        ["Retribution (DPS)"] = {
+            weights = {
+                MASTERY_RATING = 100,
+                STAMINA = 100,
+                AGILITY = 60,
+                EXPERTISE_RATING = 59,
+                DODGE_RATING = 55,
+                PARRY_RATING = 30,
+                STRENGTH = 16,
+                ARMOR = 8,
+            },
+        },
+    },
+    PRIEST = {
+        ["Discipline (Healing)"] = {
+            weights = {
+                SPELL_POWER = 100,
+                MASTERY_RATING = 100,
+                INTELLECT = 65,
+                HASTE_RATING = 59,
+                CRIT_RATING = 48,
+                SPIRIT = 22,
+            },
+        },
+        ["Holy (Healing)"] = {
+            weights = {
+                MASTERY_RATING = 100,
+                INTELLECT = 69,
+                SPELL_POWER = 60,
+                SPIRIT = 52,
+                CRIT_RATING = 38,
+                HASTE_RATING = 31,
+            },
+        },
+        ["Shadow Magic (DPS)"] = {
+            weights = {
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                SPELL_POWER = 76,
+                CRIT_RATING = 54,
+                HASTE_RATING = 50,
+                INTELLECT = 16,
+                SPIRIT = 16,
+            },
+        },
+    },
+    ROGUE = {
+        ["Assassination"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 170,
+                AGILITY = 100,
+                MASTERY_RATING = 100,
+                EXPERTISE_RATING = 87,
+                HIT_RATING = 83,
+                CRIT_RATING = 81,
+                HASTE_RATING = 64,
+                STRENGTH = 55,
+            },
+        },
+        ["Combat"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 220,
+                AGILITY = 100,
+                MASTERY_RATING = 100,
+                EXPERTISE_RATING = 82,
+                HIT_RATING = 80,
+                CRIT_RATING = 75,
+                HASTE_RATING = 73,
+                STRENGTH = 55,
+            },
+        },
+        ["Subtlety"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 228,
+                EXPERTISE_RATING = 100,
+                AGILITY = 100,
+                MASTERY_RATING = 100,
+                HIT_RATING = 80,
+                HASTE_RATING = 75,
+                CRIT_RATING = 75,
+                STRENGTH = 55,
+            },
+        },
+    },
+    SHAMAN = {
+        ["Elemental Combat (DPS)"] = {
+            weights = {
+                MASTERY_RATING = 100,
+                HIT_RATING = 100,
+                SPELL_POWER = 60,
+                HASTE_RATING = 56,
+                CRIT_RATING = 40,
+                INTELLECT = 11,
+            },
+        },
+        ["Enhancement (DPS)"] = {
+            weights = {
+                DAMAGE_PER_SECOND = 135,
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                EXPERTISE_RATING = 84,
+                INTELLECT = 55,
+                AGILITY = 55,
+                CRIT_RATING = 55,
+                HASTE_RATING = 42,
+                STRENGTH = 35,
+                SPELL_POWER = 29,
+            },
+        },
+        ["Restoration (Healing)"] = {
+            weights = {
+                MASTERY_RATING = 100,
+                INTELLECT = 85,
+                SPELL_POWER = 77,
+                CRIT_RATING = 62,
+                HASTE_RATING = 35,
+            },
+        },
+    },
+    WARLOCK = {
+        ["Affliction"] = {
+            weights = {
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                SPELL_POWER = 72,
+                HASTE_RATING = 61,
+                CRIT_RATING = 38,
+                SPIRIT = 34,
+                INTELLECT = 15,
+            },
+        },
+        ["Demonology"] = {
+            weights = {
+                HIT_RATING = 100,
+                MASTERY_RATING = 100,
+                HASTE_RATING = 50,
+                SPELL_POWER = 45,
+                CRIT_RATING = 31,
+                SPIRIT = 29,
+                INTELLECT = 13,
+            },
+        },
+        ["Destruction"] = {
+            weights = {
+                MASTERY_RATING = 100,
+                HIT_RATING = 100,
+                SPELL_POWER = 47,
+                HASTE_RATING = 46,
+                SPIRIT = 26,
+                CRIT_RATING = 16,
+                INTELLECT = 13,
+            },
+        },
+    },
 }

 local function GetWeights(link)
@@ -108,8 +395,16 @@ local function GetWeights(link)
         end
         local score = 0
         for stat, weight in pairs(info.weights) do
-            local key = "ITEM_MOD_" .. stat .. "_SHORT"
-            local value = stats[key]
+            local key, value
+
+            if stat == "ARMOR" then
+                key = "RESISTANCE0_NAME"
+                value = stats[key]
+            else
+                key = "ITEM_MOD_" .. stat .. "_SHORT"
+                value = stats[key]
+            end
+
             if not value then
                 key = "ITEM_MOD_" .. stat
                 value = stats[key]
@@ -153,7 +448,7 @@ local function OnTooltipSetItem(tooltip, ...)
             tooltip:AddLine(" ")
             tooltip:AddLine("Equipment ratings from Wowhead.com:")
             for idx, name in ipairs(sort) do
-                tooltip:AddDoubleLine(name .. ":", scores[name], 1.0, 1.0, 1.0)
+                tooltip:AddDoubleLine(name .. ":", math.floor(scores[name]), 1.0, 1.0, 1.0)
             end
             tooltip:AddLine(" ")
         end