comparison Constants.lua @ 329:84817627cb22 WoD

Many changes for WoD, including support for Itembonuses, the new GUID format, and LOOT_READY.
author MMOSimca <MMOSimca@gmail.com>
date Wed, 06 Aug 2014 04:39:26 -0400
parents 66b136635f6b
children 267e7100407c
comparison
equal deleted inserted replaced
328:3487529df8e5 329:84817627cb22
16 -- Constants. 16 -- Constants.
17 ----------------------------------------------------------------------- 17 -----------------------------------------------------------------------
18 private.wow_version, private.build_num = _G.GetBuildInfo() 18 private.wow_version, private.build_num = _G.GetBuildInfo()
19 19
20 private.UNIT_TYPES = { 20 private.UNIT_TYPES = {
21 PLAYER = 0, 21 PLAYER = "Player",
22 OBJECT = 1, 22 OBJECT = "GameObject",
23 UNKNOWN = 2, 23 UNKNOWN = "Unknown",
24 NPC = 3, 24 NPC = "Creature",
25 PET = 4, 25 PET = "Pet",
26 VEHICLE = 5, 26 VEHICLE = "Vehicle",
27 } 27 ITEM = "Item",
28 28 }
29 29
30 private.UNIT_TYPE_NAMES = { 30 private.UNIT_TYPE_NAMES = {
31 "PLAYER", 31 ["Player"] = "PLAYER",
32 "OBJECT", 32 ["GameObject"] = "OBJECT",
33 "UNKNOWN", 33 ["Unknown"] = "UNKNOWN",
34 "NPC", 34 ["Creature"] = "NPC",
35 "PET", 35 ["Pet"] = "PET",
36 "VEHICLE", 36 ["Vehicle"] = "VEHICLE",
37 } 37 ["Item"] = "ITEM",
38 38 }
39 39
40 private.ACTION_TYPE_FLAGS = { 40 private.ACTION_TYPE_FLAGS = {
41 ITEM = 0x00000001, 41 ITEM = 0x00000001,
42 NPC = 0x00000002, 42 NPC = 0x00000002,
43 OBJECT = 0x00000004, 43 OBJECT = 0x00000004,
44 ZONE = 0x00000008, 44 ZONE = 0x00000008,
45 } 45 }
46 46
47
48 private.ACTION_TYPE_NAMES = {} 47 private.ACTION_TYPE_NAMES = {}
49 48
50 for name, bit in _G.pairs(private.ACTION_TYPE_FLAGS) do 49 for name, bit in _G.pairs(private.ACTION_TYPE_FLAGS) do
51 private.ACTION_TYPE_NAMES[bit] = name 50 private.ACTION_TYPE_NAMES[bit] = name
52 end 51 end
53
54 52
55 private.EXTRAPOLATION_BANNED_SPELL_IDS = { 53 private.EXTRAPOLATION_BANNED_SPELL_IDS = {
56 [13262] = "DISENCHANT", 54 [13262] = "DISENCHANT",
57 [4036] = "ENGINEERING", 55 [4036] = "ENGINEERING",
58 [30427] = "EXTRACT_GAS", 56 [30427] = "EXTRACT_GAS",
64 [921] = "PICK_POCKET", 62 [921] = "PICK_POCKET",
65 [31252] = "PROSPECTING", 63 [31252] = "PROSPECTING",
66 [73979] = "SEARCHING_FOR_ARTIFACTS", 64 [73979] = "SEARCHING_FOR_ARTIFACTS",
67 [8613] = "SKINNING", 65 [8613] = "SKINNING",
68 } 66 }
69
70 67
71 private.SPELL_LABELS_BY_NAME = { 68 private.SPELL_LABELS_BY_NAME = {
72 [_G.GetSpellInfo(13262)] = "DISENCHANT", 69 [_G.GetSpellInfo(13262)] = "DISENCHANT",
73 [_G.GetSpellInfo(4036)] = "ENGINEERING", 70 [_G.GetSpellInfo(4036)] = "ENGINEERING",
74 [_G.GetSpellInfo(30427)] = "EXTRACT_GAS", 71 [_G.GetSpellInfo(30427)] = "EXTRACT_GAS",
82 [_G.GetSpellInfo(31252)] = "PROSPECTING", 79 [_G.GetSpellInfo(31252)] = "PROSPECTING",
83 [_G.GetSpellInfo(73979)] = "SEARCHING_FOR_ARTIFACTS", 80 [_G.GetSpellInfo(73979)] = "SEARCHING_FOR_ARTIFACTS",
84 [_G.GetSpellInfo(8613)] = "SKINNING", 81 [_G.GetSpellInfo(8613)] = "SKINNING",
85 } 82 }
86 83
87
88 private.NON_LOOT_SPELL_LABELS = { 84 private.NON_LOOT_SPELL_LABELS = {
89 MIND_CONTROL = true, 85 MIND_CONTROL = true,
90 } 86 }
91
92 87
93 local AF = private.ACTION_TYPE_FLAGS 88 local AF = private.ACTION_TYPE_FLAGS
94 89
95 private.SPELL_FLAGS_BY_LABEL = { 90 private.SPELL_FLAGS_BY_LABEL = {
96 DISENCHANT = AF.ITEM, 91 DISENCHANT = AF.ITEM,
106 PROSPECTING = AF.ITEM, 101 PROSPECTING = AF.ITEM,
107 SEARCHING_FOR_ARTIFACTS = AF.OBJECT, 102 SEARCHING_FOR_ARTIFACTS = AF.OBJECT,
108 SKINNING = AF.NPC, 103 SKINNING = AF.NPC,
109 } 104 }
110 105
111
112 private.LOOT_SPELL_ID_TO_ITEM_ID_MAP = { 106 private.LOOT_SPELL_ID_TO_ITEM_ID_MAP = {
113 [142397] = 98134, -- Heroic Cache of Treasures 107 [142397] = 98134, -- Heroic Cache of Treasures
114 [143506] = 98095, -- Brawler's Pet Supplies 108 [143506] = 98095, -- Brawler's Pet Supplies
115 [143507] = 94207, -- Fabled Pandaren Pet Supplies 109 [143507] = 94207, -- Fabled Pandaren Pet Supplies
116 [143508] = 89125, -- Sack of Pet Supplies 110 [143508] = 89125, -- Sack of Pet Supplies
121 [146885] = 103535, -- Bulging Bag of Charms 115 [146885] = 103535, -- Bulging Bag of Charms
122 [147598] = 104014, -- Pouch of Timeless Coins 116 [147598] = 104014, -- Pouch of Timeless Coins
123 [149222] = 105911, -- Pouch of Enduring Wisdom 117 [149222] = 105911, -- Pouch of Enduring Wisdom
124 [149223] = 105912, -- Oversized Pouch of Enduring Wisdom 118 [149223] = 105912, -- Oversized Pouch of Enduring Wisdom
125 } 119 }
126
127 120
128 private.RAID_FINDER_BOSS_IDS = { 121 private.RAID_FINDER_BOSS_IDS = {
129 ----------------------------------------------------------------------- 122 -----------------------------------------------------------------------
130 -- Mogu'shan Vaults 123 -- Mogu'shan Vaults
131 ----------------------------------------------------------------------- 124 -----------------------------------------------------------------------
214 [71160] = true, -- Iyyokuk the Lucid (Paragons of the Klaxxi encounter) 207 [71160] = true, -- Iyyokuk the Lucid (Paragons of the Klaxxi encounter)
215 [71161] = true, -- Kil'ruk the Wind-Reaver (Paragons of the Klaxxi encounter) 208 [71161] = true, -- Kil'ruk the Wind-Reaver (Paragons of the Klaxxi encounter)
216 [71865] = true, -- Garrosh Hellscream 209 [71865] = true, -- Garrosh Hellscream
217 } 210 }
218 211
219
220 private.WORLD_BOSS_IDS = { 212 private.WORLD_BOSS_IDS = {
221 [60491] = true, -- Sha of Anger 213 [60491] = true, -- Sha of Anger
222 [62346] = true, -- Galleon 214 [62346] = true, -- Galleon
223 [69099] = true, -- Nalak 215 [69099] = true, -- Nalak
224 [69161] = true, -- Oondasta 216 [69161] = true, -- Oondasta
226 [71953] = true, -- Xuen 218 [71953] = true, -- Xuen
227 [71954] = true, -- Niuzao 219 [71954] = true, -- Niuzao
228 [71955] = true, -- Yu'lon 220 [71955] = true, -- Yu'lon
229 [72057] = true, -- Ordos 221 [72057] = true, -- Ordos
230 } 222 }
231
232 223
233 private.RAID_BOSS_BONUS_SPELL_ID_TO_NPC_ID_MAP = { 224 private.RAID_BOSS_BONUS_SPELL_ID_TO_NPC_ID_MAP = {
234 ----------------------------------------------------------------------- 225 -----------------------------------------------------------------------
235 -- Mogu'shan Vaults 226 -- Mogu'shan Vaults
236 ----------------------------------------------------------------------- 227 -----------------------------------------------------------------------