vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 -- bonus names
2 BONUSSCANNER_NAMES = {
3 STR = "Strength",
4 AGI = "Agility",
5 STA = "Stamina",
6 INT = "Intellect",
7 SPI = "Spirit",
8 ARMOR = "Reinforced Armor",
9  
10 ARCANERES = "Arcane Resistance",
11 FIRERES = "Fire Resistance",
12 NATURERES = "Nature Resistance",
13 FROSTRES = "Frost Resistance",
14 SHADOWRES = "Shadow Resistance",
15  
16 FISHING = "Fishing",
17 MINING = "Mining",
18 HERBALISM = "Herbalism",
19 SKINNING = "Skinning",
20 DEFENSE = "Defense",
21  
22 BLOCK = "Block",
23 DODGE = "Dodge",
24 PARRY = "Parry",
25 ATTACKPOWER = "Attack Power",
26 ATTACKPOWERUNDEAD = "Attack Power against Undead",
27 CRIT = "Crit. hits",
28 RANGEDATTACKPOWER = "Ranged Attack Power",
29 RANGEDCRIT = "Crit. Shots",
30 TOHIT = "Chance to Hit",
31  
32 DMG = "Spell Damage",
33 DMGUNDEAD = "Spell Damage against Undead",
34 ARCANEDMG = "Arcane Damage",
35 FIREDMG = "Fire Damage",
36 FROSTDMG = "Frost Damage",
37 HOLYDMG = "Holy Damage",
38 NATUREDMG = "Nature Damage",
39 SHADOWDMG = "Shadow Damage",
40 SPELLCRIT = "Crit. Spell",
41 SPELLTOHIT = "Chance to Hit with spells",
42 SPELLPEN = "Spell Penetration",
43 HEAL = "Healing",
44 HOLYCRIT = "Crit. Holy Spell",
45  
46 HEALTHREG = "Life Regeneration",
47 MANAREG = "Mana Regeneration",
48 HEALTH = "Life Points",
49 MANA = "Mana Points"
50 };
51  
52 -- equip and set bonus prefixes:
53 BONUSSCANNER_PREFIX_EQUIP = "Equip: ";
54 BONUSSCANNER_PREFIX_SET = "Set: ";
55  
56 -- passive bonus patterns. checked against lines which start with above prefixes
57 BONUSSCANNER_PATTERNS_PASSIVE = {
58 { pattern = "+(%d+) ranged Attack Power%.", effect = "RANGEDATTACKPOWER" },
59 { pattern = "Increases your chance to block attacks with a shield by (%d+)%%%.", effect = "BLOCK" },
60 { pattern = "Increases your chance to dodge an attack by (%d+)%%%.", effect = "DODGE" },
61 { pattern = "Increases your chance to parry an attack by (%d+)%%%.", effect = "PARRY" },
62 { pattern = "Improves your chance to get a critical strike with spells by (%d+)%%%.", effect = "SPELLCRIT" },
63 { pattern = "Improves your chance to get a critical strike with Holy spells by (%d+)%%%.", effect = "HOLYCRIT" },
64 { pattern = "Increases the critical effect chance of your Holy spells by (%d+)%%%.", effect = "HOLYCRIT" },
65 { pattern = "Improves your chance to get a critical strike by (%d+)%%%.", effect = "CRIT" },
66 { pattern = "Improves your chance to get a critical strike with missile weapons by (%d+)%%%.", effect = "RANGEDCRIT" },
67 { pattern = "Increases damage done by Arcane spells and effects by up to (%d+)%.", effect = "ARCANEDMG" },
68 { pattern = "Increases damage done by Fire spells and effects by up to (%d+)%.", effect = "FIREDMG" },
69 { pattern = "Increases damage done by Frost spells and effects by up to (%d+)%.", effect = "FROSTDMG" },
70 { pattern = "Increases damage done by Holy spells and effects by up to (%d+)%.", effect = "HOLYDMG" },
71 { pattern = "Increases damage done by Nature spells and effects by up to (%d+)%.", effect = "NATUREDMG" },
72 { pattern = "Increases damage done by Shadow spells and effects by up to (%d+)%.", effect = "SHADOWDMG" },
73 { pattern = "Increases healing done by spells and effects by up to (%d+)%.", effect = "HEAL" },
74 { pattern = "Increases damage and healing done by magical spells and effects by up to (%d+)%.", effect = {"HEAL", "DMG"} },
75 { pattern = "Increases damage done to Undead by magical spells and effects by up to (%d+)", effect = "DMGUNDEAD" },
76 { pattern = "+(%d+) Attack Power when fighting Undead.", effect = "ATTACKPOWERUNDEAD" },
77 { pattern = "Restores (%d+) health per 5 sec%.", effect = "HEALTHREG" },
78 { pattern = "Restores (%d+) health every 5 sec%.", effect = "HEALTHREG" }, -- both versions ('per' and 'every') seem to be used
79 { pattern = "Restores (%d+) mana per 5 sec%.", effect = "MANAREG" },
80 { pattern = "Restores (%d+) mana every 5 sec%.", effect = "MANAREG" },
81 { pattern = "Improves your chance to hit by (%d+)%%%.", effect = "TOHIT" },
82 { pattern = "Improves your chance to hit with spells by (%d+)%%%.", effect = "SPELLTOHIT" },
83 { pattern = "Decreases the magical resistances of your spell targets by (%d+).", effect = "SPELLPEN" }
84 };
85  
86 -- generic patterns have the form "+xx bonus" or "bonus +xx" with an optional % sign after the value.
87  
88 -- first the generic bonus string is looked up in the following table
89 BONUSSCANNER_PATTERNS_GENERIC_LOOKUP = {
90 ["All Stats"] = {"STR", "AGI", "STA", "INT", "SPI"},
91 ["Strength"] = "STR",
92 ["Agility"] = "AGI",
93 ["Stamina"] = "STA",
94 ["Intellect"] = "INT",
95 ["Spirit"] = "SPI",
96  
97 ["All Resistances"] = { "ARCANERES", "FIRERES", "FROSTRES", "NATURERES", "SHADOWRES"},
98  
99 ["Fishing"] = "FISHING",
100 ["Fishing Lure"] = "FISHING",
101 ["Increased Fishing"] = "FISHING",
102 ["Mining"] = "MINING",
103 ["Herbalism"] = "HERBALISM",
104 ["Skinning"] = "SKINNING",
105 ["Defense"] = "DEFENSE",
106 ["Increased Defense"] = "DEFENSE",
107  
108 ["Attack Power"] = "ATTACKPOWER",
109 ["Attack Power when fighting Undead"] = "ATTACKPOWERUNDEAD",
110 ["Dodge"] = "DODGE",
111 ["Block"] = "BLOCK",
112 ["Hit"] = "TOHIT",
113 ["Spell Hit"] = "SPELLTOHIT",
114 ["Blocking"] = "BLOCK",
115 ["Ranged Attack Power"] = "RANGEDATTACKPOWER",
116 ["health every 5 sec"] = "HEALTHREG",
117 ["Healing Spells"] = "HEAL",
118 ["Increases Healing"] = "HEAL",
119 ["Healing and Spell Damage"] = {"HEAL", "DMG"},
120 ["Damage and Healing Spells"] = {"HEAL", "DMG"},
121 ["Spell Damage and Healing"] = {"HEAL", "DMG"},
122 ["mana every 5 sec"] = "MANAREG",
123 ["Mana Regen"] = "MANAREG",
124 ["Spell Damage"] = "DMG",
125 ["Critical"] = "CRIT",
126 ["Critical Hit"] = "CRIT",
127 ["Damage"] = "DMG",
128 ["Health"] = "HEALTH",
129 ["HP"] = "HEALTH",
130 ["Mana"] = "MANA",
131 ["Armor"] = "ARMOR",
132 ["Reinforced Armor"] = "ARMOR",
133 };
134  
135 -- next we try to match against one pattern of stage 1 and one pattern of stage 2 and concatenate the effect strings
136 BONUSSCANNER_PATTERNS_GENERIC_STAGE1 = {
137 { pattern = "Arcane", effect = "ARCANE" },
138 { pattern = "Fire", effect = "FIRE" },
139 { pattern = "Frost", effect = "FROST" },
140 { pattern = "Holy", effect = "HOLY" },
141 { pattern = "Shadow", effect = "SHADOW" },
142 { pattern = "Nature", effect = "NATURE" }
143 };
144  
145 BONUSSCANNER_PATTERNS_GENERIC_STAGE2 = {
146 { pattern = "Resist", effect = "RES" },
147 { pattern = "Damage", effect = "DMG" },
148 { pattern = "Effects", effect = "DMG" },
149 };
150  
151 -- finally if we got no match, we match against some special enchantment patterns.
152 BONUSSCANNER_PATTERNS_OTHER = {
153 { pattern = "Mana Regen (%d+) per 5 sec%.", effect = "MANAREG" },
154  
155 { pattern = "Minor Wizard Oil", effect = {"DMG", "HEAL"}, value = 8 },
156 { pattern = "Lesser Wizard Oil", effect = {"DMG", "HEAL"}, value = 16 },
157 { pattern = "Wizard Oil", effect = {"DMG", "HEAL"}, value = 24 },
158 { pattern = "Brilliant Wizard Oil", effect = {"DMG", "HEAL", "SPELLCRIT"}, value = {36, 36, 1} },
159  
160 { pattern = "Minor Mana Oil", effect = "MANAREG", value = 4 },
161 { pattern = "Lesser Mana Oil", effect = "MANAREG", value = 8 },
162 { pattern = "Brilliant Mana Oil", effect = { "MANAREG", "HEAL"}, value = {12, 25} },
163  
164 { pattern = "Eternium Line", effect = "FISHING", value = 5 },
165 };