Mercurial > wow > icu
comparison ICU.lua @ 6:60ac81ad00a2
Fixed zone checking ...
author | Xiiph |
---|---|
date | Tue, 15 Feb 2011 01:23:33 +0100 |
parents | 45a45aa0f492 |
children | f020d96ccfc8 |
comparison
equal
deleted
inserted
replaced
5:45a45aa0f492 | 6:60ac81ad00a2 |
---|---|
5 | 5 |
6 -- Move global namespace to local | 6 -- Move global namespace to local |
7 local _G = _G; | 7 local _G = _G; |
8 | 8 |
9 -- UTF8 | 9 -- UTF8 |
10 local raidMap = { | |
11 bwd = L["Blackwing Descent"], | |
12 bot = L["The Bastion of Twilight"], | |
13 tfw = L["Throne of the Four Winds"], | |
14 bh = L["Baradin Hold"], | |
15 } | |
16 | |
10 -- Accepted flasks | 17 -- Accepted flasks |
11 local flaskID = { | 18 local flaskID = { |
12 79469, -- Flask of Steelskin | 19 79469, -- Flask of Steelskin |
13 79470, -- Flask of the Draconic Mind | 20 79470, -- Flask of the Draconic Mind |
14 79471, -- Flask of the Winds | 21 79471, -- Flask of the Winds |
226 zones = { | 233 zones = { |
227 name = L["Disabled Zones"], | 234 name = L["Disabled Zones"], |
228 type = 'group', | 235 type = 'group', |
229 set = function(i,v) | 236 set = function(i,v) |
230 self.db.profile.disabledZones[i[#i]] = v; | 237 self.db.profile.disabledZones[i[#i]] = v; |
238 --@debug@ | |
239 print("Enabling/Disabling Zone",i[#i],v,#self.db.profile.disabledZones); | |
240 --@end-debug@ | |
231 end, | 241 end, |
232 get = function(i) | 242 get = function(i) |
233 return self.db.profile.disabledZones[i[#i]]; | 243 return self.db.profile.disabledZones[i[#i]]; |
234 end, | 244 end, |
235 args = { | 245 args = { |
297 } | 307 } |
298 return options | 308 return options |
299 end | 309 end |
300 | 310 |
301 function icu:inspectRaid(silent,automatic) | 311 function icu:inspectRaid(silent,automatic) |
312 | |
302 -- Check if any zones have been disabled | 313 -- Check if any zones have been disabled |
303 if automatic and not self.db.profile.enableAllZones then | 314 if automatic and not self.db.profile.enableAllZones then |
304 local currentZone = GetRealZoneText(); | 315 local currentZone = GetRealZoneText(); |
305 | 316 for k,v in pairs(self.db.profile.disabledZones) do |
306 for i = 1, #self.db.profile.disabledZones do | 317 if currentZone == raidMap[k] and v then |
307 if currentZone == self.db.profile.disabledZones[i] and self.db.profile.disabledZones[i] then | |
308 --@debug@ | |
309 print(currentZone,self.db.profile.disabledZones[i],"Cancelling ICU inspection"); | |
310 --@end-debug@ | |
311 return true | 318 return true |
312 end | 319 end |
313 end | 320 end |
314 end | 321 end |
315 | 322 |
316 local icuAd = ""; | 323 local icuAd = ""; |
317 | 324 |
318 -- Not in a raid group | 325 -- Not in a raid group |