comparison 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
comparison
equal deleted inserted replaced
43:3fbe79addc87 44:1967c9a3c5c2
1 local AddonName, T = ...
2
3 local GetNumCompanions, GetCompanionInfo = GetNumCompanions, GetCompanionInfo
4
5 -- Tables containing all the exceptions
6 T.SpellWhiteList = { -- Spells that do steath weapons (works with events1player)
7 -- True recipes are treated separately
8 [8690] = true, -- Heartstone
9 [818] = true, -- Basic Campfire
10 [13262] = true, -- Disenchant
11 [51005] = true, -- Milling
12
13 -- Critters (exceptions)
14 [55068] = 1.3, -- Mr Chilly
15
16 -- Mounts (exceptions)
17 [48778] = true, -- Acherus Deathcharger
18
19 }
20
21 T.SpellBlackList = { -- spells that don't stealth weapons (works with events1player)
22 -- All vanity pets and mount are added at PLAYER_LOGIN
23
24 --
25 [1784] = true, -- Stealth (Rogue)
26 [58984] = true, -- Shadowmeld (Nightelf stealth)
27
28 -- DK presences
29 [48263] = true, -- Blood
30 [48266] = true, -- Frost
31 [48265] = true, -- Unholy
32
33 [3714] = true, -- Path of Frost
34
35
36 -- Tradeskill spells
37 [2259] = true, -- Alchemy
38 [45357] = true, -- Inscription
39 [3908] = true, -- Tailoring
40 [7411] = true, -- Enchanting
41 [2018] = true, -- Blacksmithing
42 [4036] = true, -- Engineering
43 [25229] = true, -- Jewelcrafting
44 [2656] = true, -- Smelting
45 [2108] = true, -- Leatherworking
46 [2550] = true, -- Cooking
47 [3273] = true, -- First Aid
48 [53428] = true -- Runeforge
49 -- Archaeology ?
50 }
51
52
53 T.DoBlackListCrittersAndMount = function() -- add some spell to the blacklist
54 for i=1,GetNumCompanions("CRITTER") do
55 -- creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("CRITTER", i)
56 local _, _, creatureSpellID = GetCompanionInfo("CRITTER", i)
57 if creatureSpellID ~= 55068 then -- Mr Chilly stealth weapons...
58 T.SpellBlackList[creatureSpellID] = true
59 end
60 end
61
62 -- mount is important only if the invocation is cancelled
63 for i=1,GetNumCompanions("MOUNT") do
64 -- creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("MOUNT", i)
65 local _, _, creatureSpellID = GetCompanionInfo("MOUNT", i)
66 if creatureSpellID ~= 48778 then -- Acherus Deathcharger stealth weapons...
67 T.SpellBlackList[creatureSpellID] = true
68 end
69 end
70 end