# HG changeset patch # User Xiiph # Date 1297729413 -3600 # Node ID 60ac81ad00a23dc2ee120757c8742a8f6c78f18d # Parent 45a45aa0f492d5d88fc5cda993fa9e5d4657af67 Fixed zone checking ... diff -r 45a45aa0f492 -r 60ac81ad00a2 ICU.lua --- a/ICU.lua Mon Feb 14 22:21:15 2011 +0100 +++ b/ICU.lua Tue Feb 15 01:23:33 2011 +0100 @@ -7,6 +7,13 @@ local _G = _G; -- UTF8 +local raidMap = { + bwd = L["Blackwing Descent"], + bot = L["The Bastion of Twilight"], + tfw = L["Throne of the Four Winds"], + bh = L["Baradin Hold"], +} + -- Accepted flasks local flaskID = { 79469, -- Flask of Steelskin @@ -228,6 +235,9 @@ type = 'group', set = function(i,v) self.db.profile.disabledZones[i[#i]] = v; + --@debug@ + print("Enabling/Disabling Zone",i[#i],v,#self.db.profile.disabledZones); + --@end-debug@ end, get = function(i) return self.db.profile.disabledZones[i[#i]]; @@ -299,18 +309,15 @@ end function icu:inspectRaid(silent,automatic) + -- Check if any zones have been disabled if automatic and not self.db.profile.enableAllZones then local currentZone = GetRealZoneText(); - - for i = 1, #self.db.profile.disabledZones do - if currentZone == self.db.profile.disabledZones[i] and self.db.profile.disabledZones[i] then - --@debug@ - print(currentZone,self.db.profile.disabledZones[i],"Cancelling ICU inspection"); - --@end-debug@ + for k,v in pairs(self.db.profile.disabledZones) do + if currentZone == raidMap[k] and v then return true end - end + end end local icuAd = "";