jcallahan@1: ----------------------------------------------------------------------- jcallahan@1: -- Upvalued Lua API. jcallahan@1: ----------------------------------------------------------------------- jcallahan@1: local _G = getfenv(0) jcallahan@1: jcallahan@1: local bit = _G.bit jcallahan@1: jcallahan@1: jcallahan@1: ----------------------------------------------------------------------- jcallahan@1: -- AddOn namespace. jcallahan@1: ----------------------------------------------------------------------- jcallahan@1: local ADDON_NAME, private = ... jcallahan@1: jcallahan@1: jcallahan@1: ----------------------------------------------------------------------- MMOSimca@336: -- Game Data Constants. MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@340: private.FACTION_DATA = { MMOSimca@340: -- Used only for private.REP_BUFFS MMOSimca@340: ARGENT_CRUSADE = { 1106, _G.GetFactionInfoByID(1106) }, MMOSimca@340: BILGEWATER_CARTEL = { 1133, _G.GetFactionInfoByID(1133) }, MMOSimca@340: CENARION_CIRCLE = { 609, _G.GetFactionInfoByID(609) }, MMOSimca@340: DARKSPEAR = { 530, _G.GetFactionInfoByID(530) }, MMOSimca@340: DARNASSUS = { 69, _G.GetFactionInfoByID(69) }, MMOSimca@340: DRAGONMAW_CLAN = { 1172, _G.GetFactionInfoByID(1172) }, MMOSimca@340: EARTHEN_RING = { 1135, _G.GetFactionInfoByID(1135) }, MMOSimca@340: EBON_BLADE = { 1098, _G.GetFactionInfoByID(1098) }, MMOSimca@340: EXODAR = { 930, _G.GetFactionInfoByID(930) }, MMOSimca@340: GILNEAS = { 1134, _G.GetFactionInfoByID(1134) }, MMOSimca@340: GNOMEREGAN = { 54, _G.GetFactionInfoByID(54) }, MMOSimca@340: GUARDIANS_OF_HYJAL = { 1158, _G.GetFactionInfoByID(1158) }, MMOSimca@340: GUILD = { 1168, _G.GetFactionInfoByID(1168) }, MMOSimca@340: HONOR_HOLD = { 946, _G.GetFactionInfoByID(946) }, MMOSimca@340: HUOJIN = { 1352, _G.GetFactionInfoByID(1352) }, MMOSimca@340: IRONFORGE = { 47, _G.GetFactionInfoByID(47) }, MMOSimca@340: KIRIN_TOR = { 1090, _G.GetFactionInfoByID(1090) }, MMOSimca@340: ORGRIMMAR = { 76, _G.GetFactionInfoByID(76) }, MMOSimca@340: RAMKAHEN = { 1173, _G.GetFactionInfoByID(1173) }, MMOSimca@340: SHATAR = { 935, _G.GetFactionInfoByID(935) }, MMOSimca@340: SILVERMOON = { 911, _G.GetFactionInfoByID(911) }, MMOSimca@340: STORMWIND = { 72, _G.GetFactionInfoByID(72) }, MMOSimca@340: THERAZANE = { 1171, _G.GetFactionInfoByID(1171) }, MMOSimca@340: THRALLMAR = { 947, _G.GetFactionInfoByID(947) }, MMOSimca@340: THUNDER_BLUFF = { 81, _G.GetFactionInfoByID(81) }, MMOSimca@340: TUSHUI = { 1353, _G.GetFactionInfoByID(1353) }, MMOSimca@340: UNDERCITY = { 68, _G.GetFactionInfoByID(68) }, MMOSimca@340: WILDHAMMER_CLAN = { 1174, _G.GetFactionInfoByID(1174) }, MMOSimca@340: WYRMREST_ACCORD = { 1091, _G.GetFactionInfoByID(1091) }, MMOSimca@340: -- Commendation Factions MMOSimca@340: ANGLERS = { 1302, _G.GetFactionInfoByID(1302) }, MMOSimca@340: AUGUST_CELESTIALS = { 1341, _G.GetFactionInfoByID(1341) }, MMOSimca@340: DOMINANCE_OFFENSIVE = { 1375, _G.GetFactionInfoByID(1375) }, MMOSimca@340: GOLDEN_LOTUS = { 1269, _G.GetFactionInfoByID(1269) }, MMOSimca@340: KIRIN_TOR_OFFENSIVE = { 1387, _G.GetFactionInfoByID(1387) }, MMOSimca@340: KLAXXI = { 1337, _G.GetFactionInfoByID(1337) }, MMOSimca@340: LOREWALKERS = { 1345, _G.GetFactionInfoByID(1345) }, MMOSimca@340: OPERATION_SHIELDWALL = { 1376, _G.GetFactionInfoByID(1376) }, MMOSimca@340: ORDER_OF_THE_CLOUD_SERPENTS = { 1271, _G.GetFactionInfoByID(1271) }, MMOSimca@340: SHADO_PAN = { 1270, _G.GetFactionInfoByID(1270) }, MMOSimca@340: SHADO_PAN_ASSAULT = { 1435, _G.GetFactionInfoByID(1435) }, MMOSimca@340: SUNREAVER_ONSLAUGHT = { 1388, _G.GetFactionInfoByID(1388) }, MMOSimca@340: TILLERS = { 1272, _G.GetFactionInfoByID(1272) }, MMOSimca@337: } MMOSimca@337: MMOSimca@337: private.REP_BUFFS = { MMOSimca@340: -- Tabard Buffs MMOSimca@340: [_G.GetSpellInfo(93830)] = { -- BILGEWATER CARTEL TABARD MMOSimca@340: faction = private.FACTION_DATA.BILGEWATER_CARTEL[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93827)] = { -- DARKSPEAR TABARD MMOSimca@340: faction = private.FACTION_DATA.DARKSPEAR[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93806)] = { -- DARNASSUS TABARD MMOSimca@340: faction = private.FACTION_DATA.DARNASSUS[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93811)] = { -- EXODAR TABARD MMOSimca@340: faction = private.FACTION_DATA.EXODAR[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93816)] = { -- GILNEAS TABARD MMOSimca@340: faction = private.FACTION_DATA.GILNEAS[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93821)] = { -- GNOMEREGAN TABARD MMOSimca@340: faction = private.FACTION_DATA.GNOMEREGAN[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(126436)] = { -- HUOJIN TABARD MMOSimca@340: faction = private.FACTION_DATA.HUOJIN[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(97340)] = { -- ILLUSTRIOUS GUILD TABARD MMOSimca@340: faction = private.FACTION_DATA.GUILD[2], MMOSimca@340: modifier = 1, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93805)] = { -- IRONFORGE TABARD MMOSimca@340: faction = private.FACTION_DATA.IRONFORGE[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93825)] = { -- ORGRIMMAR TABARD MMOSimca@340: faction = private.FACTION_DATA.ORGRIMMAR[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(97341)] = { -- RENOWNED GUILD TABARD MMOSimca@340: faction = private.FACTION_DATA.GUILD[2], MMOSimca@340: modifier = 0.5, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93828)] = { -- SILVERMOON CITY TABARD MMOSimca@340: faction = private.FACTION_DATA.SILVERMOON[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93795)] = { -- STORMWIND TABARD MMOSimca@340: faction = private.FACTION_DATA.STORMWIND[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93337)] = { -- TABARD OF RAMKAHEN MMOSimca@340: faction = private.FACTION_DATA.RAMKAHEN[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(57819)] = { -- TABARD OF THE ARGENT CRUSADE MMOSimca@340: faction = private.FACTION_DATA.ARGENT_CRUSADE[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(94158)] = { -- TABARD OF THE DRAGONMAW CLAN MMOSimca@340: faction = private.FACTION_DATA.DRAGONMAW_CLAN[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93339)] = { -- TABARD OF THE EARTHEN RING MMOSimca@340: faction = private.FACTION_DATA.EARTHEN_RING[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(57820)] = { -- TABARD OF THE EBON BLADE MMOSimca@340: faction = private.FACTION_DATA.EBON_BLADE[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93341)] = { -- TABARD OF THE GUARDIANS OF HYJAL MMOSimca@340: faction = private.FACTION_DATA.GUARDIANS_OF_HYJAL[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(57821)] = { -- TABARD OF THE KIRIN TOR MMOSimca@340: faction = private.FACTION_DATA.KIRIN_TOR[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93368)] = { -- TABARD OF THE WILDHAMMER CLAN MMOSimca@340: faction = private.FACTION_DATA.WILDHAMMER_CLAN[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(57822)] = { -- TABARD OF THE WYRMREST ACCORD MMOSimca@340: faction = private.FACTION_DATA.WYRMREST_ACCORD[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(93347)] = { -- TABARD OF THERAZANE MMOSimca@340: faction = private.FACTION_DATA.THERAZANE[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(94463)] = { -- THUNDERBLUFF TABARD MMOSimca@340: faction = private.FACTION_DATA.THUNDER_BLUFF[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(126434)] = { -- TUSHUI TABARD MMOSimca@340: faction = private.FACTION_DATA.TUSHUI[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(94462)] = { -- UNDERCITY TABARD MMOSimca@340: faction = private.FACTION_DATA.UNDERCITY[2], MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: MMOSimca@340: -- Banner Buffs MMOSimca@340: [_G.GetSpellInfo(90216)] = { -- ALLIANCE GUILD STANDARD MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(90708)] = { -- HORDE GUILD STANDARD MMOSimca@340: ignore = true, MMOSimca@340: }, MMOSimca@340: MMOSimca@340: -- Holiday Buffs MMOSimca@340: [_G.GetSpellInfo(136583)] = { -- DARKMOON TOP HAT MMOSimca@340: modifier = 0.1, MMOSimca@337: }, MMOSimca@337: [_G.GetSpellInfo(24705)] = { -- GRIM VISAGE MMOSimca@337: modifier = 0.1, MMOSimca@337: }, MMOSimca@337: [_G.GetSpellInfo(61849)] = { -- SPIRIT OF SHARING MMOSimca@337: modifier = 0.1, MMOSimca@337: }, MMOSimca@340: [_G.GetSpellInfo(95987)] = { -- UNBURDENED MMOSimca@337: modifier = 0.1, MMOSimca@337: }, MMOSimca@340: [_G.GetSpellInfo(46668)] = { -- WHEE! MMOSimca@337: modifier = 0.1, MMOSimca@337: }, MMOSimca@337: [_G.GetSpellInfo(100951)] = { -- WOW 8TH ANNIVERSARY MMOSimca@337: modifier = 0.08, MMOSimca@337: }, MMOSimca@337: [_G.GetSpellInfo(132700)] = { -- WOW 9TH ANNIVERSARY MMOSimca@337: modifier = 0.09, MMOSimca@337: }, MMOSimca@337: [_G.GetSpellInfo(150986)] = { -- WOW 10TH ANNIVERSARY MMOSimca@337: modifier = 0.1, MMOSimca@341: }, MMOSimca@340: MMOSimca@340: -- Situational Buffs MMOSimca@340: [_G.GetSpellInfo(39953)] = { -- ADALS SONG OF BATTLE MMOSimca@340: faction = private.FACTION_DATA.SHATAR[2], MMOSimca@340: modifier = 0.1, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(30754)] = { -- CENARION FAVOR MMOSimca@340: faction = private.FACTION_DATA.CENARION_CIRCLE[2], MMOSimca@340: modifier = 0.25, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(32098)] = { -- HONOR HOLD FAVOR MMOSimca@340: faction = private.FACTION_DATA.HONOR_HOLD[2], MMOSimca@340: modifier = 0.25, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(39913)] = { -- NAZGRELS FERVOR MMOSimca@340: faction = private.FACTION_DATA.THRALLMAR[2], MMOSimca@340: modifier = 0.1, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(32096)] = { -- THRALLMARS FAVOR MMOSimca@340: faction = private.FACTION_DATA.THRALLMAR[2], MMOSimca@340: modifier = 0.25, MMOSimca@340: }, MMOSimca@340: [_G.GetSpellInfo(39911)] = { -- TROLLBANES COMMAND MMOSimca@340: faction = private.FACTION_DATA.HONOR_HOLD[2], MMOSimca@340: modifier = 0.1, MMOSimca@340: }, MMOSimca@337: } MMOSimca@337: MMOSimca@336: private.LOOT_SPELL_ID_TO_ITEM_ID_MAP = { MMOSimca@336: [142397] = 98134, -- Heroic Cache of Treasures MMOSimca@336: [142901] = 98546, -- Bulging Heroic Cache of Treasures MMOSimca@336: [143506] = 98095, -- Brawler's Pet Supplies MMOSimca@336: [143507] = 94207, -- Fabled Pandaren Pet Supplies MMOSimca@336: [143508] = 89125, -- Sack of Pet Supplies MMOSimca@336: [143509] = 93146, -- Pandaren Spirit Pet Supplies MMOSimca@336: [143510] = 93147, -- Pandaren Spirit Pet Supplies MMOSimca@336: [143511] = 93149, -- Pandaren Spirit Pet Supplies MMOSimca@336: [143512] = 93148, -- Pandaren Spirit Pet Supplies MMOSimca@336: [146885] = 103535, -- Bulging Bag of Charms MMOSimca@336: [147598] = 104014, -- Pouch of Timeless Coins MMOSimca@336: [149222] = 105911, -- Pouch of Enduring Wisdom MMOSimca@336: [149223] = 105912, -- Oversized Pouch of Enduring Wisdom MMOSimca@336: [168178] = 114116, -- Bag of Salvaged Goods MMOSimca@336: [168179] = 114119, -- Crate of Salvage MMOSimca@336: [168180] = 114120, -- Big Crate of Salvage MMOSimca@336: [171513] = 116414, -- Pet Supplies MMOSimca@336: [175767] = 118697, -- Big Bag of Pet Supplies MMOSimca@339: [178508] = 120321, -- Mystery Bag MMOSimca@336: } MMOSimca@336: MMOSimca@336: private.RAID_BOSS_BONUS_SPELL_ID_TO_NPC_ID_MAP = { MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- World Bosses MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [132205] = 60491, -- Sha of Anger Bonus (Sha of Anger) MMOSimca@336: [132206] = 62346, -- Galleon Bonus (Galleon) MMOSimca@336: [136381] = 69099, -- Nalak Bonus (Nalak) MMOSimca@336: [137554] = 69161, -- Oondasta Bonus (Oondasta) MMOSimca@336: [148317] = 71952, -- Celestials Bonus (Chi-Ji) MMOSimca@336: [148316] = 72057, -- Ordos Bonus (Ordos) MMOSimca@336: --[????] = 81535, -- Tarlna the Ageless Bonus Loot (Tarlna the Ageless) MMOSimca@336: --[????] = 87437, -- Drov the Ruiner Bonus Loot (Drov the Ruiner) MMOSimca@336: --[????] = 87493, -- Rukhmar Bonus Loot (Rukhmar) MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Mogu'shan Vaults MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [125144] = 59915, -- Stone Guard Bonus (Jasper Guardian) MMOSimca@336: [132189] = 60009, -- Feng the Accursed Bonus (Feng the Accursed) MMOSimca@336: [132190] = 60143, -- Gara'jal the Spiritbinder Bonus (Gara'jal the Spiritbinder) MMOSimca@336: [132191] = 60709, -- Spirit Kings Bonus (Qiang the Merciless) MMOSimca@336: [132192] = 60410, -- Elegon Bonus (Elegon) MMOSimca@336: [132193] = 60399, -- Will of the Emperor Bonus (Qin-xi) MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Terrace of Endless Spring MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [132200] = 60583, -- Protectors of the Endless Bonus (Protector Kaolan) MMOSimca@336: [132204] = 60583, -- Protectors of the Endless (Elite) Bonus (Protector Kaolan) MMOSimca@336: [132201] = 62442, -- Tsulong Bonus (Tsulong) MMOSimca@336: [132202] = 62983, -- Lei Shi Bonus (Lei Shi) MMOSimca@336: [132203] = 60999, -- Sha of Fear Bonus (Sha of Fear) MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Heart of Fear MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [132194] = 62980, -- Imperial Vizier Zor'lok Bonus (Imperial Vizier Zor'lok) MMOSimca@336: [132195] = 62543, -- Blade Lord Tay'ak Bonus (Blade Lord Ta'yak) MMOSimca@336: [132196] = 62164, -- Garalon Bonus (Garalon) MMOSimca@336: [132197] = 62397, -- Wind Lord Mel'jarak Bonus (Wind Lord Mel'jarak) MMOSimca@336: [132198] = 62511, -- Amber-Shaper Un'sok Bonus (Amber-Shaper Un'sok) MMOSimca@336: [132199] = 62837, -- Grand Empress Shek'zeer Bonus (Grand Empress Shek'zeer) MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Throne of Thunder MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [139674] = 69465, -- Jin'rokh the Breaker Bonus (Jin'rokh the Breaker) MMOSimca@336: [139677] = 68476, -- Horridon Bonus (Horridon) MMOSimca@336: [139679] = 69078, -- Zandalari Troll Council Bonus (Sul the Sandcrawler) MMOSimca@336: [139680] = 67977, -- Tortos Bonus (Tortos) MMOSimca@336: [139682] = 68065, -- Magaera Bonus (Megaera) MMOSimca@336: [139684] = 69712, -- Ji'kun, the Ancient Mother Bonus (Ji-Kun) MMOSimca@336: [139686] = 68036, -- Durumu the Forgotten Bonus (Durumu the Forgotten) MMOSimca@336: [139687] = 69017, -- Primordious Bonus (Primordius) MMOSimca@336: [139688] = 69427, -- Dark Animus Bonus (Dark Animus) MMOSimca@336: [139689] = 68078, -- Iron Qon Bonus (Iron Qon) MMOSimca@336: [139690] = 68904, -- The Empyreal Queens Bonus (Suen) MMOSimca@336: [139691] = 68397, -- Lei Shen, The Thunder King Bonus (Lei Shen) MMOSimca@336: [139692] = 69473, -- Ra-den Bonus (Ra-den) MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Siege of Orgrimmar MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [145909] = 71543, -- Immerseus Bonus (Immerseus) MMOSimca@336: [145910] = 71475, -- Fallen Protectors Bonus (Rook Stonetoe) MMOSimca@336: [145911] = 72276, -- Norushen Bonus (Amalgam of Corruption) MMOSimca@336: [145912] = 71734, -- Sha of Pride Bonus (Sha of Pride) MMOSimca@336: [145913] = 72249, -- Galakras Bonus (Galakras) MMOSimca@336: [145914] = 71466, -- Iron Juggernaut Bonus (Iron Juggernaut) MMOSimca@336: [145915] = 71859, -- Dark Shaman Bonus (Earthbreaker Haromm) MMOSimca@336: [145916] = 71515, -- General Nazgrim Bonus (General Nazgrim) MMOSimca@336: [145917] = 71454, -- Malkorok Bonus (Malkorok) MMOSimca@336: [145919] = 71889, -- Spoils of Pandaria Bonus (Secured Stockpile of Pandaren Spoils) MMOSimca@336: [145920] = 71529, -- Thok the Bloodthirsty Bonus (Thok the Bloodthirsty) MMOSimca@336: [145918] = 71504, -- Siegecrafter Blackfuse Bonus (Siegecrafter Blackfuse) MMOSimca@336: [145921] = 71161, -- Klaxxi Paragons Bonus (Kil'ruk the Wind-Reaver) MMOSimca@336: [145922] = 71865, -- Garrosh Hellscream Bonus (Garrosh Hellscream) MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Blackrock Foundry MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [177510] = 76877, -- Gruul Bonus Loot (Gruul) MMOSimca@336: [177511] = 77182, -- Oregorger Bonus Loot (Oregorger) MMOSimca@336: [177512] = 76809, -- Blast Furnace Loot (Foreman Feldspar) MMOSimca@336: [177513] = 76973, -- Hans'gar & Franzok Bonus Loot (Hans'gar) MMOSimca@336: [177515] = 76814, -- Flamebender Ka'graz Bonus Loot (Flamebender Ka'graz) MMOSimca@336: [177516] = 77692, -- Kromog Bonus Loot (Kromog) MMOSimca@336: [177517] = 76865, -- Beastlord Darmac Bonus Loot (Beastlord Darmac) MMOSimca@336: [177518] = 76906, -- Operator Thogar Bonus Loot (Operator Thogar) MMOSimca@336: [177519] = 77557, -- The Iron Maidens Bonus Loot (Admiral Gar'an) MMOSimca@336: [177520] = 87420, -- Blackhand Bonus Loot (Blackhand) MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Highmaul MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: [177503] = 87444, -- Kargath Bladefist Bonus Loot (Kargath Bladefist) MMOSimca@336: [177504] = 87447, -- Butcher Bonus Loot (The Butcher) MMOSimca@336: [177505] = 87446, -- Tectus Bonus Loot (Tectus) MMOSimca@336: [177506] = 87441, -- Brackenspore Bonus Loot (Brackenspore) MMOSimca@336: [177507] = 87449, -- Twin Ogron Bonus Loot (Twin Ogron) MMOSimca@336: [177508] = 87445, -- Ko'ragh Bonus Loot (Ko'ragh) MMOSimca@336: [177509] = 87818, -- Imperator Mar'gok Bonus Loot (Imperator Mar'gok) MMOSimca@336: } MMOSimca@336: MMOSimca@336: MMOSimca@336: ----------------------------------------------------------------------- MMOSimca@336: -- Fundamental Constants. jcallahan@1: ----------------------------------------------------------------------- jcallahan@18: private.wow_version, private.build_num = _G.GetBuildInfo() MMOSimca@330: private.region = GetCVar("portal"):sub(0,2):upper() MMOSimca@330: -- PTR/Beta return "public-test", but they are properly called "XX" MMOSimca@330: if private.region == "PU" then private.region = "XX" end jcallahan@18: jcallahan@1: private.UNIT_TYPES = { MMOSimca@329: PLAYER = "Player", MMOSimca@329: OBJECT = "GameObject", MMOSimca@329: UNKNOWN = "Unknown", MMOSimca@329: NPC = "Creature", MMOSimca@329: PET = "Pet", MMOSimca@329: VEHICLE = "Vehicle", MMOSimca@329: ITEM = "Item", jcallahan@1: } jcallahan@1: jcallahan@10: private.UNIT_TYPE_NAMES = { MMOSimca@329: ["Player"] = "PLAYER", MMOSimca@329: ["GameObject"] = "OBJECT", MMOSimca@329: ["Unknown"] = "UNKNOWN", MMOSimca@329: ["Creature"] = "NPC", MMOSimca@329: ["Pet"] = "PET", MMOSimca@329: ["Vehicle"] = "VEHICLE", MMOSimca@329: ["Item"] = "ITEM", jcallahan@10: } jcallahan@10: jcallahan@1: private.ACTION_TYPE_FLAGS = { jcallahan@1: ITEM = 0x00000001, jcallahan@1: NPC = 0x00000002, jcallahan@1: OBJECT = 0x00000004, jcallahan@1: ZONE = 0x00000008, jcallahan@1: } jcallahan@1: jcallahan@151: private.ACTION_TYPE_NAMES = {} jcallahan@151: jcallahan@151: for name, bit in _G.pairs(private.ACTION_TYPE_FLAGS) do jcallahan@151: private.ACTION_TYPE_NAMES[bit] = name jcallahan@151: end jcallahan@151: jcallahan@326: private.EXTRAPOLATION_BANNED_SPELL_IDS = { jcallahan@326: [13262] = "DISENCHANT", jcallahan@326: [4036] = "ENGINEERING", jcallahan@326: [30427] = "EXTRACT_GAS", jcallahan@326: [131476] = "FISHING", jcallahan@326: [2366] = "HERB_GATHERING", jcallahan@326: [51005] = "MILLING", jcallahan@326: [605] = "MIND_CONTROL", jcallahan@326: [2575] = "MINING", jcallahan@326: [921] = "PICK_POCKET", jcallahan@326: [31252] = "PROSPECTING", jcallahan@326: [73979] = "SEARCHING_FOR_ARTIFACTS", jcallahan@326: [8613] = "SKINNING", jcallahan@326: } jcallahan@326: jcallahan@1: private.SPELL_LABELS_BY_NAME = { jcallahan@1: [_G.GetSpellInfo(13262)] = "DISENCHANT", jcallahan@1: [_G.GetSpellInfo(4036)] = "ENGINEERING", jcallahan@48: [_G.GetSpellInfo(30427)] = "EXTRACT_GAS", jcallahan@99: [_G.GetSpellInfo(131476)] = "FISHING", jcallahan@1: [_G.GetSpellInfo(2366)] = "HERB_GATHERING", jcallahan@1: [_G.GetSpellInfo(51005)] = "MILLING", jcallahan@1: [_G.GetSpellInfo(605)] = "MIND_CONTROL", jcallahan@1: [_G.GetSpellInfo(2575)] = "MINING", jcallahan@1: [_G.GetSpellInfo(3365)] = "OPENING", jcallahan@1: [_G.GetSpellInfo(921)] = "PICK_POCKET", jcallahan@1: [_G.GetSpellInfo(31252)] = "PROSPECTING", jcallahan@1: [_G.GetSpellInfo(73979)] = "SEARCHING_FOR_ARTIFACTS", jcallahan@1: [_G.GetSpellInfo(8613)] = "SKINNING", jcallahan@1: } jcallahan@1: jcallahan@105: private.NON_LOOT_SPELL_LABELS = { jcallahan@105: MIND_CONTROL = true, jcallahan@105: } jcallahan@105: jcallahan@1: local AF = private.ACTION_TYPE_FLAGS jcallahan@1: jcallahan@1: private.SPELL_FLAGS_BY_LABEL = { jcallahan@1: DISENCHANT = AF.ITEM, jcallahan@1: ENGINEERING = AF.NPC, jcallahan@48: EXTRACT_GAS = AF.ZONE, jcallahan@151: FISHING = AF.ZONE, jcallahan@23: HERB_GATHERING = bit.bor(AF.NPC, AF.OBJECT), jcallahan@1: MILLING = AF.ITEM, jcallahan@1: MIND_CONTROL = AF.NPC, jcallahan@23: MINING = bit.bor(AF.NPC, AF.OBJECT), jcallahan@1: OPENING = AF.OBJECT, jcallahan@1: PICK_POCKET = AF.NPC, jcallahan@1: PROSPECTING = AF.ITEM, jcallahan@1: SEARCHING_FOR_ARTIFACTS = AF.OBJECT, jcallahan@1: SKINNING = AF.NPC, jcallahan@1: }