removed generatetoken fixed error on first load changed mag so shows the t4 instead of 5

This commit is contained in:
Anch
2022-08-06 13:16:22 +12:00
parent 2756114a11
commit 3326723188
3 changed files with 3 additions and 17 deletions
+1 -15
View File
@@ -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});
@@ -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]);