This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Trial of Valor is showing up in the middle of Emerald Nightmare.
It's just a sugestion, but maybe can add in addon (im not to familiar with LUA so sorry if code is bit bad). As i did understand problem is that cant ipair RaidData so i did make modificantion in my addon:main.lua
function addon:SortButtonOrder(DungeonAmountFunc, DungeonInfoFunc)
--max dungeon count in data local MaxData = 0 for i, v in pairs(self.raidData) do MaxData = MaxData + 1 end --shift for case if dungeon is not in data local NoDataShift = 1 --order of LFR to create local LFROrder = {} --get all LFR from wow for i = 1, DungeonAmountFunc() do local id = DungeonInfoFunc(i) local isAvailable, isAvailableToPlayer = IsLFGDungeonJoinable(id)
-- if can't join it no point in checking its position if isAvailable and isAvailableToPlayer then local Poz = nil --look for instance position in data table for add_id, add_v in pairs(self.raidData) do if add_id == id then Poz = add_v.sortOrder break end end --if didn't find instance asign position in the end of list if Poz == nil then Poz = MaxData + NoDataShift NoDataShift = NoDataShift + 1 end LFROrder[Poz] = i end end -- create position array SortKey = {} for i in pairs(LFROrder) do table.insert(SortKey, i) end -- sort positions table.sort(SortKey) -- create sorted array for raid ID SortedID = {} for _, i in ipairs(SortKey) do table.insert(SortedID, LFROrder[i]) end
return SortedID end
function addon:CreateButtons(parentFrame, DungeonAmountFunc, DungeonInfoFunc, SetDropdownMenuFunc)
...
SortedID = self:SortButtonOrder(DungeonAmountFunc, DungeonInfoFunc) --for i = 1, DungeonAmountFunc() do for _, i in ipairs(SortedID) do
end
raid_data.lua
-- Emerald Nightmare LFR [1287] = { numEncounters = 3, startFrom = 1 , sortOrder = 30}, -- Darkbough [1288] = { numEncounters = 3, startFrom = 1 , sortOrder = 31}, -- Tormented Guardians 4 [1289] = { numEncounters = 1, startFrom = 1 , sortOrder = 32}, -- Rift of Aln 7 -- Trial of Valor LFR [1411] = { numEncounters = 3, startFrom = 1 , sortOrder = 33}, -- Trial of Valor -- Nighthold [1290] = { numEncounters = 3, startFrom = 1 , sortOrder = 34}, -- Arcing Aqueducts [1291] = { numEncounters = 3, startFrom = 1 , sortOrder = 35}, -- Royal Athenaeum 4 [1292] = { numEncounters = 3, startFrom = 1 , sortOrder = 36}, -- Nightspire 7 [1293] = { numEncounters = 1, startFrom = 1 , sortOrder = 37}, -- Betrayers Rise 10
It fixed itself at some point.
To post a comment, please login or register a new account.