Mercurial > wow > wowdb-profiler
comparison Constants.lua @ 381:cc4a579b26d1
Assorted code cleanup and reorganization.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Wed, 10 Dec 2014 12:47:35 -0500 |
parents | 97824a39ddd3 |
children | b4a0a56ab3ae |
comparison
equal
deleted
inserted
replaced
380:97824a39ddd3 | 381:cc4a579b26d1 |
---|---|
11 ----------------------------------------------------------------------- | 11 ----------------------------------------------------------------------- |
12 local ADDON_NAME, private = ... | 12 local ADDON_NAME, private = ... |
13 | 13 |
14 | 14 |
15 ----------------------------------------------------------------------- | 15 ----------------------------------------------------------------------- |
16 -- Game Data Constants. | 16 -- Boss/Loot Data Constants. |
17 ----------------------------------------------------------------------- | 17 ----------------------------------------------------------------------- |
18 -- Map of Alliance Logging NPC Summon spells to all possible Timber objectIDs of the proper tree size | 18 -- Map of Alliance Logging NPC Summon spells to all possible Timber objectIDs of the proper tree size |
19 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP = { | 19 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP = { |
20 [167902] = 234021, --{ 233604, 233922, , 234080, 234097, 234109, 234110, 234122, 234126, 234193, 234197, 237727, }, | 20 [167902] = 234021, |
21 [167969] = 234022, --{ 233634, 234000, , 234098, 234111, 234119, 234123, 234127, 234194, 234196, 234198, }, | 21 [167969] = 234022, |
22 [168201] = 234023, --{ 233625, 234007, , 234099, 234120, 234124, 234128, 234195, 234199, }, | 22 [168201] = 234023, |
23 } | 23 } |
24 -- Account for Horde spell IDs | 24 -- Account for Horde spell IDs |
25 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[167961] = private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[167902] | 25 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[167961] = private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[167902] |
26 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[168043] = private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[167969] | 26 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[168043] = private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[167969] |
27 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[168200] = private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[168201] | 27 private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[168200] = private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP[168201] |
28 | |
29 -- Map of Salvage spells to item IDs of the Salvage containers (no longer loot toasts) | |
30 private.SALVAGE_SPELL_ID_TO_ITEM_ID_MAP = { | |
31 [168178] = 114116, -- Bag of Salvaged Goods | |
32 [168179] = 114119, -- Crate of Salvage | |
33 [168180] = 114120, -- Big Crate of Salvage | |
34 } | |
35 | 28 |
36 -- Map of Garrison Cache object names to Garrison Cache object IDs | 29 -- Map of Garrison Cache object names to Garrison Cache object IDs |
37 private.GARRISON_CACHE_OBJECT_NAME_TO_OBJECT_ID_MAP = { | 30 private.GARRISON_CACHE_OBJECT_NAME_TO_OBJECT_ID_MAP = { |
38 ["Garrison Cache"] = 236916, | 31 ["Garrison Cache"] = 236916, |
39 ["Full Garrison Cache"] = 237722, | 32 ["Full Garrison Cache"] = 237722, |
40 ["Hefty Garrison Cache"] = 237723, | 33 ["Hefty Garrison Cache"] = 237723, |
41 } | 34 } |
42 private.GARRISON_CACHE_LOOT_SOURCE_ID = 10 | 35 private.GARRISON_CACHE_LOOT_SOURCE_ID = 10 |
43 | 36 |
44 private.LOOT_SPELL_ID_TO_ITEM_ID_MAP = { | 37 -- Mapping of items that, when right-clicked, fire a spell (which can fail, so we have to check success). |
38 -- They reward loot via loot toast popups upon completion of that spell. | |
39 -- SHOW_LOOT_TOAST can be used to track loot. | |
40 private.LOOT_TOAST_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP = { | |
45 [142397] = 98134, -- Heroic Cache of Treasures | 41 [142397] = 98134, -- Heroic Cache of Treasures |
46 [142901] = 98546, -- Bulging Heroic Cache of Treasures | 42 [142901] = 98546, -- Bulging Heroic Cache of Treasures |
47 [143506] = 98095, -- Brawler's Pet Supplies | 43 [143506] = 98095, -- Brawler's Pet Supplies |
48 [143507] = 94207, -- Fabled Pandaren Pet Supplies | 44 [143507] = 94207, -- Fabled Pandaren Pet Supplies |
49 [143508] = 89125, -- Sack of Pet Supplies | 45 [143508] = 89125, -- Sack of Pet Supplies |
53 [143512] = 93148, -- Pandaren Spirit Pet Supplies | 49 [143512] = 93148, -- Pandaren Spirit Pet Supplies |
54 [146885] = 103535, -- Bulging Bag of Charms | 50 [146885] = 103535, -- Bulging Bag of Charms |
55 [147598] = 104014, -- Pouch of Timeless Coins | 51 [147598] = 104014, -- Pouch of Timeless Coins |
56 [149222] = 105911, -- Pouch of Enduring Wisdom | 52 [149222] = 105911, -- Pouch of Enduring Wisdom |
57 [149223] = 105912, -- Oversized Pouch of Enduring Wisdom | 53 [149223] = 105912, -- Oversized Pouch of Enduring Wisdom |
58 --[168178] = 114116, -- Bag of Salvaged Goods | |
59 --[168179] = 114119, -- Crate of Salvage | |
60 --[168180] = 114120, -- Big Crate of Salvage | |
61 [171513] = 116414, -- Pet Supplies | 54 [171513] = 116414, -- Pet Supplies |
62 [175767] = 118697, -- Big Bag of Pet Supplies | 55 [175767] = 118697, -- Big Bag of Pet Supplies |
63 [178508] = 120321, -- Mystery Bag | 56 [178508] = 120321, -- Mystery Bag |
64 } | 57 } |
58 | |
59 -- Mapping of items that, when right-clicked, fire a spell (which can fail, so we have to check success). | |
60 -- They reward loot upon completion of that spell. | |
61 -- CHAT_MSG_LOOT -must- be used to track loot, which is definitely not ideal. | |
62 private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP = { | |
63 [168178] = 114116, -- Bag of Salvaged Goods | |
64 [168179] = 114119, -- Crate of Salvage | |
65 [168180] = 114120, -- Big Crate of Salvage | |
66 } | |
67 | |
68 private.RAID_BOSS_BONUS_SPELL_ID_TO_NPC_ID_MAP = { | |
69 ----------------------------------------------------------------------- | |
70 -- World Bosses | |
71 ----------------------------------------------------------------------- | |
72 [132205] = 60491, -- Sha of Anger Bonus (Sha of Anger) | |
73 [132206] = 62346, -- Galleon Bonus (Galleon) | |
74 [136381] = 69099, -- Nalak Bonus (Nalak) | |
75 [137554] = 69161, -- Oondasta Bonus (Oondasta) | |
76 [148317] = 71952, -- Celestials Bonus (Chi-Ji) | |
77 [148316] = 72057, -- Ordos Bonus (Ordos) | |
78 [178848] = 81252, -- Drov the Ruiner Bonus Loot (Drov the Ruiner) | |
79 [178850] = 81535, -- Tarlna the Ageless Bonus Loot (Tarlna the Ageless) | |
80 [178852] = 83746, -- Rukhmar Bonus Loot (Rukhmar) | |
81 | |
82 ----------------------------------------------------------------------- | |
83 -- Blackrock Foundry | |
84 ----------------------------------------------------------------------- | |
85 [177510] = 76877, -- Gruul Bonus Loot (Gruul) | |
86 [177511] = 77182, -- Oregorger Bonus Loot (Oregorger) | |
87 [177512] = 76809, -- Blast Furnace Loot (Foreman Feldspar) | |
88 [177513] = 76973, -- Hans'gar & Franzok Bonus Loot (Hans'gar) | |
89 [177515] = 76814, -- Flamebender Ka'graz Bonus Loot (Flamebender Ka'graz) | |
90 [177516] = 77692, -- Kromog Bonus Loot (Kromog) | |
91 [177517] = 76865, -- Beastlord Darmac Bonus Loot (Beastlord Darmac) | |
92 [177518] = 76906, -- Operator Thogar Bonus Loot (Operator Thogar) | |
93 [177519] = 77557, -- The Iron Maidens Bonus Loot (Admiral Gar'an) | |
94 [177520] = 77325, -- Blackhand Bonus Loot (Blackhand) | |
95 | |
96 ----------------------------------------------------------------------- | |
97 -- Highmaul | |
98 ----------------------------------------------------------------------- | |
99 [177503] = 78714, -- Kargath Bladefist Bonus Loot (Kargath Bladefist) | |
100 [177504] = 77404, -- Butcher Bonus Loot (The Butcher) | |
101 [177505] = 78948, -- Tectus Bonus Loot (Tectus) | |
102 [177506] = 78491, -- Brackenspore Bonus Loot (Brackenspore) | |
103 [177507] = 78237, -- Twin Ogron Bonus Loot (Phemos) | |
104 [177508] = 79015, -- Ko'ragh Bonus Loot (Ko'ragh) | |
105 [177509] = 77428, -- Imperator Mar'gok Bonus Loot (Imperator Mar'gok) | |
106 | |
107 ----------------------------------------------------------------------- | |
108 -- Mists of Pandaria | |
109 ----------------------------------------------------------------------- | |
110 [125144] = 59915, -- Stone Guard Bonus (Jasper Guardian) | |
111 [132189] = 60009, -- Feng the Accursed Bonus (Feng the Accursed) | |
112 [132190] = 60143, -- Gara'jal the Spiritbinder Bonus (Gara'jal the Spiritbinder) | |
113 [132191] = 60709, -- Spirit Kings Bonus (Qiang the Merciless) | |
114 [132192] = 60410, -- Elegon Bonus (Elegon) | |
115 [132193] = 60399, -- Will of the Emperor Bonus (Qin-xi) | |
116 [132200] = 60583, -- Protectors of the Endless Bonus (Protector Kaolan) | |
117 [132204] = 60583, -- Protectors of the Endless (Elite) Bonus (Protector Kaolan) | |
118 [132201] = 62442, -- Tsulong Bonus (Tsulong) | |
119 [132202] = 62983, -- Lei Shi Bonus (Lei Shi) | |
120 [132203] = 60999, -- Sha of Fear Bonus (Sha of Fear) | |
121 [132194] = 62980, -- Imperial Vizier Zor'lok Bonus (Imperial Vizier Zor'lok) | |
122 [132195] = 62543, -- Blade Lord Tay'ak Bonus (Blade Lord Ta'yak) | |
123 [132196] = 62164, -- Garalon Bonus (Garalon) | |
124 [132197] = 62397, -- Wind Lord Mel'jarak Bonus (Wind Lord Mel'jarak) | |
125 [132198] = 62511, -- Amber-Shaper Un'sok Bonus (Amber-Shaper Un'sok) | |
126 [132199] = 62837, -- Grand Empress Shek'zeer Bonus (Grand Empress Shek'zeer) | |
127 [139674] = 69465, -- Jin'rokh the Breaker Bonus (Jin'rokh the Breaker) | |
128 [139677] = 68476, -- Horridon Bonus (Horridon) | |
129 [139679] = 69078, -- Zandalari Troll Council Bonus (Sul the Sandcrawler) | |
130 [139680] = 67977, -- Tortos Bonus (Tortos) | |
131 [139682] = 68065, -- Magaera Bonus (Megaera) | |
132 [139684] = 69712, -- Ji'kun, the Ancient Mother Bonus (Ji-Kun) | |
133 [139686] = 68036, -- Durumu the Forgotten Bonus (Durumu the Forgotten) | |
134 [139687] = 69017, -- Primordious Bonus (Primordius) | |
135 [139688] = 69427, -- Dark Animus Bonus (Dark Animus) | |
136 [139689] = 68078, -- Iron Qon Bonus (Iron Qon) | |
137 [139690] = 68904, -- The Empyreal Queens Bonus (Suen) | |
138 [139691] = 68397, -- Lei Shen, The Thunder King Bonus (Lei Shen) | |
139 [139692] = 69473, -- Ra-den Bonus (Ra-den) | |
140 [145909] = 71543, -- Immerseus Bonus (Immerseus) | |
141 [145910] = 71475, -- Fallen Protectors Bonus (Rook Stonetoe) | |
142 [145911] = 72276, -- Norushen Bonus (Amalgam of Corruption) | |
143 [145912] = 71734, -- Sha of Pride Bonus (Sha of Pride) | |
144 [145913] = 72249, -- Galakras Bonus (Galakras) | |
145 [145914] = 71466, -- Iron Juggernaut Bonus (Iron Juggernaut) | |
146 [145915] = 71859, -- Dark Shaman Bonus (Earthbreaker Haromm) | |
147 [145916] = 71515, -- General Nazgrim Bonus (General Nazgrim) | |
148 [145917] = 71454, -- Malkorok Bonus (Malkorok) | |
149 [145919] = 71889, -- Spoils of Pandaria Bonus (Secured Stockpile of Pandaren Spoils) | |
150 [145920] = 71529, -- Thok the Bloodthirsty Bonus (Thok the Bloodthirsty) | |
151 [145918] = 71504, -- Siegecrafter Blackfuse Bonus (Siegecrafter Blackfuse) | |
152 [145921] = 71161, -- Klaxxi Paragons Bonus (Kil'ruk the Wind-Reaver) | |
153 [145922] = 71865, -- Garrosh Hellscream Bonus (Garrosh Hellscream) | |
154 } | |
155 | |
156 | |
157 ----------------------------------------------------------------------- | |
158 -- Fundamental Constants. | |
159 ----------------------------------------------------------------------- | |
160 private.wow_version, private.build_num = _G.GetBuildInfo() | |
161 private.region = GetCVar("portal"):sub(0,2):upper() | |
162 -- PTR/Beta return "public-test", but they are properly called "XX" | |
163 if private.region == "PU" then private.region = "XX" end | |
164 | |
165 private.UNIT_TYPES = { | |
166 PLAYER = "Player", | |
167 OBJECT = "GameObject", | |
168 UNKNOWN = "Unknown", | |
169 NPC = "Creature", | |
170 PET = "Pet", | |
171 VEHICLE = "Vehicle", | |
172 ITEM = "Item", | |
173 } | |
174 | |
175 private.UNIT_TYPE_NAMES = { | |
176 ["Player"] = "PLAYER", | |
177 ["GameObject"] = "OBJECT", | |
178 ["Unknown"] = "UNKNOWN", | |
179 ["Creature"] = "NPC", | |
180 ["Pet"] = "PET", | |
181 ["Vehicle"] = "VEHICLE", | |
182 ["Item"] = "ITEM", | |
183 } | |
184 | |
185 private.ACTION_TYPE_FLAGS = { | |
186 ITEM = 0x00000001, | |
187 NPC = 0x00000002, | |
188 OBJECT = 0x00000004, | |
189 ZONE = 0x00000008, | |
190 } | |
191 | |
192 private.ACTION_TYPE_NAMES = {} | |
193 | |
194 for name, bit in _G.pairs(private.ACTION_TYPE_FLAGS) do | |
195 private.ACTION_TYPE_NAMES[bit] = name | |
196 end | |
197 | |
198 private.SPELL_LABELS_BY_NAME = { | |
199 [_G.GetSpellInfo(13262)] = "DISENCHANT", | |
200 [_G.GetSpellInfo(4036)] = "ENGINEERING", | |
201 [_G.GetSpellInfo(30427)] = "EXTRACT_GAS", | |
202 [_G.GetSpellInfo(131476)] = "FISHING", | |
203 [_G.GetSpellInfo(2366)] = "HERB_GATHERING", | |
204 [_G.GetSpellInfo(51005)] = "MILLING", | |
205 [_G.GetSpellInfo(605)] = "MIND_CONTROL", | |
206 [_G.GetSpellInfo(2575)] = "MINING", | |
207 [_G.GetSpellInfo(3365)] = "OPENING", | |
208 [_G.GetSpellInfo(921)] = "PICK_POCKET", | |
209 [_G.GetSpellInfo(31252)] = "PROSPECTING", | |
210 [_G.GetSpellInfo(73979)] = "SEARCHING_FOR_ARTIFACTS", | |
211 [_G.GetSpellInfo(8613)] = "SKINNING", | |
212 } | |
213 | |
214 private.NON_LOOT_SPELL_LABELS = { | |
215 MIND_CONTROL = true, | |
216 } | |
217 | |
218 local AF = private.ACTION_TYPE_FLAGS | |
219 | |
220 private.SPELL_FLAGS_BY_LABEL = { | |
221 DISENCHANT = AF.ITEM, | |
222 ENGINEERING = AF.NPC, | |
223 EXTRACT_GAS = AF.ZONE, | |
224 FISHING = AF.ZONE, | |
225 HERB_GATHERING = bit.bor(AF.NPC, AF.OBJECT), | |
226 MILLING = AF.ITEM, | |
227 MIND_CONTROL = AF.NPC, | |
228 MINING = bit.bor(AF.NPC, AF.OBJECT), | |
229 OPENING = AF.OBJECT, | |
230 PICK_POCKET = AF.NPC, | |
231 PROSPECTING = AF.ITEM, | |
232 SEARCHING_FOR_ARTIFACTS = AF.OBJECT, | |
233 SKINNING = AF.NPC, | |
234 } | |
235 | |
236 | |
237 ----------------------------------------------------------------------- | |
238 -- Faction/Reputation Data Constants. | |
239 ----------------------------------------------------------------------- | |
65 | 240 |
66 private.FACTION_DATA = { | 241 private.FACTION_DATA = { |
67 -- Used only for private.REP_BUFFS | 242 -- Used only for private.REP_BUFFS |
68 ARGENT_CRUSADE = { 1106, _G.GetFactionInfoByID(1106) }, | 243 ARGENT_CRUSADE = { 1106, _G.GetFactionInfoByID(1106) }, |
69 BILGEWATER_CARTEL = { 1133, _G.GetFactionInfoByID(1133) }, | 244 BILGEWATER_CARTEL = { 1133, _G.GetFactionInfoByID(1133) }, |
275 [_G.GetSpellInfo(39911)] = { -- TROLLBANES COMMAND | 450 [_G.GetSpellInfo(39911)] = { -- TROLLBANES COMMAND |
276 faction = private.FACTION_DATA.HONOR_HOLD[2], | 451 faction = private.FACTION_DATA.HONOR_HOLD[2], |
277 modifier = 0.1, | 452 modifier = 0.1, |
278 }, | 453 }, |
279 } | 454 } |
280 | |
281 private.RAID_BOSS_BONUS_SPELL_ID_TO_NPC_ID_MAP = { | |
282 ----------------------------------------------------------------------- | |
283 -- World Bosses | |
284 ----------------------------------------------------------------------- | |
285 [132205] = 60491, -- Sha of Anger Bonus (Sha of Anger) | |
286 [132206] = 62346, -- Galleon Bonus (Galleon) | |
287 [136381] = 69099, -- Nalak Bonus (Nalak) | |
288 [137554] = 69161, -- Oondasta Bonus (Oondasta) | |
289 [148317] = 71952, -- Celestials Bonus (Chi-Ji) | |
290 [148316] = 72057, -- Ordos Bonus (Ordos) | |
291 [178848] = 81252, -- Drov the Ruiner Bonus Loot (Drov the Ruiner) | |
292 [178850] = 81535, -- Tarlna the Ageless Bonus Loot (Tarlna the Ageless) | |
293 [178852] = 83746, -- Rukhmar Bonus Loot (Rukhmar) | |
294 | |
295 ----------------------------------------------------------------------- | |
296 -- Mogu'shan Vaults | |
297 ----------------------------------------------------------------------- | |
298 [125144] = 59915, -- Stone Guard Bonus (Jasper Guardian) | |
299 [132189] = 60009, -- Feng the Accursed Bonus (Feng the Accursed) | |
300 [132190] = 60143, -- Gara'jal the Spiritbinder Bonus (Gara'jal the Spiritbinder) | |
301 [132191] = 60709, -- Spirit Kings Bonus (Qiang the Merciless) | |
302 [132192] = 60410, -- Elegon Bonus (Elegon) | |
303 [132193] = 60399, -- Will of the Emperor Bonus (Qin-xi) | |
304 | |
305 ----------------------------------------------------------------------- | |
306 -- Terrace of Endless Spring | |
307 ----------------------------------------------------------------------- | |
308 [132200] = 60583, -- Protectors of the Endless Bonus (Protector Kaolan) | |
309 [132204] = 60583, -- Protectors of the Endless (Elite) Bonus (Protector Kaolan) | |
310 [132201] = 62442, -- Tsulong Bonus (Tsulong) | |
311 [132202] = 62983, -- Lei Shi Bonus (Lei Shi) | |
312 [132203] = 60999, -- Sha of Fear Bonus (Sha of Fear) | |
313 | |
314 ----------------------------------------------------------------------- | |
315 -- Heart of Fear | |
316 ----------------------------------------------------------------------- | |
317 [132194] = 62980, -- Imperial Vizier Zor'lok Bonus (Imperial Vizier Zor'lok) | |
318 [132195] = 62543, -- Blade Lord Tay'ak Bonus (Blade Lord Ta'yak) | |
319 [132196] = 62164, -- Garalon Bonus (Garalon) | |
320 [132197] = 62397, -- Wind Lord Mel'jarak Bonus (Wind Lord Mel'jarak) | |
321 [132198] = 62511, -- Amber-Shaper Un'sok Bonus (Amber-Shaper Un'sok) | |
322 [132199] = 62837, -- Grand Empress Shek'zeer Bonus (Grand Empress Shek'zeer) | |
323 | |
324 ----------------------------------------------------------------------- | |
325 -- Throne of Thunder | |
326 ----------------------------------------------------------------------- | |
327 [139674] = 69465, -- Jin'rokh the Breaker Bonus (Jin'rokh the Breaker) | |
328 [139677] = 68476, -- Horridon Bonus (Horridon) | |
329 [139679] = 69078, -- Zandalari Troll Council Bonus (Sul the Sandcrawler) | |
330 [139680] = 67977, -- Tortos Bonus (Tortos) | |
331 [139682] = 68065, -- Magaera Bonus (Megaera) | |
332 [139684] = 69712, -- Ji'kun, the Ancient Mother Bonus (Ji-Kun) | |
333 [139686] = 68036, -- Durumu the Forgotten Bonus (Durumu the Forgotten) | |
334 [139687] = 69017, -- Primordious Bonus (Primordius) | |
335 [139688] = 69427, -- Dark Animus Bonus (Dark Animus) | |
336 [139689] = 68078, -- Iron Qon Bonus (Iron Qon) | |
337 [139690] = 68904, -- The Empyreal Queens Bonus (Suen) | |
338 [139691] = 68397, -- Lei Shen, The Thunder King Bonus (Lei Shen) | |
339 [139692] = 69473, -- Ra-den Bonus (Ra-den) | |
340 | |
341 ----------------------------------------------------------------------- | |
342 -- Siege of Orgrimmar | |
343 ----------------------------------------------------------------------- | |
344 [145909] = 71543, -- Immerseus Bonus (Immerseus) | |
345 [145910] = 71475, -- Fallen Protectors Bonus (Rook Stonetoe) | |
346 [145911] = 72276, -- Norushen Bonus (Amalgam of Corruption) | |
347 [145912] = 71734, -- Sha of Pride Bonus (Sha of Pride) | |
348 [145913] = 72249, -- Galakras Bonus (Galakras) | |
349 [145914] = 71466, -- Iron Juggernaut Bonus (Iron Juggernaut) | |
350 [145915] = 71859, -- Dark Shaman Bonus (Earthbreaker Haromm) | |
351 [145916] = 71515, -- General Nazgrim Bonus (General Nazgrim) | |
352 [145917] = 71454, -- Malkorok Bonus (Malkorok) | |
353 [145919] = 71889, -- Spoils of Pandaria Bonus (Secured Stockpile of Pandaren Spoils) | |
354 [145920] = 71529, -- Thok the Bloodthirsty Bonus (Thok the Bloodthirsty) | |
355 [145918] = 71504, -- Siegecrafter Blackfuse Bonus (Siegecrafter Blackfuse) | |
356 [145921] = 71161, -- Klaxxi Paragons Bonus (Kil'ruk the Wind-Reaver) | |
357 [145922] = 71865, -- Garrosh Hellscream Bonus (Garrosh Hellscream) | |
358 | |
359 ----------------------------------------------------------------------- | |
360 -- Blackrock Foundry | |
361 ----------------------------------------------------------------------- | |
362 [177510] = 76877, -- Gruul Bonus Loot (Gruul) | |
363 [177511] = 77182, -- Oregorger Bonus Loot (Oregorger) | |
364 [177512] = 76809, -- Blast Furnace Loot (Foreman Feldspar) | |
365 [177513] = 76973, -- Hans'gar & Franzok Bonus Loot (Hans'gar) | |
366 [177515] = 76814, -- Flamebender Ka'graz Bonus Loot (Flamebender Ka'graz) | |
367 [177516] = 77692, -- Kromog Bonus Loot (Kromog) | |
368 [177517] = 76865, -- Beastlord Darmac Bonus Loot (Beastlord Darmac) | |
369 [177518] = 76906, -- Operator Thogar Bonus Loot (Operator Thogar) | |
370 [177519] = 77557, -- The Iron Maidens Bonus Loot (Admiral Gar'an) | |
371 [177520] = 77325, -- Blackhand Bonus Loot (Blackhand) | |
372 | |
373 ----------------------------------------------------------------------- | |
374 -- Highmaul | |
375 ----------------------------------------------------------------------- | |
376 [177503] = 78714, -- Kargath Bladefist Bonus Loot (Kargath Bladefist) | |
377 [177504] = 77404, -- Butcher Bonus Loot (The Butcher) | |
378 [177505] = 78948, -- Tectus Bonus Loot (Tectus) | |
379 [177506] = 78491, -- Brackenspore Bonus Loot (Brackenspore) | |
380 [177507] = 78237, -- Twin Ogron Bonus Loot (Phemos) | |
381 [177508] = 79015, -- Ko'ragh Bonus Loot (Ko'ragh) | |
382 [177509] = 77428, -- Imperator Mar'gok Bonus Loot (Imperator Mar'gok) | |
383 } | |
384 | |
385 | |
386 ----------------------------------------------------------------------- | |
387 -- Fundamental Constants. | |
388 ----------------------------------------------------------------------- | |
389 private.wow_version, private.build_num = _G.GetBuildInfo() | |
390 private.region = GetCVar("portal"):sub(0,2):upper() | |
391 -- PTR/Beta return "public-test", but they are properly called "XX" | |
392 if private.region == "PU" then private.region = "XX" end | |
393 | |
394 private.UNIT_TYPES = { | |
395 PLAYER = "Player", | |
396 OBJECT = "GameObject", | |
397 UNKNOWN = "Unknown", | |
398 NPC = "Creature", | |
399 PET = "Pet", | |
400 VEHICLE = "Vehicle", | |
401 ITEM = "Item", | |
402 } | |
403 | |
404 private.UNIT_TYPE_NAMES = { | |
405 ["Player"] = "PLAYER", | |
406 ["GameObject"] = "OBJECT", | |
407 ["Unknown"] = "UNKNOWN", | |
408 ["Creature"] = "NPC", | |
409 ["Pet"] = "PET", | |
410 ["Vehicle"] = "VEHICLE", | |
411 ["Item"] = "ITEM", | |
412 } | |
413 | |
414 private.ACTION_TYPE_FLAGS = { | |
415 ITEM = 0x00000001, | |
416 NPC = 0x00000002, | |
417 OBJECT = 0x00000004, | |
418 ZONE = 0x00000008, | |
419 } | |
420 | |
421 private.ACTION_TYPE_NAMES = {} | |
422 | |
423 for name, bit in _G.pairs(private.ACTION_TYPE_FLAGS) do | |
424 private.ACTION_TYPE_NAMES[bit] = name | |
425 end | |
426 | |
427 private.SPELL_LABELS_BY_NAME = { | |
428 [_G.GetSpellInfo(13262)] = "DISENCHANT", | |
429 [_G.GetSpellInfo(4036)] = "ENGINEERING", | |
430 [_G.GetSpellInfo(30427)] = "EXTRACT_GAS", | |
431 [_G.GetSpellInfo(131476)] = "FISHING", | |
432 [_G.GetSpellInfo(2366)] = "HERB_GATHERING", | |
433 [_G.GetSpellInfo(51005)] = "MILLING", | |
434 [_G.GetSpellInfo(605)] = "MIND_CONTROL", | |
435 [_G.GetSpellInfo(2575)] = "MINING", | |
436 [_G.GetSpellInfo(3365)] = "OPENING", | |
437 [_G.GetSpellInfo(921)] = "PICK_POCKET", | |
438 [_G.GetSpellInfo(31252)] = "PROSPECTING", | |
439 [_G.GetSpellInfo(73979)] = "SEARCHING_FOR_ARTIFACTS", | |
440 [_G.GetSpellInfo(8613)] = "SKINNING", | |
441 } | |
442 | |
443 private.NON_LOOT_SPELL_LABELS = { | |
444 MIND_CONTROL = true, | |
445 } | |
446 | |
447 local AF = private.ACTION_TYPE_FLAGS | |
448 | |
449 private.SPELL_FLAGS_BY_LABEL = { | |
450 DISENCHANT = AF.ITEM, | |
451 ENGINEERING = AF.NPC, | |
452 EXTRACT_GAS = AF.ZONE, | |
453 FISHING = AF.ZONE, | |
454 HERB_GATHERING = bit.bor(AF.NPC, AF.OBJECT), | |
455 MILLING = AF.ITEM, | |
456 MIND_CONTROL = AF.NPC, | |
457 MINING = bit.bor(AF.NPC, AF.OBJECT), | |
458 OPENING = AF.OBJECT, | |
459 PICK_POCKET = AF.NPC, | |
460 PROSPECTING = AF.ITEM, | |
461 SEARCHING_FOR_ARTIFACTS = AF.OBJECT, | |
462 SKINNING = AF.NPC, | |
463 } |