From 3326723188e1a67b66662a3fbeeb664316a51987 Mon Sep 17 00:00:00 2001 From: Anch Date: Sat, 6 Aug 2022 13:16:22 +1200 Subject: [PATCH] removed generatetoken fixed error on first load changed mag so shows the t4 instead of 5 --- AtlasLoot/Core/AtlasLoot.lua | 16 +--------------- AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua | 2 +- AtlasLoot_BurningCrusade/burningcrusade.lua | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index 4d27f65..848b913 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -396,8 +396,6 @@ function AtlasLoot_OnLoad() AtlasLoot_Expac = xpaclist[GetAccountExpansionLevel()+1]; end getExpac(); - --AtlasLoot:GenerateTokenTables(); - end function AtlasLoot:CleandataID(newID, listnum) @@ -408,17 +406,6 @@ function AtlasLoot:CleandataID(newID, listnum) return newID; end -function AtlasLoot:GenerateTokenTables() - local Tiers = {"T1", "T2", "T2.5", "T3", "T4", "T5", "T6"}; - local Slots = {"HEAD", "SHOULDERS", "CHEST", "WRIST", "HAND", "WAIST", "LEGS", "FEET", "FINGER"}; - - for v = 1, #Tiers do - for k = 1, #Slots do - AtlasLoot:CreateToken(Tiers[v]..Slots[k]); - end - end -end - --Creates tables for raid tokens from the collections tables function AtlasLoot:CreateToken(dataID) local itemType, slotType, itemName, itemType2 @@ -451,8 +438,7 @@ function AtlasLoot:CreateToken(dataID) for _, t in ipairs(AtlasLoot_Data[dataID]) do for _, v in ipairs(t) do if type(v) == "table" then - local itemID = v[2]; - local item = Item:CreateFromID(itemID); + local item = Item:CreateFromID(v[2]); item:ContinueOnLoad(function(itemID) if itemType == select(9, GetItemInfo(itemID)) or itemType2 == select(9, GetItemInfo(itemID)) then table.insert(AtlasLoot_TokenData[orgID][1], {#AtlasLoot_TokenData[orgID][1] + 1, v[2], v[3], v[4], t.Name}); diff --git a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua index de0c2f4..636c92d 100644 --- a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua +++ b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua @@ -47,7 +47,7 @@ function AtlasLootDefaultFrame_OnShow() AtlasLoot_SetItemInfoFrame(pFrame); --Show the last displayed loot table local lastboss = AtlasLoot.db.profile.LastBoss; - if lastboss then + if lastboss and lastboss[6] then ATLASLOOT_CURRENTTABLE = lastboss[7]; ATLASLOOT_LASTMODULE = lastboss[6]; AtlasLoot_IsLootTableAvailable(lastboss[6]); diff --git a/AtlasLoot_BurningCrusade/burningcrusade.lua b/AtlasLoot_BurningCrusade/burningcrusade.lua index 4adcb41..08f70d5 100644 --- a/AtlasLoot_BurningCrusade/burningcrusade.lua +++ b/AtlasLoot_BurningCrusade/burningcrusade.lua @@ -1658,7 +1658,7 @@ local BabbleInventory = AtlasLoot_GetLocaleLibBabble("LibBabble-Inventory-3.0"); { 12, 28783, "", "=q4=Eredar Wand of Obliteration", "=ds=#w12#"}; { 14, 34845, "", "=q4=Pit Lord's Satchel", "=ds=#e1# #m15#"}; { 15, 34846, "", "=q2=Black Sack of Gems", "=ds=#e1#"}; - { 16, 29753, "", "=q4=Chestguard of the Fallen Defender", "=ds=#tt4#", "", "100%", "=LT=T5CHEST"}; + { 16, 29753, "", "=q4=Chestguard of the Fallen Defender", "=ds=#tt4#", "", "100%", "=LT=T4CHEST"}; { 18, 29434, "", "=q4=Badge of Justice", "=ds=#e15#", "", "100%"}; { 19, 32385, "", "=q4=Magtheridon's Head", "=ds=#m2#", "", "100%"}; { 20, 28791, "", "=q4=Ring of the Recalcitrant", "=q1=#m4#: =ds=#s13#"};