API GetCombatRatingBonus

From Wowpedia
Jump to: navigation, search

Returns the bonus, in percent (or other converted units, such as skill points), of a specific combat rating for the player.

bonus = GetCombatRatingBonus(combatRatingIdentifier)

Arguments

combatRatingIdentifier 
Number - A combat rating identifier from PaperDollFrame.lua, one of:
  1. CR_UNUSED_1 (Formerly CR_WEAPON_SKILL. Removed in 6.0.2)
  2. CR_DEFENSE_SKILL
  3. CR_DODGE
  4. CR_PARRY
  5. CR_BLOCK
  6. CR_HIT_MELEE
  7. CR_HIT_RANGED
  8. CR_HIT_SPELL
  9. CR_CRIT_MELEE
  10. CR_CRIT_RANGED
  11. CR_CRIT_SPELL
  12. CR_MULTISTRIKE (Formerly CR_HIT_TAKEN_MELEE. Changed in 6.0.2)
  13. CR_READINESS (Formerly CR_HIT_TAKEN_RANGED. Changed in 6.0.2)
  14. CR_SPEED (Formerly CR_HIT_TAKEN_SPELL. Changed in 6.0.2)
  15. COMBAT_RATING_RESILIENCE_CRIT_TAKEN
  16. COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN
  17. CR_LIFESTEAL = 17; (Formerly CR_CRIT_TAKEN_SPELL. Changed in 6.0.2)
  18. CR_HASTE_MELEE
  19. CR_HASTE_RANGED
  20. CR_HASTE_SPELL
  21. CR_AVOIDANCE (Formerly CR_WEAPON_SKILL_MAINHAND. Changed in 6.0.2)
  22. CR_UNUSED_2 (Formerly CR_WEAPON_SKILL_OFFHAND. Removed in 6.0.2)
  23. CR_WEAPON_SKILL_RANGED
  24. CR_EXPERTISE
  25. CR_ARMOR_PENETRATION
  26. CR_MASTERY
  27. CR_UNUSED_3 (Formerly CR_PVP_POWER. Removed in 6.0.2)
  28. CR_UNUSED_4
  29. CR_VERSATILITY_DAMAGE_DONE
  30. CR_VERSATILITY_DAMAGE_TAKEN

Returns

bonus 
Number - the actual bonus in percent the combat rating confers; e.g. 5.13452

Example

hitBonus = GetCombatRatingBonus(CR_HIT_MELEE)

Result

hitBonus = 5.13452

See also