Mercurial > wow > degaine
diff Exceptions.lua @ 44:1967c9a3c5c2
Put exceptions into their own file, and permit to adjust their delay (as it is done with Mr Chilly).
author | contrebasse |
---|---|
date | Sun, 27 Feb 2011 20:28:52 +0100 |
parents | |
children | ecfa62976b03 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Exceptions.lua Sun Feb 27 20:28:52 2011 +0100 @@ -0,0 +1,70 @@ +local AddonName, T = ... + +local GetNumCompanions, GetCompanionInfo = GetNumCompanions, GetCompanionInfo + +-- Tables containing all the exceptions +T.SpellWhiteList = { -- Spells that do steath weapons (works with events1player) + -- True recipes are treated separately + [8690] = true, -- Heartstone + [818] = true, -- Basic Campfire + [13262] = true, -- Disenchant + [51005] = true, -- Milling + + -- Critters (exceptions) + [55068] = 1.3, -- Mr Chilly + + -- Mounts (exceptions) + [48778] = true, -- Acherus Deathcharger + +} + +T.SpellBlackList = { -- spells that don't stealth weapons (works with events1player) + -- All vanity pets and mount are added at PLAYER_LOGIN + + -- + [1784] = true, -- Stealth (Rogue) + [58984] = true, -- Shadowmeld (Nightelf stealth) + + -- DK presences + [48263] = true, -- Blood + [48266] = true, -- Frost + [48265] = true, -- Unholy + + [3714] = true, -- Path of Frost + + + -- Tradeskill spells + [2259] = true, -- Alchemy + [45357] = true, -- Inscription + [3908] = true, -- Tailoring + [7411] = true, -- Enchanting + [2018] = true, -- Blacksmithing + [4036] = true, -- Engineering + [25229] = true, -- Jewelcrafting + [2656] = true, -- Smelting + [2108] = true, -- Leatherworking + [2550] = true, -- Cooking + [3273] = true, -- First Aid + [53428] = true -- Runeforge + -- Archaeology ? +} + + +T.DoBlackListCrittersAndMount = function() -- add some spell to the blacklist + for i=1,GetNumCompanions("CRITTER") do + -- creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("CRITTER", i) + local _, _, creatureSpellID = GetCompanionInfo("CRITTER", i) + if creatureSpellID ~= 55068 then -- Mr Chilly stealth weapons... + T.SpellBlackList[creatureSpellID] = true + end + end + + -- mount is important only if the invocation is cancelled + for i=1,GetNumCompanions("MOUNT") do + -- creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("MOUNT", i) + local _, _, creatureSpellID = GetCompanionInfo("MOUNT", i) + if creatureSpellID ~= 48778 then -- Acherus Deathcharger stealth weapons... + T.SpellBlackList[creatureSpellID] = true + end + end +end