- Fixed GetLFGMode() errors in 5.0

This commit is contained in:
Parnic
2012-07-03 04:30:50 +00:00
parent 2c6e8e3bd9
commit 028658a2be
3 changed files with 35 additions and 14 deletions

View File

@ -554,6 +554,39 @@ function IceHUD:CreateCustomModuleAndNotify(moduleKey, settings)
end
end
local function CheckLFGMode(mode)
return (mode ~= nil and mode ~= "abandonedInDungeon" and mode ~= "queued")
end
function IceHUD:GetIsInLFGGroup()
local mode, submode
if IceHUD.WowVer >= 50000 then
mode, submode = GetLFGMode(LE_LFG_CATEGORY_LFD)
else
mode, submode = GetLFGMode()
end
local IsInLFGGroup = CheckLFGMode(mode)
if IceHUD.WowVer < 50000 then
return IsInLFGGroup
end
if not IsInLFGGroup then
mode, submode = GetLFGMode(LE_LFG_CATEGORY_RF)
IsInLFGGroup = CheckLFGMode(mode)
end
if not IsInLFGGroup then
mode, submode = GetLFGMode(LE_LFG_CATEGORY_SCENARIO)
IsInLFGGroup = CheckLFGMode(mode)
end
if not IsInLFGGroup then
mode, submode = GetLFGMode(LE_LFG_CATEGORY_LFR)
IsInLFGGroup = CheckLFGMode(mode)
end
return IsInLFGGroup
end
local BLACKLISTED_UNIT_MENU_OPTIONS = {
SET_FOCUS = "ICEHUD_SET_FOCUS",
CLEAR_FOCUS = "ICEHUD_CLEAR_FOCUS",

View File

@ -1005,13 +1005,7 @@ function PlayerHealth.prototype:CheckCombat()
end
function PlayerHealth.prototype:CheckPartyRole()
local IsLFGParty
local mode, submode
mode, submode= GetLFGMode()
IsLFGParty = (mode ~= nil and mode ~= "abandonedInDungeon" and mode ~= "queued")
if configMode or IsLFGParty then
if configMode or IceHUD:GetIsInLFGGroup() then
if (configMode or self.moduleSettings.showPartyRoleIcon) and not self.frame.PartyRoleIcon then
local isTank, isHeal, isDPS
local proposalExists, typeID, id, name

View File

@ -1067,13 +1067,7 @@ function IceTargetHealth.prototype:UpdateBar(scale, color, alpha)
end
function IceTargetHealth.prototype:CheckPartyRole()
local IsLFGParty
local mode, submode
mode, submode= GetLFGMode()
IsLFGParty = (mode ~= nil and mode ~= "abandonedInDungeon" and mode ~= "queued")
if self.configMode or IsLFGParty then
if self.configMode or IceHUD:GetIsInLFGGroup() then
if self.configMode or self.moduleSettings.showPartyRoleIcon then
local isTank, isHeal, isDPS
local proposalExists, typeID, id, name