WoW:API GetCombatRating: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (add CR_EXPERTISE)
m (Move page script moved page API GetCombatRating to API GetCombatRating without leaving a redirect)
 
(8 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Returns the number of points of a specific combat rating the player has.
  rating = GetCombatRating(combatRatingIdentifier)
  rating = GetCombatRating(combatRatingIdentifier)


== Parameters ==
== Arguments ==
;combatRatingIdentifier
: Number - 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;
:* COMBAT_RATING_RESILIENCE_CRIT_TAKEN = 15;
:* COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN = 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;
:* CR_EXPERTISE = 24;
:* CR_ARMOR_PENETRATION = 25;
:* CR_MASTERY = 26;
:* CR_VERSATILITY=29
:* Versatility=30 (bug?)
:* CR_MULTISTRIKE = GetCombatRating(CR_MULTISTRIKE)


<big>'''Arguments'''</big>
== Returns ==
<!-- List each argument, together with its type -->
;rating
:(combatRatingIdentifier)
: Number - the actual rating for the combat rating; e.g. 63
 
:;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;
* CR_EXPERTISE = 24;
<big>'''Returns'''</big>
<!-- List each return value, together with its type -->
 
:;rating: Float - the actual rating for the combat rating; e.g. 63


== Example ==
== Example ==

Latest revision as of 04:45, 15 August 2023

WoW API < GetCombatRating

Returns the number of points of a specific combat rating the player has.

rating = GetCombatRating(combatRatingIdentifier)

Arguments[edit]

combatRatingIdentifier
Number - 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;
  • COMBAT_RATING_RESILIENCE_CRIT_TAKEN = 15;
  • COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN = 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;
  • CR_EXPERTISE = 24;
  • CR_ARMOR_PENETRATION = 25;
  • CR_MASTERY = 26;
  • CR_VERSATILITY=29
  • Versatility=30 (bug?)
  • CR_MULTISTRIKE = GetCombatRating(CR_MULTISTRIKE)

Returns[edit]

rating
Number - the actual rating for the combat rating; e.g. 63

Example[edit]

hitRating = GetCombatRating(6)

Result

hitRating = 63