Skip to content

Commit

Permalink
added bonusid lookup table for SL crafts (blue and above)
Browse files Browse the repository at this point in the history
added function to consolidate items with same id and ilvl
  • Loading branch information
solidity0815 committed Apr 1, 2022
1 parent b0000e8 commit 9eb7d22
Showing 1 changed file with 157 additions and 22 deletions.
179 changes: 157 additions & 22 deletions CraftLog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,92 @@ local prospectingInventory = {

-- bonusIDs for itemLink cleanup
local bonusIDs = {
[]
}
-- BS legendaries
[171419] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[171412] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[171414] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[171416] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[171415] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[171417] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[171413] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[171418] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
-- JC legendaries
[178926] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[178927] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
-- TA legendaries
[173248] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173249] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173242] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173245] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173244] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173246] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173241] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173243] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[173247] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
-- LW legendaries
[172316] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172315] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172314] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172321] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172319] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172317] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172320] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172318] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172329] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172323] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172327] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172326] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172328] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172325] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172322] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
[172324] = { [190] = { 1487, 6716 }, [210] = { 1507, 6716 }, [225] = { 1522, 6716 }, [235] = { 1532, 6716 }, [249] = { 1546, 6716 }, [262] = { 1559, 6716 }, [291] = { 1588, 6716 } },
-- BS Shadowsteel
[171446] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[171442] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[171443] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[171448] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[171447] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[171449] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[171444] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[171445] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
-- JC Rings & Necks
[173134] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
[173145] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
[173133] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
[173146] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
[173144] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
[173131] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
[173132] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
[173147] = { [87] = { 7224 }, [117] = { 7180 }, [168] = { 7185 }, [200] = { 7183 }, [230] = { 7461 }, [233] = { 7880 }, [262] = { 7881 } },
-- TA Shadowlace
[173222] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173218] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173217] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173216] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173219] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173221] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173215] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173214] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[173220] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
-- LW Shadebound
[172257] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172253] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172254] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172251] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172252] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172256] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172255] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172250] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
-- LW Shadowscale
[172265] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172260] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172259] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172262] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172261] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172258] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172263] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
[172264] = { [87] = { 6893, 7224 }, [117] = { 6893, 7180 }, [168] = { 6893, 7185 }, [200] = { 6893, 7183 }, [230] = { 6893, 7461 }, [233] = { 6893, 7880 }, [262] = { 6893, 7881 } },
}

-- optional reagents with ilvl effect and temp storage for current inventory
local optionalReagentsIlvl = {
Expand Down Expand Up @@ -242,6 +326,61 @@ function OnBagUpdateDelayed(...)
end
end

-- clean itemlinks to remove extraeneous info like crafter's level and spec
function GetCleanItemLink(itemLink, ilvl)
local cleanLink = ""
local stripBonus = false
local splitLink = {strsplit(":", itemLink)}
splitLink[10] = "" -- strip crafters level
splitLink[11] = "" -- strip crafters spec
splitLink[13] = "" -- strip item context

-- correct bonusids if known
if not (bonusIDs[splitLink[2]] == nil) then
if (splitLink[14] == 2) then
splitLink[15] = bonusIDs[splitLink[2]][ilvl][1]
splitLink[16] = bonusIDs[splitLink[2]][ilvl][2]
elseif (splitLink[14] == 1) then
splitLink[14] = 2
splitLink[15] = bonusIDs[splitLink[2]][ilvl][1]..":"..bonusIDs[splitLink[2]][ilvl][2]
end
else
stripBonus = true
end

-- reassemble itemlink
if (splitLink[2] == "172231") then
for i, s in ipairs(splitLink) do
print(i.." : "..s)
end
end
if (splitLink[2] == "172231") then print(splitLink[14]) end
for i, s in ipairs(splitLink) do
if (splitLink[2] == "172231") then print(i) end
if (i==1) then
cleanLink = s
if (splitLink[2] == "172231") then print("A") end
elseif (i==14) and (stripBonus) then
cleanLink = cleanLink..":"
if (splitLink[2] == "172231") then print("B") end
elseif (i==15) and (stripBonus) and (splitLink[14]=="1") then
cleanLink = cleanLink
if (splitLink[2] == "172231") then print("C1") end
elseif (i==15) and (stripBonus) and (splitLink[14]=="2") then
cleanLink = cleanLink
if (splitLink[2] == "172231") then print("C2") end
elseif (i==16) and (stripBonus) and (splitLink[14]=="2") then
cleanLink = cleanLink
if (splitLink[2] == "172231") then print("D") end
else
cleanLink = cleanLink..":"..s
if (splitLink[2] == "172231") then print("E") end
end
if (splitLink[2] == "172231") then print(cleanLink) end
end
return cleanLink
end

-- return distinct items from CRAFTLOG including usage/crafted amounts over various periods
function GetItemStats()
-- TODO: cleanup itemLinks so that crafting profession, character etc do not matter
Expand All @@ -259,36 +398,37 @@ function GetItemStats()
local age = floor((time() - time({day=day, month=month, year=year}))/86400)
for kCraft, vCraft in pairs(vDay) do
for kLink, vLink in pairs(vCraft) do
if (t[kLink] == nil) then t[kLink] = {} end
for kIlvl, vIlvl in pairs(vLink) do
if (t[kLink][kIlvl] == nil) then t[kLink][kIlvl] = {} end
local kLinkClean = GetCleanItemLink(kLink, kIlvl)
if (t[kLinkClean] == nil) then t[kLinkClean] = {} end
if (t[kLinkClean][kIlvl] == nil) then t[kLinkClean][kIlvl] = {} end
for kDir, vDir in pairs(vIlvl) do
if (t[kLink][kIlvl][kDir] == nil) then t[kLink][kIlvl][kDir] = {} end
if (t[kLinkClean][kIlvl][kDir] == nil) then t[kLinkClean][kIlvl][kDir] = {} end
if (age<=7) then
if (t[kLink][kIlvl][kDir]["7day"] == nil) then
t[kLink][kIlvl][kDir]["7day"] = vDir
if (t[kLinkClean][kIlvl][kDir]["7day"] == nil) then
t[kLinkClean][kIlvl][kDir]["7day"] = vDir
else
t[kLink][kIlvl][kDir]["7day"] = t[kLink][kIlvl][kDir]["7day"] + vDir
t[kLinkClean][kIlvl][kDir]["7day"] = t[kLinkClean][kIlvl][kDir]["7day"] + vDir
end
end
if (age<=14) then
if (t[kLink][kIlvl][kDir]["14day"] == nil) then
t[kLink][kIlvl][kDir]["14day"] = vDir
if (t[kLinkClean][kIlvl][kDir]["14day"] == nil) then
t[kLinkClean][kIlvl][kDir]["14day"] = vDir
else
t[kLink][kIlvl][kDir]["14day"] = t[kLink][kIlvl][kDir]["14day"] + vDir
t[kLinkClean][kIlvl][kDir]["14day"] = t[kLinkClean][kIlvl][kDir]["14day"] + vDir
end
end
if (age<=30) then
if (t[kLink][kIlvl][kDir]["30day"] == nil) then
t[kLink][kIlvl][kDir]["30day"] = vDir
if (t[kLinkClean][kIlvl][kDir]["30day"] == nil) then
t[kLinkClean][kIlvl][kDir]["30day"] = vDir
else
t[kLink][kIlvl][kDir]["30day"] = t[kLink][kIlvl][kDir]["30day"] + vDir
t[kLinkClean][kIlvl][kDir]["30day"] = t[kLinkClean][kIlvl][kDir]["30day"] + vDir
end
end
if (t[kLink][kIlvl][kDir]["total"] == nil) then
t[kLink][kIlvl][kDir]["total"] = vDir
if (t[kLinkClean][kIlvl][kDir]["total"] == nil) then
t[kLinkClean][kIlvl][kDir]["total"] = vDir
else
t[kLink][kIlvl][kDir]["total"] = t[kLink][kIlvl][kDir]["total"] + vDir
t[kLinkClean][kIlvl][kDir]["total"] = t[kLinkClean][kIlvl][kDir]["total"] + vDir
end
end
end
Expand Down Expand Up @@ -430,11 +570,6 @@ function InitializeSavedVariables(...)
end
end

-- clean itemlinks to remove extraeneous info like crafter's level and spec
function CleanItemlink(itemLink, ilvl)

end

function f:ShowData()
-- headers for Timeframes
local header1d = f:CreateFontString(f, "ARTWORK", "GameFontHighlight")
Expand Down

0 comments on commit 9eb7d22

Please sign in to comment.