Mercurial > wow > degaine
comparison Degaine.lua @ 30:d66bb6a8d8bb
Correct OnEvent with events1player
author | contrebasse |
---|---|
date | Fri, 10 Dec 2010 22:46:30 +0100 |
parents | a91e7552c682 |
children | 37d2dcb3688d |
comparison
equal
deleted
inserted
replaced
29:f14fad7938a4 | 30:d66bb6a8d8bb |
---|---|
112 local events1player = { -- the first arg is "player" | 112 local events1player = { -- the first arg is "player" |
113 UNIT_SPELLCAST_FAILED = true, | 113 UNIT_SPELLCAST_FAILED = true, |
114 UNIT_SPELLCAST_INTERRUPTED = true, | 114 UNIT_SPELLCAST_INTERRUPTED = true, |
115 UNIT_SPELLCAST_SUCCEEDED = true, | 115 UNIT_SPELLCAST_SUCCEEDED = true, |
116 } | 116 } |
117 local SpellWhiteList = { | 117 local SpellWhiteList = { -- Spells that do steath weapons (works with events1player) |
118 [8690] = true, -- Heartstone | 118 [8690] = true, -- Heartstone |
119 [818] = true, -- Basic Campfire | 119 [818] = true, -- Basic Campfire |
120 } | 120 } |
121 --[[ | 121 --[[ |
122 local SpellBlackList = { -- spells that don't stealth weapons (works with events1player) | 122 local SpellBlackList = { -- spells that don't stealth weapons (works with events1player) |
249 if type(events[event])~="function" or events[event]() then | 249 if type(events[event])~="function" or events[event]() then |
250 start() | 250 start() |
251 end | 251 end |
252 elseif events1player[event] then | 252 elseif events1player[event] then |
253 if arg1=="player" then | 253 if arg1=="player" then |
254 if arg5==nil or SpellWhiteList[arg5] then -- arg5 is SpellID | 254 if arg5 and SpellWhiteList[arg5] then -- arg5 is SpellID |
255 start() | 255 start() |
256 end | 256 end |
257 end | 257 end |
258 elseif events2playername[event] then | 258 elseif events2playername[event] then |
259 if arg2==playername then | 259 if arg2==playername then |