RatingBuster - A tool for item comparation

************************
** About RatingBuster **
************************

RatingBuster started out as an addon that converts combat ratings in your tooltips into percentages, so that you have more meaningful information when comparing different items.

The design aim of RatingBuster is to provide detailed, meangingful and customizable information about items so you can eazily decide for yourself which item is better.


**************
** Features **
**************

- Rating Conversion:
  Converts combat ratings into percentages.

- Stat Breakdown:
  Breakdown Strength, Agility, Stamina, Intellect and Spirit into base stats.
  Supports talants, buffs and racials that give you extra bonuses.
  Ex talant: Lunar Guidance - "Increases your spell damage and healing by 8%/16%/25% of your total Intellect."
  Ex talant: Heart of the Wild - "Increases your Intellect by 4%/8%/12%/16%/20%. In addition, ......etc"
  Ex: +13 Intellect (+234 Mana, +0.18% Spell Crit, +3.9 Dmg)

- Stat Summary:
  Summarizes all the stats from the item itself, enchants and gems, converts them to base stats and displays the total value and/or difference from your current equipped item.
  Ex: Crit Chance - Adds up agility and crit rating from the item, enchant and gem. Converts agility and crit rating to crit chance, and displays the total in a single value.

- Item Level and Item ID:
  Item Level is obtained from the WoW API, not a calculated value.
  Item ID is useful for advanced users.

- Supports talants, buffs and racials that modify your stats for all classes.

- Fully customizable, decide what you need to see and what you don't want.


**********************
** Supported Addons **
**********************

EquipCompare, EQCompare, tekKompare.
LinkWrangler, MultiTips, Links.
AtlasLoot, ItemMagic, Sniff.

will work with all bag mods too!


***********************
** GUI Options Panal **
***********************

Type /rb optionswin


********************
** Slash Commands **
********************

Use: /rb or /ratingbuster

/rb : Display command help
/rb standby : Toggle disable/enable RatingBuster in game, defaults Enable
/rb level (0-73) : Set the level used in calculations, defaults 0 (0 = your level)
/rb itemlevel : Toggle show/hide ItemLevel, defaults Show
/rb itemid : Toggle show/hide ItemID, defaults Hide
/rb usereqlv : Toggle calculate using the required level if you are below the required level, defaults Off
/rb statmod : Toggle support for talant and buff mods, defaults On

/rb rating : Options for Rating Conversion
/rb rating show : Toggle show/hide Rating Conversion in tooltips, defaults Show
/rb rating def : Toggle Defense breakdown, Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block, defaults Off
/rb rating wpn : Toggle Weapon Skill breakdown, Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect, defaults Off
/rb rating color enable : Toggle enable/disable colored text, defaults On
/rb rating color pick : Choose a color for the added text, defaults Light Yellow

/rb stat : Options for Stat Breakdown
/rb stat show : Toggle show/hide Stat Breakdown in tooltips, defaults Show
/rb stat str : Options for Strength breakdown -> AP, Block, Healing(Talant)
/rb stat agi : Options for Agility breakdown -> Crit, Dodge, AP, RAP, Armor
/rb stat sta : Options for Stamina breakdown -> Health, SpellDmg(Talant)
/rb stat int : Options for Intellect breakdown -> Mana, SpellCrit, SpellDmg(Talant), Healing(Talant), MP5(Talant), RAP(Talant), Armor(Talant)
/rb stat spi : Options for Spirit breakdown -> MP5(Talant), MP5NC, HP5, SpellDmg(Talant), Healing(Talant)

/rb sum : Options for Stat Summary
/rb sum show : Toggle show/hide Stat Summary in tooltips, defaults Show
/rb sum ignore unused : Show stat summary only for armor types you will and can use, and on items with uncommon quality and up, defaults On
/rb sum ignore equipped : Hide stat summary for equipped items, defaults Off
/rb sum ignore enchant : Ignore enchants on items when calculating the stat summary, defaults Off
/rb sum ignore gem : Ignore gems on items when calculating the stat summary, defaults Off
/rb sum diffstyle : Display diff values in the main tooltip or only in compare tooltips, defaults Main
/rb sum space : Add a blank line before stat summary for readability, defaults On
/rb sum showzerostat : Show zero value stats in summary for consistancy, defaults Off
/rb sum calcsum : Calculate the total stats for the item, defaults On
/rb sum calcdiff : Calculate the stat difference for the item and equipped items, defaults On
/rb sum stat : Choose which base stats you'd like to see in the summary
	- Health - HEALTH, STA
	- Mana - MANA, INT
	- Attack Power - AP, STR, AGI
	- Ranged Attack Power - RANGED_AP, INT, AP, STR, AGI
	- Feral Attack Power - FERAL_AP, AP, STR, AGI (Note: Shows Cat AP when in Cat form, and Bear AP in other forms)
	- Spell Damage - SPELL_DMG, STA, INT, SPI
	- Holy Damage - HOLY_SPELL_DMG, SPELL_DMG, INT, SPI
	- Arcane Damage - ARCANE_SPELL_DMG, SPELL_DMG, INT
	- Fire Damage - FIRE_SPELL_DMG, SPELL_DMG, STA, INT
	- Nature Damage - NATURE_SPELL_DMG, SPELL_DMG, INT
	- Frost Damage - FROST_SPELL_DMG, SPELL_DMG, INT
	- Shadow Damage - SHADOW_SPELL_DMG, SPELL_DMG, STA, INT, SPI
	- Healing - HEAL, STR, INT, SPI
	- Hit Chance - MELEE_HIT_RATING, WEAPON_RATING
	- Crit Chance - MELEE_CRIT_RATING, WEAPON_RATING, AGI
	- Spell Hit Chance - SPELL_HIT_RATING
	- Spell Crit Chance - SPELL_CRIT_RATING, INT
	- Mana Regen - MANA_REG, SPI
	- Health Regen - HEALTH_REG
	- Mana Regen Not Casting - MANA_REG, SPI
	- Health Regen While Casting - HEALTH_REG, SPI
	- Armor - ARMOR, ARMOR_BONUS, AGI, INT
	- Block Value - BLOCK_VALUE, STR
	- Dodge Chance - DODGE_RATING, DEFENSE_RATING, AGI
	- Parry Chance - PARRY_RATING, DEFENSE_RATING
	- Block Chance - BLOCK_RATING, DEFENSE_RATING
	- Hit Avoidance - DEFENSE_RATING, MELEE_HIT_AVOID_RATING
	- Crit Avoidance - DEFENSE_RATING, RESILIENCE_RATING, MELEE_CRIT_AVOID_RATING
	- Dodge Neglect - WEAPON_RATING
	- Parry Neglect - WEAPON_RATING
	- Block Neglect - WEAPON_RATING
	- Arcane Resistance - ARCANE_RES
	- Fire Resistance - FIRE_RES
	- Nature Resistance - NATURE_RES
	- Frost Resistance - FROST_RES
	- Shadow Resistance - SHADOW_RES
	- Weapon Max Damage - MAX_DAMAGE
/rb sum statcomp : Choose which composite stats you'd like to see in the summary
	- Strength - STR
	- Agility - AGI
	- Stamina - STA
	- Intellect - INT
	- Spirit - SPI
	- Defense - DEFENSE_RATING
	- Weapon Skill - WEAPON_RATING


**************************************
** How I derived the Rating Formula **
**************************************

As soon as I saw the blue post on combat ratings system, I began to think about coding this addon.
But Blizzard only gave us level 60 and 70 data about this system, and for an addon like this to work you need exact fomula that will work for all levels.
So I need to reverse engineer the Combat Rating formula, and the process of obtaining this formula can be broken up into two simple steps.

1. Get more data
In order to obtain the exact formula, I will need more data points then just level 60 and 70. So I logged on and started asking random people about their crit% and crit ratings show in the Character frame, the problem was the crit% shown only has 2 two decimal places, which turned out to be insufficient for this matter.

So I started to dig in the DefaultUI lua files in search for a new API that will give a more precise crit% and I came up with this script /script DEFAULT_CHAT_FRAME:AddMessage(GetCombatRatingBonus(9)).

Now I need to log on again and ask random people to type that script and tell me that 13 decimal place crit% that it shows. This was not an eazy task, as most people are unfamilier with lua script, there are even people that immediately put me on ignore after I sent him this script lol.

After hours of work, this is what I got:
A   B    C      D               E               F   G           H
Lv  Type Rating Percentage      =C/D         60base =E/F        =1/G
19  crit    2   0.6753247631    2.9615380764    14  0.211538434 4.727273342
21  crit    2   0.5714285714    3.5000000000    14  0.25        4
22  crit    2   0.5306122010    3.7692310810    14  0.269230792 3.714285407
28  crit    2   0.3714286018    5.3846149445    14  0.384615353 2.6
29  crit    2   0.3537415195    5.6538457870    14  0.403846128 2.476190637
36  crit    14  1.8557142035    7.5442651532    14  0.538876082 1.855714204
48  crit    14  1.2999998760    10.7692317963   14  0.769230843 1.3
50  crit    14  1.2380952140    11.3076925278   14  0.807692323 1.238095214
60  crit    112 8.0000000000    14.0000000000   14  1           1
61  crit    56  3.8536582293    14.5316467285   14  1.037974766 0.963414557
62  hit     50  4.6341464061    10.7894735336   10  1.078947353 0.926829281
62  crit    56  3.7073167036    15.1052646637   14  1.078947476 0.926829176
63  crit    31  1.9712541049    15.7260293961   14  1.123287814 0.890243789
64  crit    17  1.0365853900    16.3999996185   14  1.171428544 0.853658556
65  crit    56  3.2682925906    17.1343288422   14  1.223880632 0.817073148
66  crit    168 9.3658536585    17.9375000000   14  1.28125     0.780487805
66  sp_hit  48  4.6829268293    10.2500000000   8   1.28125     0.780487805
67  crit    78  4.1445989933    18.8196735382   14  1.344262396 0.743902383
67  crit    76  4.0383272242    18.8196735382   14  1.344262396 0.743902383

2. Think very hard
After some creative thinking, this is what I got:

Percentage = Rating / F * H
Lv 8 to 60: 1/H = 1/52 * Level - 8/52
Lv 60 to 70: H = - 3/82 * Level + 131/41

                    F=
Weapon Skill        2.5
Defense             1.5
Dodge              12.0
Parry              15.0
Block               5.0
Hit                10.0
Crit               14.0
Haste               6.7
Spell Hit           8.0
Spell Crit         14.0
Spell Haste        13.3
Resilience         25.0

This formula is correct to the 13th decimal place, so I'm 100% sure this is what blizzard uses.


****************************************
** Stat Conversion Data for Reference **
****************************************

              Combat rating needed for 1 point of stat
   WepS Defe Dodge Parry Bloc M-Hit M-Crit M-Hst S-Hit S-Crit S-Hst Resil
70 3.94 2.37 18.92 31.54 7.88 15.77 22.08  15.77 12.62 22.08  15.77 39.42
69 3.73 2.24 17.89 29.82 7.45 14.91 20.87  14.91 11.93 20.87  14.91 37.27
68 3.53 2.12 16.97 28.28 7.07 14.14 19.79  14.14 11.31 19.79  14.14 35.34
67 3.36 2.02 16.13 26.89 6.72 13.44 18.82  13.44 10.75 18.82  13.44 33.61
66 3.20 1.92 15.38 25.63 6.41 12.81 17.94  12.81 10.25 17.94  12.81 32.03
65 3.06 1.84 14.69 24.48 6.12 12.24 17.13  12.24  9.79 17.13  12.24 30.60
64 2.93 1.76 14.06 23.43 5.86 11.71 16.40  11.71  9.37 16.40  11.71 29.29
63 2.81 1.68 13.48 22.47 5.62 11.23 15.73  11.23  8.99 15.73  11.23 28.08
62 2.70 1.62 12.95 21.58 5.39 10.79 15.11  10.79  8.63 15.11  10.79 26.97
61 2.59 1.56 12.46 20.76 5.19 10.38 14.53  10.38  8.30 14.53  10.38 25.95
60 2.50 1.50 12.00 20.00 5.00 10.00 14.00  10.00  8.00 14.00  10.00 25.00
59 2.45 1.47 11.77 19.62 4.90  9.81 13.73   9.81  7.85 13.73   9.81 24.52
58 2.40 1.44 11.54 19.23 4.81  9.62 13.46   9.62  7.69 13.46   9.62 24.04
57 2.36 1.41 11.31 18.85 4.71  9.42 13.19   9.42  7.54 13.19   9.42 23.56
56 2.31 1.38 11.08 18.46 4.62  9.23 12.92   9.23  7.38 12.92   9.23 23.08
55 2.26 1.36 10.85 18.08 4.52  9.04 12.65   9.04  7.23 12.65   9.04 22.60
54 2.21 1.33 10.62 17.69 4.42  8.85 12.38   8.85  7.08 12.38   8.85 22.12
53 2.16 1.30 10.38 17.31 4.33  8.65 12.12   8.65  6.92 12.12   8.65 21.63
52 2.12 1.27 10.15 16.92 4.23  8.46 11.85   8.46  6.77 11.85   8.46 21.15
51 2.07 1.24  9.92 16.54 4.13  8.27 11.58   8.27  6.62 11.58   8.27 20.67
50 2.02 1.21  9.69 16.15 4.04  8.08 11.31   8.08  6.46 11.31   8.08 20.19
49 1.97 1.18  9.46 15.77 3.94  7.88 11.04   7.88  6.31 11.04   7.88 19.71
48 1.92 1.15  9.23 15.38 3.85  7.69 10.77   7.69  6.15 10.77   7.69 19.23
47 1.88 1.13  9.00 15.00 3.75  7.50 10.50   7.50  6.00 10.50   7.50 18.75
46 1.83 1.10  8.77 14.62 3.65  7.31 10.23   7.31  5.85 10.23   7.31 18.27
45 1.78 1.07  8.54 14.23 3.56  7.12  9.96   7.12  5.69  9.96   7.12 17.79
44 1.73 1.04  8.31 13.85 3.46  6.92  9.69   6.92  5.54  9.69   6.92 17.31
43 1.68 1.01  8.08 13.46 3.37  6.73  9.42   6.73  5.38  9.42   6.73 16.83
42 1.63 0.98  7.85 13.08 3.27  6.54  9.15   6.54  5.23  9.15   6.54 16.35
41 1.59 0.95  7.62 12.69 3.17  6.35  8.88   6.35  5.08  8.88   6.35 15.87
40 1.54 0.92  7.38 12.31 3.08  6.15  8.62   6.15  4.92  8.62   6.15 15.38
39 1.49 0.89  7.15 11.92 2.98  5.96  8.35   5.96  4.77  8.35   5.96 14.90
38 1.44 0.87  6.92 11.54 2.88  5.77  8.08   5.77  4.62  8.08   5.77 14.42
37 1.39 0.84  6.69 11.15 2.79  5.58  7.81   5.58  4.46  7.81   5.58 13.94
36 1.35 0.81  6.46 10.77 2.69  5.38  7.54   5.38  4.31  7.54   5.38 13.46
35 1.30 0.78  6.23 10.38 2.60  5.19  7.27   5.19  4.15  7.27   5.19 12.98
34 1.25 0.75  6.00 10.00 2.50  5.00  7.00   5.00  4.00  7.00   5.00 12.50
33 1.20 0.72  5.77  9.62 2.40  4.81  6.73   4.81  3.85  6.73   4.81 12.02
32 1.15 0.69  5.54  9.23 2.31  4.62  6.46   4.62  3.69  6.46   4.62 11.54
31 1.11 0.66  5.31  8.85 2.21  4.42  6.19   4.42  3.54  6.19   4.42 11.06
30 1.06 0.63  5.08  8.46 2.12  4.23  5.92   4.23  3.38  5.92   4.23 10.58
29 1.01 0.61  4.85  8.08 2.02  4.04  5.65   4.04  3.23  5.65   4.04 10.10
28 0.96 0.58  4.62  7.69 1.92  3.85  5.38   3.85  3.08  5.38   3.85  9.62
27 0.91 0.55  4.38  7.31 1.83  3.65  5.12   3.65  2.92  5.12   3.65  9.13
26 0.87 0.52  4.15  6.92 1.73  3.46  4.85   3.46  2.77  4.85   3.46  8.65
25 0.82 0.49  3.92  6.54 1.63  3.27  4.58   3.27  2.62  4.58   3.27  8.17
24 0.77 0.46  3.69  6.15 1.54  3.08  4.31   3.08  2.46  4.31   3.08  7.69
23 0.72 0.43  3.46  5.77 1.44  2.88  4.04   2.88  2.31  4.04   2.88  7.21
22 0.67 0.40  3.23  5.38 1.35  2.69  3.77   2.69  2.15  3.77   2.69  6.73
21 0.63 0.38  3.00  5.00 1.25  2.50  3.50   2.50  2.00  3.50   2.50  6.25
20 0.58 0.35  2.77  4.62 1.15  2.31  3.23   2.31  1.85  3.23   2.31  5.77
19 0.53 0.32  2.54  4.23 1.06  2.12  2.96   2.12  1.69  2.96   2.12  5.29
18 0.48 0.29  2.31  3.85 0.96  1.92  2.69   1.92  1.54  2.69   1.92  4.81
17 0.43 0.26  2.08  3.46 0.87  1.73  2.42   1.73  1.38  2.42   1.73  4.33
16 0.38 0.23  1.85  3.08 0.77  1.54  2.15   1.54  1.23  2.15   1.54  3.85
15 0.34 0.20  1.62  2.69 0.67  1.35  1.88   1.35  1.08  1.88   1.35  3.37
14 0.29 0.17  1.38  2.31 0.58  1.15  1.62   1.15  0.92  1.62   1.15  2.88
13 0.24 0.14  1.15  1.92 0.48  0.96  1.35   0.96  0.77  1.35   0.96  2.40
12 0.19 0.12  0.92  1.54 0.38  0.77  1.08   0.77  0.62  1.08   0.77  1.92
11 0.14 0.09  0.69  1.15 0.29  0.58  0.81   0.58  0.46  0.81   0.58  1.44
10 0.10 0.06  0.46  0.77 0.19  0.38  0.54   0.38  0.31  0.54   0.38  0.96
 9 0.05 0.03  0.23  0.38 0.10  0.19  0.27   0.19  0.15  0.27   0.19  0.48
 8 0.00 0.00  0.00  0.00 0.00  0.00  0.00   0.00  0.00  0.00   0.00  0.00
   WepS Defe Dodge Parry Bloc M-Hit M-Crit M-Hst S-Hit S-Crit S-Hst Resil

              Agility needed for 1% Crit
    War   Pal   Hun   Rog   Pri   Sha  Mage   Lock  Dru
 1  4.00  4.60  3.52  2.23 11.00  6.01 12.97  6.67  4.95
 2  4.20  4.83  3.53  2.33 11.00  6.01 12.97  6.67  4.95
 3  4.20  4.83  3.69  2.43 11.00  6.32 12.97  7.00  5.20
 4  4.40  5.06  3.95  2.62 11.56  6.32 13.61  7.00  5.20
 5  4.60  5.06  4.12  2.72 11.56  6.62 13.61  7.00  5.45
 6  4.80  5.29  4.28  2.82 11.56  6.62 13.61  7.33  5.45
 7  4.80  5.29  4.44  3.01 11.56  6.62 13.61  7.33  5.69
 8  5.00  5.52  4.61  3.11 12.11  6.92 13.61  7.33  5.69
 9  5.20  5.52  4.88  3.21 12.11  6.92 13.61  7.67  5.94
10  5.20  5.75  5.04  3.40 12.11  7.22 14.27  7.67  6.44
11  5.40  5.75  5.41  3.79 12.11  7.22 14.27  8.00  6.68
12  5.60  5.98  5.99  4.18 12.66  7.52 14.27  8.00  6.68
13  6.00  6.44  6.46  4.66 12.66  7.52 14.27  8.00  6.93
14  6.20  6.44  6.94  5.05 12.66  7.82 14.27  8.33  6.93
15  6.40  6.90  7.52  5.63 12.66  8.12 14.90  8.67  7.43
16  6.60  6.90  7.89  6.02 13.21  8.42 14.90  9.00  7.43
17  6.80  7.13  8.38  6.41 13.21  8.42 14.90  9.00  7.67
18  7.20  7.59  8.95  6.90 13.21  8.72 14.90  9.00  7.92
19  7.40  7.59  9.43  7.38 13.76  8.72 14.90  9.34  7.92
20  7.80  8.05 10.02  7.87 13.76  9.32 15.55  9.67  8.91
21  7.80  8.28 10.40  8.35 13.76  9.32 15.55 10.00  8.91
22  8.00  8.28 10.99  8.74 13.76  9.62 15.55 10.00  9.16
23  8.40  8.74 11.47  9.23 14.31  9.62 15.55 10.33  9.41
24  8.60  8.97 12.06  9.62 14.31  9.92 16.21 10.33  9.41
25  9.00  9.20 12.55 10.20 14.31 10.22 16.21 11.00  9.90
26  9.20  9.43 13.04 10.68 14.86 10.53 16.21 11.00  9.90
27  9.40  9.66 13.62 11.07 14.86 10.53 16.21 11.00 10.15
28  9.80  9.89 14.10 11.56 14.86 10.82 16.21 11.34 10.40
29 10.00 10.12 14.71 12.05 15.41 10.82 16.86 11.34 10.40
30 10.40 10.58 15.29 12.63 15.41 11.43 16.86 12.00 11.39
31 10.60 10.81 15.70 13.02 15.41 11.43 16.86 12.00 11.64
32 10.80 10.81 16.29 13.50 15.95 11.72 16.86 12.33 11.64
33 11.20 11.27 16.89 13.99 15.95 12.03 17.51 12.33 11.89
34 11.40 11.49 17.39 14.47 15.95 12.03 17.51 12.67 12.14
35 11.81 11.96 17.99 15.06 16.50 12.63 17.51 13.00 12.38
36 12.00 12.20 18.48 15.55 16.50 12.94 18.15 13.33 12.63
37 12.20 12.20 19.08 15.92 16.50 12.94 18.15 13.66 12.87
38 12.59 12.64 19.69 16.42 17.06 13.23 18.15 13.66 12.87
39 12.80 12.89 20.28 16.89 17.06 13.23 18.15 14.01 13.12
40 13.19 13.33 20.79 17.48 17.06 13.83 18.80 14.33 14.10
41 13.61 13.57 21.28 17.99 17.61 14.14 18.80 14.66 14.37
42 13.79 13.57 21.88 18.45 17.61 14.14 18.80 14.66 14.37
43 14.20 14.03 22.52 18.94 18.15 14.43 18.80 14.99 14.60
44 14.41 14.27 23.09 19.53 18.15 14.73 19.46 14.99 14.86
45 14.79 14.73 23.75 20.12 18.15 15.04 19.46 15.67 15.36
46 14.99 14.95 24.21 20.58 18.73 15.34 19.46 16.00 15.60
47 15.41 15.17 24.88 21.10 18.73 15.65 20.08 16.00 15.60
48 15.80 15.65 25.58 21.55 19.27 15.95 20.08 16.34 15.85
49 16.00 15.87 26.18 22.03 19.27 15.95 20.08 16.67 16.10
50 16.39 16.34 26.81 22.73 19.27 16.53 20.75 17.01 17.09
51 16.81 16.56 27.32 23.20 19.80 16.84 20.75 17.33 17.33
52 17.01 16.78 27.93 23.70 19.80 17.15 20.75 17.33 17.57
53 17.39 17.24 28.57 24.27 20.37 17.15 21.41 17.67 17.83
54 17.79 17.48 29.33 24.75 20.37 17.45 21.41 17.99 17.83
55 18.21 17.95 29.94 25.38 20.92 18.05 21.41 18.35 18.32
56 18.42 18.18 30.49 25.91 20.92 18.35 22.03 18.66 18.55
57 18.80 18.38 31.15 26.46 21.46 18.66 22.03 19.01 18.83
58 19.19 18.87 31.85 27.03 21.46 18.66 22.03 19.34 19.05
59 19.61 19.08 32.57 27.47 22.03 18.94 22.68 19.34 19.31
60 20.00 19.53 33.22 28.17 22.03 19.53 22.68 20.00 20.28
61 21.32 20.37 33.67 29.94 22.57 20.16 22.99 20.66 20.92
62 22.62 20.70 34.48 31.06 22.52 20.58 23.15 20.79 21.19
63 23.92 21.19 35.21 32.57 22.68 21.28 23.58 21.28 21.93
64 25.19 21.93 35.84 33.78 23.09 21.93 23.64 21.98 22.37
65 26.53 22.42 36.63 34.97 23.47 22.27 23.70 22.32 22.83
66 27.78 22.88 37.04 36.23 23.87 22.88 24.33 22.99 23.26
67 29.07 23.53 37.88 37.31 24.15 23.42 24.27 22.94 23.58
68 30.40 24.04 38.61 38.17 24.27 23.98 24.51 23.58 24.27
69 31.75 24.51 39.37 39.06 24.39 24.51 24.75 24.15 24.63
70 33.00 25.00 40.00 40.00 25.00 25.00 25.00 24.69 25.00
    War   Pal   Hun   Rog   Pri   Sha  Mage   Lock  Dru

     Intellect needed for 1% Spell Crit
    Pal   Hun   Pri   Sha   Mage  Lock  Dru
 1 12.02 14.31  5.85  7.50  6.11  6.67  6.99
 2 12.61 15.02  6.11  7.86  6.35  6.97  7.30
 3 12.61 15.02  6.38  8.22  6.60  7.27  7.62
 4 13.21 15.75  6.64  8.22  7.09  7.58  7.94
 5 13.21 15.75  7.17  8.58  7.33  7.88  8.26
 6 13.81 16.45  7.44  8.93  7.58  8.18  8.58
 7 14.41 16.45  7.71  9.29  7.82  8.48  8.90
 8 14.41 17.15  7.97  9.64  8.06  8.79  8.90
 9 15.02 17.15  8.24 10.00  8.55  9.09  9.21
10 15.02 17.89  8.77 10.00  8.80  9.39 10.16
11 15.63 17.89  9.57 10.72  9.53 10.30 10.80
12 16.23 18.59 10.63 11.43 10.75 11.21 11.75
13 16.84 20.04 11.43 12.50 11.48 12.12 12.39
14 17.42 20.04 12.76 13.23 13.68 13.04 13.33
15 18.62 21.46 13.81 14.29 14.90 13.95 14.62
16 18.62 21.46 14.62 15.02 15.65 14.53 15.24
17 19.23 22.17 15.95 15.72 16.61 15.75 16.21
18 20.41 23.58 16.75 16.78 17.61 16.67 16.84
19 20.41 23.58 17.79 17.51 18.59 17.57 17.79
20 21.65 25.06 19.12 18.59 19.80 18.48 19.38
21 22.22 25.77 19.92 19.31 20.53 19.38 20.00
22 22.83 25.77 21.28 20.00 21.74 20.28 20.96
23 23.42 27.17 22.08 21.10 22.47 21.23 21.60
24 24.04 27.93 23.36 21.79 23.70 22.42 22.88
25 25.25 28.57 24.45 22.88 24.69 23.31 23.81
26 25.84 29.33 25.51 23.58 25.64 23.92 24.45
27 25.84 30.03 26.60 24.27 26.88 25.13 25.38
28 27.03 30.77 27.62 25.38 29.59 26.04 26.04
29 27.62 31.45 28.74 26.11 30.77 27.25 27.32
30 28.82 32.89 30.03 27.17 32.05 28.17 28.90
31 29.41 33.67 31.06 28.25 32.79 28.82 29.50
32 30.03 33.67 32.15 28.90 34.01 30.03 30.77
33 30.67 35.09 33.22 30.03 34.97 30.86 31.45
34 31.25 35.71 34.60 30.77 35.97 32.15 32.36
35 32.47 37.17 35.59 31.85 37.17 33.00 33.67
36 33.00 37.88 36.63 32.89 38.17 33.90 34.25
37 33.67 37.88 38.02 33.56 39.37 35.21 35.21
38 34.84 39.37 39.06 34.60 40.32 36.10 36.23
39 35.46 40.00 40.16 35.34 41.49 37.31 37.17
40 36.63 41.49 41.49 36.76 42.55 38.17 39.06
41 37.31 42.19 42.55 37.45 43.48 39.06 39.68
42 37.88 42.19 43.86 38.17 46.51 40.32 40.98
43 39.06 43.67 44.84 39.37 47.39 41.15 41.67
44 39.06 44.44 46.30 40.32 48.54 42.37 42.92
45 40.32 45.87 47.62 41.49 49.75 43.67 43.86
46 40.82 46.51 48.54 42.55 50.76 44.64 44.84
47 42.02 47.17 50.00 43.29 52.08 45.45 45.66
48 43.29 48.54 51.02 44.25 53.19 46.73 46.73
49 43.86 49.26 52.36 45.45 54.35 47.85 47.85
50 45.05 50.76 53.76 46.51 55.87 49.02 49.50
51 45.66 51.55 54.64 47.62 56.82 50.00 50.51
52 46.30 52.08 56.18 48.31 57.80 51.28 51.81
53 47.39 53.76 57.14 49.75 58.82 52.36 52.36
54 48.08 54.35 58.48 50.25 60.24 53.76 53.76
55 49.26 55.87 60.24 51.81 61.73 54.95 54.95
56 49.75 56.50 60.98 52.63 64.94 55.87 55.87
57 50.51 57.14 62.50 53.48 66.23 56.82 56.82
58 52.36 58.82 63.69 54.95 67.11 58.14 57.80
59 52.91 59.52 64.94 55.87 68.49 59.52 59.17
60 54.05 60.98 66.23 57.14 69.93 60.61 60.98
61 63.69 63.69 67.57 60.98 69.93 62.89 61.73
62 65.36 64.94 68.97 62.89 69.93 64.94 63.69
63 67.57 66.67 69.93 65.79 69.93 67.57 66.67
64 69.93 69.44 71.94 68.03 70.42 69.93 68.49
65 71.43 70.92 72.99 70.42 70.42 72.46 70.42
66 73.53 72.99 74.63 72.46 72.46 74.07 72.99
67 75.19 75.19 75.76 74.63 75.19 76.92 75.19
68 76.34 76.92 76.92 76.34 76.34 78.74 76.34
69 78.13 78.13 78.74 78.13 78.13 80.00 78.13
70 80.00 80.00 80.00 80.00 80.00 81.97 80.00
    Pal   Hun   Pri   Sha   Mage  Lock  Dru


**********
** TODO **
**********

- Support for sets
- Option: Hide default stats
- Option: Show only in city
- Check for equipped weapon type when calculating weapon skill ratings

Sum Resilience

"Intelligently compare Crit Immunity in the StatSummary?" 
[ ] Tick Box. 
Ticked -- Tooltip: StatSummary will now show '% to be critted' comparisons while AWARE of your opponent's level as defined below. 
Unticked (Default) -- Tooltip: StatSummary will now show '% to be critted' comparisons while UNAWARE of your opponent's level. 
[ ] Number Field. 
Illuminates when Ticked and Dims when Unticked (Default value, but Dimmed, is 73) -- Tooltip: Type the opponent's level you'd like StatSummary to stop comparing 'crit immunity' for. 

Try to fix mana oil enchants

-- Transition to 2.3.0
if select(2, GetBuildInfo()) >= "7382" then

Shamanistic Rage (Enhancement) now also reduces all damage taken by 30% for the duration. 
Elune's Grace (Night Elf) effect changed to reduce chance to be hit by melee and ranged attacks by 20% for 15 seconds. There is now only 1 rank of the spell. 
Pain Suppression (Discipline Talent) is now usable on friendly targets, instantly reduces the target's threat by 5%, reduces damage taken by 40% and its cooldown has been reduced to 2 minutes. 
Pursuit of Justice (Retribution) is now 3 ranks and increases movement speed by 5/10/15% and also reduces the chance you'll be hit by spells by 1/2/3%. 

*********************
** Version History **
*********************
1.2.8
- Fixed: +X Spell Power gives healing too
- In 2.3.0: Support for Spell Damage bonus in +Healing stats
1.2.7
- NEW: Option to Show detail text for Resiliance and Experise conversions
- NEW: Option to Show Avoidance Summary <- Dodge, Parry, MobMiss
- NEW: TankPoints support, if you have TankPoints loaded you get 2 new summary options: TankPoints and Total Reduction
- In 2.3.0: Added Expertise stat support
- In 2.3.0: Heart of the Wild (Druid Feral Combat talant) provides 2/4/6/8/10% bonus attack power in Cat form instead
- In 2.3.0: Intensity (Druid Restoration talant) increased to 10/20/30% mana regeneration
- In 2.3.0: Arcane Meditation (Mage Arcane talant) increased to 10/20/30% mana regeneratio
- In 2.3.0: Meditation (Priest Discipline talant) increased to 10/20/30% mana regeneration
- In 2.3.0: Weapon Expertise (Paladin Protection talant) renamed Combat Expertise, now increases expertise by 1/2/3/4/5 and total Stamina by 2/4/6/8/10%
- In 2.3.0: Mental Quickness (Shaman Enhancement talant) now also increases spell damage and healing equal to 10/20/30% of your attack power
- All 2.3.0 Changes will only take affect when using a 2.3.0 client.
- Updated German localization
1.2.6
- Fixed: Ranged AP Calculations
1.2.5
- Updated: toc to 20200
- Fixed: Haste rating change in 2.2.0
- Fixed: Hunter Survival Instincts talant support
- Fixed: Armor multiplier no longer applys to Armor from enchants
- NEW: Added China localization by iceburn(candykiss)
- Updated: Taiwan localization
- Updated: Korean localization by fenlis
- Updated: German localization by Dleh
- Code optimizations
- Updated: Libs
1.2.4
- Fixed: Error when difftype is set to comp
- Made Waterfall-1.0 optional
1.2.3
- NEW: You can now open the options window using /rb optionswin
- Updated Taiwan localization
- Updated Korean localizations by fenlis
1.2.2
- New option to hide the StatSummary title
- New option to hide the sigma icon in the StatSummary title
- New option to add a empty line after the StatSummary
- Updated Taiwan localization
- Other localizations needs to be updated
1.2.1
- Updated Taiwan localization
- Improved stat scanning
- Updated German localization
1.2.0
- Updated French localization by Tixu and Silaor, now supports StatSummary
- Fixed a bug causing StatSummary not showing correctly for languages other then English
- Fixed Parry/SpellHaste rating conversions
- Updated libs
1.1.9
- Pre updated the TOC to 2.1.0
- Improved the Sigma icon
- Updated readme file
1.1.8
- StatSummary: "Mana Regen while Not casting" now shows the correct value
- StatSummary: "Health Regen while Out of Combat" now shows the correct value
- StatSummary: fixed lines with "and" counting stats twice
- Added support for Gnome +5% Intellect Racial
- Added support for Human +10% Spirit Racial
- Fixed StatLogic line 6285 strfind error (thanks to everyone that helped)
- Updated Korean localizations by fenlis
1.1.7
- Minor bug fixes
- Updated Taiwan localizations by mcc
- Updated Korean localizations by fenlis
- Updated French localizations by renchap
1.1.6
- Stat Summary now has the option to show resistances
- Fixed Feral Attack Power name
- /rb sum ignore unused now shows leather for hunters
- Fixed an error when mousing over items that goes into a slot you currently have no equipment in when you have the ignore enchant or gem option on
1.1.5
- Fixed MP5NC, HP5OC summary
- Changed default diff style from comp to main, since not everyone uses a compare addon
- Attempt to fix some more funny bugs
1.1.4
- Option to display Weapon Max Damage in summary
- Improved option for ignoring enchants and gems, they are now 2 different options
- Fixed some classes not showing summary for cloaks
- Fixed incorrect shield diffs
- Improved diff style code should fix funny errors
1.1.3
- Fixed EQCompare, tekKompare support
- Updated Taiwan localizations
1.1.2
- Option to Display diff values in the main tooltip or only in compare tooltips for readability
- Option to Ignore enchants and gems on items when calculating the stat summary
- /rb sum ignore unused now shows all armor types they are use for druids, paladins and shamans
- Updated Taiwan localizations
- Code clean up
1.1.1
- Option to Show stat summary only for highest level armor type and items you can use with uncommon quality and up
- Option to Hide stat summary for equipped items
- Option to Add a blank line before stat summary for readability
- Mage, Warlock, Shaman now shows spellcrit as default summary instead of crit 
- Updated Taiwan localizations
- Minor bug fixes
1.1.0
- NEW: Stat Summary - Display the sum of stats of the item and/or the stat difference of the item and your equipped items
- Choose the stats you really care about to be show in the summary
- Composite stats are broken down and added into base stats, and supports talant/buff mods, Ex: "Spell Crit Chance" is calculated from "Spell Crit Rating" and "Intellect"
- Option discriptions now show class names for class specific stat conversions
- Added support for Aspect of the Viper
- Option to hide rating conversions
- Option to hide all base stat conversions
- Option to further breakdown Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block
- Option to further breakdown Weapon Skills into Crit, Hit, Dodge Neglect, Parry Neglect, Block Neglect
- Fixed Taiwan and French localization errors
- Fixed locale registering twice error
- Fixed mp5 and hp5 calculations for Shaman, Druid, Mage, Warlock
- Agi -> Dodge only works for your current level, for best results turn off /rb usereqlv, and set /rb level 0
1.0.0
- Support for talents and buffs that modify your stats
- Supports the following stat conversions
- Str -> AP, Block, Healing(Talant)
- Agi -> Crit, Dodge, AP, RAP, Armor
- Sta -> Health, SpellDmg(Talant)
- Int -> Mana, SpellCrit, SpellDmg(Talant), Healing(Talant), MP5(Talant), RAP(Talant), Armor(Talant)
- Spi -> MP5(Talant), MP5NC, HP5, SpellDmg(Talant), Healing(Talant)
- If you need a GUI config window for RatingBuster, use Niagara (Download at: http://files.wowace.com/)
0.9.5
- Fixed library error
0.9.4
- Added Taiwan localizations by CuteMiyu
0.9.3
- Updated Korean localization by kcgcom
0.9.2
- Code clean up
- Finally removed Compost
0.9.1a
- Really fixed locales
0.9.1
- Fixed locales
- Added Korean localization by kcgcom
0.9.0
- Optimized parsing algorithm to use fewer resources
- showCritFromAgi and showSpellCritFromInt will now correctly save as per class data
- /rb level will now save
- No longer scans buffs
- Code clean up
0.8.6
- tekKompare support
- Sniff support
0.8.5
- AtlasLoot support
- ItemMagic support
- Fixed line 785 error
0.8.4
- Spell Crit from Intellect defaults off for Hunters too
0.8.3
- Fixed color picker bug
- Updated French localization (Tixu)
0.8.2
- Fixed % signs showing before some periods bug
0.8.1
- Option to enable colored text (/rb color)
- Fixed Defense showing the % sign bug
- Fixed Haste Rating conversion
- Updated French localization (Tixu)
0.8.0
- Option to show Crit from Agility, Ex: "+15 Agility (+0.72% Crit)"
- Option to show Spell Crit from Intellect, Ex: "+23 Intellect (+0.35% Spell Crit)"
- Support for "grant you xx stat" type pattern, ex: Quel'Serrar, Assassination Armor set
- "+14 (1.21%) Rating" type strings changed to "+14 Rating (+1.21%)"
- Recoded tooltip scanner is now more eazily extendable and has support for multiple separators for better accuracy.
0.7.6
- The amount of haste granted by a point of haste rating has been increased by 50% (Patch 2.0.7)
- Fixed Mutltitips support
- Minor code tweaks
0.7.5
- Fixed double conversion bug
- Fixed GetItem error
- Support for Hit Avoidance Rating (assuming its the same as melee Hit Rating)
0.7.1
- Fixed a hooking bug
0.7.0
- Now uses the OnTooltipSetItem script handler instead of hooking all the SetX methods,
  this combined with the new Tooltip:GetItem() method should also fix problems where
  RatingBuster doesn't always work, like at the mailbox.
0.6.6
- MultiTips support
0.6.5
- LinkWrangler support
0.6.4
- Updated Libs
0.6.3
- Use required level defaults to true
- Support for EQCompare
- Changed toc to 20003 for TBC (It will show up as out-of-date until TBC goes live, enable loading out-of-date to load it)
0.6.2
- Added German localization by Runenstetter@Nathrezim.EU
- Fixed French localization
0.6.1
- Added French localization by Tixu
0.6
- Added option to calculate using the required level if you are below the required level
- Redesigned the tooltip scanner to be more locale friendly, should be eazier to do translations now.
0.5.1
- Fixed line 457 error
0.5
- Improved ItemLevel and ItemID algorithm, will now work on most tooltips
- Updated Libs
0.4.3
- Fixed line 499 error
- Temporarily removed ItemLevel and ID support for Bagnon, working on a better implementation
0.4.2
- Fixed a rare error in line 487
- Updated Libs
0.4.1
- Inspect frame support for ItemLevel and ItemID
- Two-Handed skill ratings now works
0.4
- Bagnon support for ItemLevel and ItemID
- Fixed some errors
- Updated libs
0.3.2
- Fixed auction house bug
0.3.1
- Fixed keyring bug
0.3
- Works with enchant links
- Works with keyring items
0.2.1
- Fixed AceConsole error
0.2
- Simplified the localization file for eazier localization
- Added keyword "spell crit"
- Added Item Level, Item ID support for proffession trainer items
- Set Debugging to false
0.1.1
- Removed AceHook2.1 cause it was causing problems with other Ace2 addons
0.1
- Initial release