Mercurial > wow > icu
changeset 6:60ac81ad00a2
Fixed zone checking ...
author | Xiiph |
---|---|
date | Tue, 15 Feb 2011 01:23:33 +0100 |
parents | 45a45aa0f492 |
children | f020d96ccfc8 |
files | ICU.lua |
diffstat | 1 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 = "";