From 12b7b72376ac882cad22041898a7d0ca5add498b Mon Sep 17 00:00:00 2001 From: Anch Date: Tue, 2 Aug 2022 22:47:34 +1200 Subject: [PATCH] wish lists are now working --- AtlasLoot/Core/AtlasLoot.lua | 24 +- AtlasLoot/Core/Filter.lua | 8 +- AtlasLoot/Core/LootButtons.lua | 19 +- AtlasLoot/Core/Search.lua | 29 - AtlasLoot/Core/WishList.lua | 173 +- AtlasLoot/TableRegister/TableRegister.xml | 9 - AtlasLoot/TableRegister/loottables.cn.lua | 102 - AtlasLoot/TableRegister/loottables.de.lua | 105 - AtlasLoot/TableRegister/loottables.en.lua | 2083 ------------------- AtlasLoot/TableRegister/loottables.es.lua | 97 - AtlasLoot/TableRegister/loottables.fr.lua | 105 - AtlasLoot/TableRegister/loottables.tw.lua | 202 -- AtlasLoot_BurningCrusade/burningcrusade.lua | 10 +- 13 files changed, 105 insertions(+), 2861 deletions(-) delete mode 100644 AtlasLoot/TableRegister/TableRegister.xml delete mode 100644 AtlasLoot/TableRegister/loottables.cn.lua delete mode 100644 AtlasLoot/TableRegister/loottables.de.lua delete mode 100644 AtlasLoot/TableRegister/loottables.en.lua delete mode 100644 AtlasLoot/TableRegister/loottables.es.lua delete mode 100644 AtlasLoot/TableRegister/loottables.fr.lua delete mode 100644 AtlasLoot/TableRegister/loottables.tw.lua diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index b752aec..d61bcaf 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -818,20 +818,20 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame, tablenum) getglobal("AtlasLootItemsFrame_NEXT"):Hide(); getglobal("AtlasLootItemsFrame_PREV"):Hide(); - if dataID ~= "FilterList" then AtlasLoot_BossName:SetText(dataSource[dataID][tablenum].Name); AtlasLootDefaultFrame_SubMenu:SetText(dataSource[dataID].Name); - end if tablenum + 1 ~= AtlasLoot_GetNumOfRows(dataSource[dataID]) then getglobal("AtlasLootItemsFrame_NEXT"):Show(); - getglobal("AtlasLootItemsFrame_NEXT").lootpage = dataID; + if dataID ~= "FilterList" then getglobal("AtlasLootItemsFrame_NEXT").tablenum = tablenum + 1; + end end if tablenum -1 ~= 0 then getglobal("AtlasLootItemsFrame_PREV"):Show(); - getglobal("AtlasLootItemsFrame_PREV").lootpage = dataID; + if dataID ~= "FilterList" then getglobal("AtlasLootItemsFrame_PREV").tablenum = tablenum - 1; + end end if dataSource[dataID].Back then getglobal("AtlasLootItemsFrame_BACK"):Show(); @@ -913,22 +913,10 @@ AtlasLoot_NavButton_OnClick: Called when <-, -> are pressed and calls up the appropriate loot page ]] function AtlasLoot_NavButton_OnClick() - local tabelname = this.lootpage; local tablenum = this.tablenum; + AtlasLootDefaultFrame_SubTableScrollFrameUpdate(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[4], tablenum); + AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], tablenum); - if AtlasLootItemsFrame.refresh and AtlasLootItemsFrame.refresh[4] and AtlasLootItemsFrame.refresh[5] then - if strsub(tabelname, 1, 16) == "SearchResultPage" then - AtlasLoot_ShowItemsFrame("SearchResult", tabelname, (AL["Search Result: %s"]):format(AtlasLootCharDB.LastSearchedText or ""), AtlasLootItemsFrame.refresh[4],AtlasLootItemsFrame.refresh[5]); - elseif strsub(tabelname, 1, 12) == "WishListPage" then - AtlasLoot_ShowItemsFrame("WishList", tabelname, AL["Wishlist"], AtlasLootItemsFrame.refresh[4],AtlasLootItemsFrame.refresh[5]); - else - AtlasLootDefaultFrame_SubTableScrollFrameUpdate(tabelname, AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[4], tablenum); - AtlasLoot_ShowItemsFrame(tabelname, AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4], tablenum); - end - else - --Fallback for if the requested loot page is a menu and does not have a .refresh instance - AtlasLoot_ShowItemsFrame(tabelname, "", "", AtlasFrame); - end end --[[ diff --git a/AtlasLoot/Core/Filter.lua b/AtlasLoot/Core/Filter.lua index 9edcee0..e778629 100644 --- a/AtlasLoot/Core/Filter.lua +++ b/AtlasLoot/Core/Filter.lua @@ -104,9 +104,9 @@ end function AtlasLoot_HideNoUsableItems() - local dataID = AtlasLootItemsFrame.refreshOri[1] - local dataSource = AtlasLootItemsFrame.refreshOri[2] - local boss = AtlasLootItemsFrame.refreshOri[3] + local dataID = AtlasLootItemsFrame.refreshOri[1] + local dataSource = AtlasLootItemsFrame.refreshOri[2] + local boss = AtlasLootItemsFrame.refreshOri[3] local pFrame = AtlasLootItemsFrame.refreshOri[4] local tablenum = AtlasLootItemsFrame.refreshOri[5] local tablebase = AtlasLoot_Data[dataID][tablenum] @@ -116,7 +116,7 @@ function AtlasLoot_HideNoUsableItems() local count = 0 local leatherworking = GetSpellInfo(2108) - AtlasLoot_Data["FilterList"] = { Type = dataSource[dataID].Type; [tablenum] = {}; }; + AtlasLoot_Data["FilterList"] = { Type = dataSource[dataID].Type; Name = dataSource[dataID].Name;[tablenum] = {Name = dataSource[dataID][tablenum].Name}; }; for i=1,30 do local info = getglobal("AtlasLootItem_"..i.."_Extra"):GetText() diff --git a/AtlasLoot/Core/LootButtons.lua b/AtlasLoot/Core/LootButtons.lua index a5ff866..6e2f047 100644 --- a/AtlasLoot/Core/LootButtons.lua +++ b/AtlasLoot/Core/LootButtons.lua @@ -219,9 +219,7 @@ function AtlasLootItem_OnClick(arg1) end if isItem then local iteminfo = GetItemInfo(this.itemID); - local itemIDBloody = 6000000+(this.itemID); local itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemCount, itemEquipLoc, itemTexture = GetItemInfo(this.itemID); - local itemNameB, itemLinkB, itemQualityB, itemLevelB, itemMinLevelB, itemTypeB, itemSubTypeB, itemCountB, itemEquipLocB, itemTextureB = GetItemInfo(itemIDBloody); --If shift-clicked, link in the chat window if(arg1=="RightButton" and not iteminfo and this.itemID ~= 0) then AtlasLootTooltip:SetHyperlink("item:"..this.itemID..":0:0:0:0:0:0:0"); @@ -231,9 +229,6 @@ function AtlasLootItem_OnClick(arg1) elseif(arg1=="RightButton" and iteminfo) then if not AtlasLoot.db.profile.ItemSpam then DEFAULT_CHAT_FRAME:AddMessage(itemLink..AL[" is safe."]); - if(itemLinkB) then - DEFAULT_CHAT_FRAME:AddMessage(itemLinkB..AL[" is safe."]); - end end elseif(IsShiftKeyDown() and iteminfo and (AtlasLoot.db.profile.SafeLinks or AtlasLoot.db.profile.AllLinks)) then ChatEdit_InsertLink(itemLink); @@ -247,18 +242,10 @@ function AtlasLootItem_OnClick(arg1) elseif(IsAltKeyDown() and (this.itemID ~= 0)) then if AtlasLootItemsFrame.refresh[1] == "WishList" then AtlasLoot_DeleteFromWishList(this.itemID); - elseif AtlasLootItemsFrame.refresh[1] == "SearchResult" then - if this.difficulty then - AtlasLoot:GetOriginalDataFromSearchResult(this.itemID); - end else - if this.difficulty then - AtlasLoot_ShowWishListDropDown(this.itemID, this.itemTexture, getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), AtlasLootItemsFrame.refreshOri[1].."|"..AtlasLootItemsFrame.refreshOri[2], this, nil, this.difficulty); - else - AtlasLoot_ShowWishListDropDown(this.itemID, this.itemTexture, getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), AtlasLootItemsFrame.refreshOri[1].."|"..AtlasLootItemsFrame.refreshOri[2], this); - end + AtlasLoot_ShowWishListDropDown(this.itemID, this.itemTexture, getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), "", this); end - elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult" or AtlasLootItemsFrame.refresh[1] == "WishList") and this.sourcePage) then + elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult") and this.sourcePage) then local dataID, dataSource = strsplit("|", this.sourcePage); if(dataID and dataSource) then AtlasLoot_ShowItemsFrame(dataID, dataSource, dataSource[dataID].Name, AtlasLootItemsFrame.refresh[4], 1); @@ -280,7 +267,7 @@ function AtlasLootItem_OnClick(arg1) else spellName, _, _, _, _, _, _, _, _ = GetSpellInfo(string.sub(this.itemID, 2)); --spellIcon = GetItemIcon(this.dressingroomID); - AtlasLoot_ShowWishListDropDown(this.itemID, this.dressingroomID, "=ds="..spellName, "=ds="..AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refreshOri[1].."|"..AtlasLootItemsFrame.refreshOri[2],this); + AtlasLoot_ShowWishListDropDown(this.itemID, this.dressingroomID, "=ds="..spellName, "=ds="..AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[1].."|"..AtlasLootItemsFrame.refresh[2],this); end elseif(IsControlKeyDown()) then DressUpItemLink("item:"..this.dressingroomID..":0:0:0:0:0:0:0"); diff --git a/AtlasLoot/Core/Search.lua b/AtlasLoot/Core/Search.lua index 3208553..fdf4c57 100644 --- a/AtlasLoot/Core/Search.lua +++ b/AtlasLoot/Core/Search.lua @@ -827,32 +827,3 @@ function AtlasLoot:GetOriginalDataFromSearchResult(itemID) end end --- Copied and modified from AtlasLoot_GetWishListPage -function AtlasLoot:GetSearchResultPage(page) - if not SearchResult then - SearchResult = AtlasLoot_CategorizeWishList(AtlasLootCharDB["SearchResult"]) - end - -- Calc for maximal pages - local pageMax = math.ceil(#SearchResult / 30); - if page < 1 then - page = 1 - end - if page > pageMax then - page = pageMax - end - currentPage = page; - - -- Table copy - local k = 1; - local result = {}; - local start = (page - 1) * 30 + 1; - for i = start, start + 29 do - if not SearchResult[i] then - break - end - SearchResult[i][1] = k; - table.insert(result, SearchResult[i]); - k = k + 1; - end - return result, pageMax; -end diff --git a/AtlasLoot/Core/WishList.lua b/AtlasLoot/Core/WishList.lua index 28d2129..b8b4f1d 100644 --- a/AtlasLoot/Core/WishList.lua +++ b/AtlasLoot/Core/WishList.lua @@ -10,7 +10,6 @@ AtlasLoot_WishListSortCheck(temp1, temp2) local RecursiveSearchZoneName(dataTable, zoneID) AtlasLoot_GetWishListSubheading(dataID) AtlasLoot_CategorizeWishList(wlTable) -AtlasLoot_GetWishListPage(page) AtlasLoot_WishListCheck(itemID, all) AtlasLoot_GetWishLists([playerName]) AtlasLoot_CheckWishlistItem(itemID ,[playerName ,[wishlist] ]) @@ -32,7 +31,7 @@ AtlasLoot_WishListDrop = AceLibrary("Dewdrop-2.0"); AtlasLoot_WishList = nil; local currentPage = 1; local playerName = UnitName("player") -local itemID, itemTexture, itemName, lootPage, sourcePage, lasttyp, xtyp, xarg2, xarg3, difficulty +local itemID, itemTexture, itemName, lootPage, sourcePage, xtyp, xarg2, xarg3, difficulty local lastWishListtyp, lastWishListarg2, lastWishListarg3 local OptionsLoadet = false @@ -49,16 +48,43 @@ local PURPLE = "|cff9F3FFF"; local BLUE = "|cff0070dd"; local ORANGE = "|cffFF8400"; + + --[[ AtlasLoot_ShowWishList() Displays the WishList ]] function AtlasLoot_ShowWishList() + + local function sort() + for i,v in ipairs(AtlasLootWishList["WishList"][1]) do + v = rawset(v, 1, i); + end + end + if lastWishListtyp == "addOwn" then + AtlasLootWishList["WishList"] = AtlasLootWishList["Own"][playerName]; + sort(); + AtlasLootWishList["WishList"].Name = "Wish List"; + AtlasLootWishList["WishList"].Back = true; + AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Own"][playerName][lastWishListarg2]["info"][1]; + AtlasLootDefaultFrame_SubTableScrollFrameUpdate("WishList", AtlasLootWishList, pFrame, 1); AtlasLoot_ShowItemsFrame("WishList", AtlasLootWishList, AtlasLootWishList["Own"][playerName][lastWishListarg2]["info"][1], pFrame, 1); elseif lastWishListtyp == "addOther" then + AtlasLootWishList["WishList"] = AtlasLootWishList["Own"][lastWishListarg2]; + sort(); + AtlasLootWishList["WishList"].Name = "Wish List"; + AtlasLootWishList["WishList"].Back = true; + AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3]["info"][1]; + AtlasLootDefaultFrame_SubTableScrollFrameUpdate("WishList", AtlasLootWishList, pFrame, 1); AtlasLoot_ShowItemsFrame("WishList", AtlasLootWishList, AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3]["info"][1], pFrame, 1); elseif lastWishListtyp == "addShared" then + AtlasLootWishList["WishList"] = AtlasLootWishList["Shared"][lastWishListarg2]; + sort(); + AtlasLootWishList["WishList"].Name = "Wish List"; + AtlasLootWishList["WishList"].Back = true; + AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3]["info"][1]; + AtlasLootDefaultFrame_SubTableScrollFrameUpdate("WishList", AtlasLootWishList, pFrame, 1); AtlasLoot_ShowItemsFrame("WishList", AtlasLootWishList, AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3]["info"][1], pFrame, 1); end end @@ -79,7 +105,7 @@ end --[[ AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4) Add a item too the wishlist or show the selectet wishlist -]] +]] function AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4) if arg4 == true then if typ == "addOwn" then @@ -110,7 +136,7 @@ function AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4) return; end - table.insert(AtlasLootWishList["Own"][playerName][arg2], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage, [AtlasLoot_Difficulty.DIF_SEARCH] = difficulty}); + table.insert(AtlasLootWishList["Own"][playerName][arg2], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage}); DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..GREY..AL[" added to the WishList."]..WHITE.." ("..AtlasLootWishList["Own"][playerName][arg2]["info"][1]..")"); AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Own"][playerName][arg2]); @@ -148,8 +174,8 @@ end AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show) Show the dropdownlist with the wishlists ]] -function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show, xdifficulty) - itemID, itemTexture, itemName, lootPage, sourcePage, difficulty = xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, xdifficulty; +function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show) + itemID, itemTexture, itemName, lootPage, sourcePage = xitemID, xitemTexture, xitemName, xlootPage, xsourcePage if AtlasLootWishList["Options"][playerName]["UseDefaultWishlist"] == false then if AtlasLoot_WishListDrop:IsOpen(button) then AtlasLoot_WishListDrop:Close(1); @@ -199,17 +225,19 @@ function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootP elseif level == 2 then if value == "OwnWishlists" then for k,v in pairs(AtlasLootWishList["Own"][playerName]) do - AtlasLoot_WishListDrop:AddLine( - "text", AtlasLootWishList["Own"][playerName][k]["info"][1], - "tooltipTitle", AtlasLootWishList["Own"][playerName][k]["info"][1], - "tooltipText", "", - "func", AtlasLoot_WishListAddDropClick, - "arg1", "addOwn", - "arg2", k, - "arg3", "", - "arg4", show, - "notCheckable", true - ); + if type(v) == "table" then + AtlasLoot_WishListDrop:AddLine( + "text", AtlasLootWishList["Own"][playerName][k]["info"][1], + "tooltipTitle", AtlasLootWishList["Own"][playerName][k]["info"][1], + "tooltipText", "", + "func", AtlasLoot_WishListAddDropClick, + "arg1", "addOwn", + "arg2", k, + "arg3", "", + "arg4", show, + "notCheckable", true + ); + end end elseif value == "OtherWishlists" then for k,v in pairs(AtlasLootWishList["Own"]) do @@ -250,36 +278,40 @@ function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootP for k,v in pairs(AtlasLootWishList["Own"]) do if value == k then for i,j in pairs(AtlasLootWishList["Own"][k]) do - AtlasLoot_WishListDrop:AddLine( - "text", AtlasLootWishList["Own"][k][i]["info"][1], - "tooltipTitle", AtlasLootWishList["Own"][k][i]["info"][1], - "tooltipText", "", - "func", AtlasLoot_WishListAddDropClick, - "arg1", "addOther", - "arg2", k, - "arg3", i, - "arg4", show, - "value", - "notCheckable", true - ); + if type(j) == "table" then + AtlasLoot_WishListDrop:AddLine( + "text", AtlasLootWishList["Own"][k][i]["info"][1], + "tooltipTitle", AtlasLootWishList["Own"][k][i]["info"][1], + "tooltipText", "", + "func", AtlasLoot_WishListAddDropClick, + "arg1", "addOther", + "arg2", k, + "arg3", i, + "arg4", show, + "value", + "notCheckable", true + ); + end end end end for k,v in pairs(AtlasLootWishList["Shared"]) do if value == k then for i,j in pairs(AtlasLootWishList["Shared"][k]) do - AtlasLoot_WishListDrop:AddLine( - "text", AtlasLootWishList["Shared"][k][i]["info"][1], - "tooltipTitle", AtlasLootWishList["Shared"][k][i]["info"][1], - "tooltipText", "", - "func", AtlasLoot_WishListAddDropClick, - "arg1", "addShared", - "arg2", k, - "arg3", i, - "arg4", show, - "value", - "notCheckable", true - ); + if type(j) == "table" then + AtlasLoot_WishListDrop:AddLine( + "text", AtlasLootWishList["Shared"][k][i]["info"][1], + "tooltipTitle", AtlasLootWishList["Shared"][k][i]["info"][1], + "tooltipText", "", + "func", AtlasLoot_WishListAddDropClick, + "arg1", "addShared", + "arg2", k, + "arg3", i, + "arg4", show, + "value", + "notCheckable", true + ); + end end end end @@ -333,7 +365,7 @@ function AtlasLoot_DeleteFromWishList(itemID) break; end end - AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Own"][playerName][lastWishListarg2]) + AtlasLoot_WishList = AtlasLootWishList["Own"][playerName][lastWishListarg2] elseif lastWishListtyp == "addOther" then for i, v in ipairs(AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3]) do if v[2] == itemID then @@ -342,7 +374,7 @@ function AtlasLoot_DeleteFromWishList(itemID) break; end end - AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3]) + AtlasLoot_WishList = AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3] elseif lastWishListtyp == "addShared" then for i, v in ipairs(AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3]) do if v[2] == itemID then @@ -351,7 +383,7 @@ function AtlasLoot_DeleteFromWishList(itemID) break; end end - AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3]) + AtlasLoot_WishList = AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3] end AtlasLootItemsFrame:Hide(); AtlasLoot_ShowWishList() @@ -538,39 +570,6 @@ function AtlasLoot_CategorizeWishList(wlTable) return result; end ---[[ -AtlasLoot_GetWishListPage(page): -Return partial data of WishList table -page: the page number needed -]] - -function AtlasLoot_GetWishListPage(page) - if lastWishListtyp == "addOwn" then - AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Own"][playerName][lastWishListarg2]) - elseif lastWishListtyp == "addOther" then - AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3]) - elseif lastWishListtyp == "addShared" then - AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3]) - end - -- Calc for maximal pages - local pageMax = math.ceil(#AtlasLoot_WishList / 30); - if page < 1 then page = 1 end - if page > pageMax then page = pageMax end - currentPage = page; - - -- Table copy - local k=1; - local result = {}; - local start = (page - 1) * 30 + 1; - for i = start, start + 29 do - if not AtlasLoot_WishList[i] then break end - AtlasLoot_WishList[i][1] = k; - table.insert(result, AtlasLoot_WishList[i]); - k=k+1; - end - return result, pageMax; -end - --[[ AtlasLoot_WishListCheck(itemID, all): Returns true if an item is already in the wishlist @@ -581,14 +580,16 @@ function AtlasLoot_WishListCheck(itemID, all) if not AtlasLootWishList["Options"][playerName]["markInTable"] then AtlasLootWishList["Options"][playerName]["markInTable"] = "own" end if AtlasLootWishList["Options"][playerName]["markInTable"] == "own" then for k,v in pairs(AtlasLootWishList["Own"][playerName]) do - for i,j in pairs(AtlasLootWishList["Own"][playerName][k]) do - if AtlasLootWishList["Own"][playerName][k][i][2] == itemID then - if AtlasLootWishList["Own"][playerName][k]["info"][3] ~= "" then - rettex = rettex.."|T"..AtlasLootWishList["Own"][playerName][k]["info"][3]..":0|t" - else - rettex = rettex.."|TInterface\\Icons\\INV_Misc_QuestionMark:0|t" + if type(v) == "table" then + for i,j in pairs(AtlasLootWishList["Own"][playerName][k]) do + if AtlasLootWishList["Own"][playerName][k][i][2] == itemID then + if AtlasLootWishList["Own"][playerName][k]["info"][3] ~= "" then + rettex = rettex.."|T"..AtlasLootWishList["Own"][playerName][k]["info"][3]..":0|t" + else + rettex = rettex.."|TInterface\\Icons\\INV_Misc_QuestionMark:0|t" + end + break end - break end end end @@ -1166,7 +1167,7 @@ function AtlasLoot_RefreshWishlists() elseif showallwishlists == false then ClearLines() local framewidht = InterfaceOptionsFramePanelContainer:GetWidth() - for k,v in pairs(AtlasLootWishList["Own"][playerName]) do + for k,v in ipairs(AtlasLootWishList["Own"][playerName]) do AddWishListOptions(AtlasLootWishlistOwnOptionsScrollInhalt,AtlasLootWishList["Own"][playerName][k]["info"][1],AtlasLootWishList["Own"][playerName][k]["info"][3], framewidht-45, k, playerName) end end @@ -1192,7 +1193,7 @@ function AtlasLoot_CreateWishlistOptions() AtlasLootCharDB["WishList"] = nil end for k,v in pairs(AtlasLootWishList["Own"]) do - for i,j in pairs(AtlasLootWishList["Own"][k]) do + for i,j in ipairs(AtlasLootWishList["Own"][k]) do if type(AtlasLootWishList["Own"][k][i]["info"][2]) ~= "table" then AtlasLootWishList["Own"][k][i]["info"][2] = {[playerName] = false}; end diff --git a/AtlasLoot/TableRegister/TableRegister.xml b/AtlasLoot/TableRegister/TableRegister.xml deleted file mode 100644 index a128871..0000000 --- a/AtlasLoot/TableRegister/TableRegister.xml +++ /dev/null @@ -1,9 +0,0 @@ - -