correct GetInstanceTypeAndSize
This commit is contained in:
@@ -1273,7 +1273,6 @@ WeakAuras.instance_types = {
|
||||
none = L["No Instance"],
|
||||
party = L["5 Man Dungeon"],
|
||||
ten = L["10 Man Raid"],
|
||||
twenty = L["20 Man Raid"],
|
||||
twentyfive = L["25 Man Raid"],
|
||||
fortyman = L["40 Man Raid"],
|
||||
pvp = L["Battleground"],
|
||||
@@ -1950,86 +1949,6 @@ WeakAuras.group_option_types = {
|
||||
array = L["Array"],
|
||||
}
|
||||
|
||||
WeakAuras.difficulty_info = {
|
||||
[1] = {
|
||||
size = "party",
|
||||
difficulty = "normal",
|
||||
},
|
||||
[2] = {
|
||||
size = "party",
|
||||
difficulty = "heroic",
|
||||
},
|
||||
[3] = {
|
||||
size = "ten",
|
||||
difficulty = "normal",
|
||||
},
|
||||
[4] = {
|
||||
size = "twentyfive",
|
||||
difficulty = "normal",
|
||||
},
|
||||
[5] = {
|
||||
size = "ten",
|
||||
difficulty = "heroic",
|
||||
},
|
||||
[6] = {
|
||||
size = "twentyfive",
|
||||
difficulty = "heroic",
|
||||
},
|
||||
[7] = {
|
||||
size = "twentyfive",
|
||||
difficulty = "lfr",
|
||||
},
|
||||
[8] = {
|
||||
size = "party",
|
||||
difficulty = "challenge",
|
||||
},
|
||||
[9] = {
|
||||
size = "fortyman",
|
||||
difficulty = "normal",
|
||||
},
|
||||
[11] = {
|
||||
size = "scenario",
|
||||
difficulty = "heroic",
|
||||
},
|
||||
[12] = {
|
||||
size = "scenario",
|
||||
difficulty = "normal",
|
||||
},
|
||||
-- 13 is unused
|
||||
[14] = {
|
||||
size = "flexible",
|
||||
difficulty = "normal",
|
||||
},
|
||||
[15] = {
|
||||
size = "flexible",
|
||||
difficulty = "heroic",
|
||||
},
|
||||
[16] = {
|
||||
size = "twenty",
|
||||
difficulty = "mythic",
|
||||
},
|
||||
[17] = {
|
||||
size = "flexible",
|
||||
difficulty = "lfr",
|
||||
},
|
||||
[23] = {
|
||||
size = "party",
|
||||
difficulty = "mythic",
|
||||
},
|
||||
[24] = {
|
||||
size = "party",
|
||||
difficulty = "timewalking",
|
||||
},
|
||||
[33] = {
|
||||
size = "flexible",
|
||||
difficulty = "timewalking",
|
||||
},
|
||||
[148] = {
|
||||
size = "twenty",
|
||||
difficulty = "normal",
|
||||
},
|
||||
}
|
||||
|
||||
WeakAuras.glow_types = {
|
||||
ACShine = L["Autocast Shine"],
|
||||
Pixel = L["Pixel Glow"],
|
||||
|
||||
+22
-6
@@ -1946,16 +1946,32 @@ end
|
||||
local function GetInstanceTypeAndSize()
|
||||
local size, difficulty
|
||||
local inInstance, Type = IsInInstance()
|
||||
local _, instanceType, difficultyIndex = GetInstanceInfo()
|
||||
local _, instanceType, difficultyIndex, _, maxPlayers, playerDifficulty, isDynamicInstance = GetInstanceInfo()
|
||||
if (inInstance) then
|
||||
local ZoneMapID = GetCurrentMapAreaID()
|
||||
size = Type
|
||||
if Type ~= "pvp" and Type ~= "arena" then
|
||||
local difficultyInfo = WeakAuras.difficulty_info[difficultyIndex]
|
||||
if difficultyInfo then
|
||||
size, difficulty = difficultyInfo.size, difficultyInfo.difficulty
|
||||
if Type == "raid" then
|
||||
if maxPlayers == 10 then
|
||||
size = "ten"
|
||||
elseif maxPlayers == 25 then
|
||||
size = "twentyfive"
|
||||
elseif maxPlayers == 40 then
|
||||
size = "fortyman"
|
||||
end
|
||||
end
|
||||
end
|
||||
if isDynamic then
|
||||
if playerDifficulty == 0 then
|
||||
difficulty = "normal"
|
||||
elseif playerDifficulty == 1 then
|
||||
difficulty = "heroic"
|
||||
end
|
||||
else
|
||||
if difficultyIndex == 1 or difficultyIndex == 2 then
|
||||
difficulty = "normal"
|
||||
elseif difficultyIndex == 3 or difficultyIndex == 4 then
|
||||
difficulty = "heroic"
|
||||
end
|
||||
end
|
||||
return size, difficulty, instanceType, ZoneMapID
|
||||
end
|
||||
return "none", "none", nil, nil
|
||||
|
||||
Reference in New Issue
Block a user