Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. local function OnTooltipSetItem(self)
  2. stats = {}
  3. statsValue = 0.0
  4. local name, link = self:GetItem()
  5.  
  6. GetItemStats(link, stats)
  7. statsValue = statsValue + ((stats["ITEM_MOD_INTELLECT_SHORT"] or 0) * 1.00)
  8. statsValue = statsValue + ((stats["ITEM_MOD_AGILITY_SHORT"] or 0) * 0.0)
  9. statsValue = statsValue + ((stats["ITEM_MOD_STRENGTH_SHORT"] or 0) * 0.0)
  10. statsValue = statsValue + ((stats["ITEM_MOD_SPELL_POWER_SHORT"] or 0) * .8820)
  11. statsValue = statsValue + ((stats["ITEM_MOD_ATTACK_POWER_SHORT"] or 0) * 0.0)
  12. statsValue = statsValue + ((stats["ITEM_MOD_CRIT_RATING_SHORT"] or 0) * .5522)
  13. statsValue = statsValue + ((stats["ITEM_MOD_HASTE_RATING_SHORT"] or 0) * 0.5796)
  14. statsValue = statsValue + ((stats["ITEM_MOD_MASTERY_RATING_SHORT"] or 0) * 0.5210)
  15. statsValue = statsValue + ((stats["ITEM_MOD_CR_MULTISTRIKE_SHORT"] or 0) * .5749)
  16. statsValue = statsValue + ((stats["ITEM_MOD_VERSATILITY"] or 0) * .4863)
  17.  
  18. GameTooltip:AddLine("Actual Value: " .. statsValue, 0, 1, 0)
  19.  
  20. end
  21.  
  22. GameTooltip:HookScript("OnTooltipSetItem", OnTooltipSetItem)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement