--[[---------------------------------------------------------------------------
    Name: phRaid
    Author: pherl <pherl@live.com>
-----------------------------------------------------------------------------]]

phRaid.CLASSCOLOR = {
    ["PALADIN"] = "|cFFF48CBA",
    ["WARRIOR"] = "|cFFC69B6D",
    ["WARLOCK"] = "|cFF9382C9",
    ["PRIEST"] = "|cFFFFFFFF",
    ["DRUID"] = "|cFFFF7C0A",
    ["MAGE"] = "|cFF68CCEF",
    ["ROGUE"] = "|cFFFFF468",
    ["SHAMAN"] = "|cFFF48CBA",
    ["HUNTER"] = "|cFFAAD372",
}

phRaid.BARTEXTURE = {
    ["default"] = "Interface\\TargetingFrame\\UI-StatusBar",
    ["banto"] = "Interface\\Addons\\phRaid\\textures\\BantoBar",
    ["halcyone"] = "Interface\\Addons\\phRaid\\textures\\halcyone",
    ["otravi"] = "Interface\\Addons\\phRaid\\textures\\otravi",
    ["perl"] = "Interface\\Addons\\phRaid\\textures\\perl",
    ["smooth"] = "Interface\\Addons\\phRaid\\textures\\smooth",
    ["striped"] = "Interface\\Addons\\phRaid\\textures\\striped",
    ["charcoal"] = "Interface\\Addons\\phRaid\\textures\\charcoal",
}

phRaid.CLASSNAME = {
    ["ZS"] = "WARRIOR",
    ["DZ"] = "ROGUE",
    ["FS"] = "MAGE",
    ["MS"] = "PRIEST",
    ["SS"] = "WARLOCK",
    ["LR"] = "HUNTER",
    ["QS"] = "PALADIN",
    ["SQ"] = "PALADIN",
    ["XD"] = "DRUID",
    ["DLY"] = "DRUID",
    ["D"] = "DRUID",
    ["SM"] = "SHAMAN",
}

phRaid.FUNCS = {
    ["WARRIOR"] = function(u, c, g) return c == "WARRIOR" end,
    ["PRIEST"] = function(u, c, g) return c == "PRIEST" end,
    ["SHAMAN"] = function(u, c, g)return c == "SHAMAN" end,
    ["MAGE"] = function(u, c, g) return c == "MAGE" end,
    ["HUNTER"] = function(u, c, g) return c == "HUNTER" end,
    ["PALADIN"] = function(u, c, g) return c == "PALADIN" end,
    ["ROGUE"] = function(u, c, g) return c == "ROGUE" end,
    ["WARLOCK"] = function(u, c, g) return c == "WARLOCK" end,
    ["DRUID"] = function(u, c, g) return c == "DRUID" end,
    ["HEALER"] = function(u, c, g) return c == "DRUID" or c == "PRIEST" or c == "PALADIN" or c == "SHAMAN" end,
    ["MELEE"] = function(u, c, g) return c == "ROGUE" or c == "WARRIOR" end,
    ["MANA"] = function(u, c, g) return c == "PRIEST" or c == "SHAMAN" or c == "DRUID" or c == "PALADIN" or c == "MAGE" or c == "WARLOCK" or c == "HUNTER" end,
    ["RANGEDDPS"] = function(u, c, g) return c == "MAGE" or c == "WARLOCK" or c == "HUNTER" end,
    ["MYGROUP"] = function(u, c, g) return g == phRaid.mygroup end,
    ["1"] = function(u, c, g) return g == 1 end,
    ["2"] = function(u, c, g) return g == 2 end,
    ["3"] = function(u, c, g) return g == 3 end,
    ["4"] = function(u, c, g) return g == 4 end,
    ["5"] = function(u, c, g) return g == 5 end,
    ["6"] = function(u, c, g) return g == 6 end,
    ["7"] = function(u, c, g) return g == 7 end,
    ["8"] = function(u, c, g) return g == 8 end,
    ["ODD"] = function(u, c, g) return math.mod(g, 2) == 1 end,
    ["EVEN"] = function(u, c, g) return math.mod(g, 2) == 0 end,
    ["MYSIDE"] = function(u, c, g) return math.mod(g, 2) == math.mod(phRaid.mygroup, 2) end,
    ["ALL"] = function(u, c, g) return true end,
}

phRaid.RAIDUNIT = {}
for i = 1, 40 do
    phRaid.RAIDUNIT[i] = "raid" .. i
end

phRaid.MAXREGION = 10