Module:Items/SourceTables: Difference between revisions

Fixed junk not showing in sources and Abyssal loot showing regular skill req
No edit summary
(Fixed junk not showing in sources and Abyssal loot showing regular skill req)
Line 961: Line 961:


-- Fishing: Junk & Specials
-- Fishing: Junk & Specials
if Shared.contains(SkillData.Fishing.junkItems, item.id) then
if Shared.contains(SkillData.Fishing.junkItemIDs, item.id) then
local fishSource = '[[Fishing#Junk|Junk]]'
local fishSource = '[[Fishing#Junk|Junk]]'
local fishType = Icons.Icon({'Fishing', type='skill'})
local fishType = Icons.Icon({'Fishing', type='skill'})
local fishTotWeight = Shared.tableCount(SkillData.Fishing.JunkItems)
local fishTotWeight = Shared.tableCount(SkillData.Fishing.junkItemIDs)
table.insert(dropRows, {
table.insert(dropRows, {
source = fishSource,  
source = fishSource,  
Line 974: Line 974:
totalWeight = fishTotWeight})
totalWeight = fishTotWeight})
else
else
local fishTotWeight, fishItem = 0, nil
local fishTotWeight, fishItem, realmID = {['melvorD:Melvor'] = 0, ['melvorItA:Abyssal'] = 0}, nil, nil
for i, specialItem in ipairs(SkillData.Fishing.specialItems) do
for i, specialItem in ipairs(SkillData.Fishing.specialItems) do
for f, drop in ipairs(specialItem.drops) do
for f, drop in ipairs(specialItem.drops) do
if drop.itemID == item.id then
if drop.itemID == item.id then
fishItem = drop
fishItem = drop
realmID = specialItem.realmID
end
end
fishTotWeight = fishTotWeight + drop.weight
fishTotWeight[specialItem.realmID] = fishTotWeight[specialItem.realmID] + drop.weight
end
end
end
end
Line 988: Line 989:
table.insert(dropRows, {
table.insert(dropRows, {
source = fishSource,  
source = fishSource,  
level = Icons._SkillReq("Fishing", 1),
level = Icons._SkillReq("Fishing", 1, false, realmID),
levelNum = 1,
levelNum = 1,
minqty = fishItem.minQuantity,  
minqty = fishItem.minQuantity,  
qty = fishItem.maxQuantity,  
qty = fishItem.maxQuantity,  
weight = fishItem.weight,  
weight = fishItem.weight,  
totalWeight = fishTotWeight})
totalWeight = fishTotWeight[realmID]})
end
end
end
end