WoW:API GetCombatRatingBonus: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(upgraded code block)
Line 30: Line 30:
* CR_HASTE_RANGED = 19;
* CR_HASTE_RANGED = 19;
* CR_HASTE_SPELL = 20;
* CR_HASTE_SPELL = 20;
* CR_WEAPON_SKILL_MAINHAND = 21
* CR_WEAPON_SKILL_OFFHAND = 22
* CR_WEAPON_SKILL_RANGED = 23;


<big>'''Returns'''</big>
<big>'''Returns'''</big>
<!-- List each return value, together with its type -->
<!-- List each return value, together with its type -->


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


== Example ==
== Example ==

Revision as of 09:51, 4 September 2007

WoW API < GetCombatRatingBonus

bonus = GetCombatRatingBonus(combatRatingIdentifier)

Parameters

Arguments

(combatRatingIdentifier)
combatRatingIdentifier
Integer - A combat rating identifier, one of:
  • CR_WEAPON_SKILL = 1;
  • CR_DEFENSE_SKILL = 2;
  • CR_DODGE = 3;
  • CR_PARRY = 4;
  • CR_BLOCK = 5;
  • CR_HIT_MELEE = 6;
  • CR_HIT_RANGED = 7;
  • CR_HIT_SPELL = 8;
  • CR_CRIT_MELEE = 9;
  • CR_CRIT_RANGED = 10;
  • CR_CRIT_SPELL = 11;
  • CR_HIT_TAKEN_MELEE = 12;
  • CR_HIT_TAKEN_RANGED = 13;
  • CR_HIT_TAKEN_SPELL = 14;
  • CR_CRIT_TAKEN_MELEE = 15;
  • CR_CRIT_TAKEN_RANGED = 16;
  • CR_CRIT_TAKEN_SPELL = 17;
  • CR_HASTE_MELEE = 18;
  • CR_HASTE_RANGED = 19;
  • CR_HASTE_SPELL = 20;
  • CR_WEAPON_SKILL_MAINHAND = 21
  • CR_WEAPON_SKILL_OFFHAND = 22
  • CR_WEAPON_SKILL_RANGED = 23;

Returns

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

Example

hitBonus = GetCombatRatingBonus(6)

Result

hitBonus = 5.13452