3,088
edits
No edit summary |
(Fixed currencies not showing up in task list) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 168: | Line 168: | ||
local elemClass = (quantity < 0 and 'text-negative') or 'text-positive' | local elemClass = (quantity < 0 and 'text-negative') or 'text-positive' | ||
local resIcon = Icons.Icon({resName, type=resType, notext=true}) | local resIcon = Icons.Icon({resName, type=resType, notext=true}) | ||
return resIcon .. ' <span class="' .. elemClass .. '">' .. | return resIcon .. ' <span class="' .. elemClass .. '">' .. Num.numStrWithSign(quantity) .. '</span>' | ||
end | end | ||
Line 895: | Line 895: | ||
local rewards = {} | local rewards = {} | ||
local rewardsVariableQty = {} | local rewardsVariableQty = {} | ||
if task.rewards. | if task.rewards.currencies ~= nil then | ||
for _, currReward in ipairs(task.rewards. | for _, currReward in ipairs(task.rewards.currencies) do | ||
if isDailyTask then | if isDailyTask and currReward.id ~= 'melvorD:GP' then | ||
table.insert(rewardsVariableQty, Icons._Currency(currReward.id)) | table.insert(rewardsVariableQty, Icons._Currency(currReward.id)) | ||
elseif not isDailyTask then | |||
table.insert(rewards, Icons._Currency(currReward.id, currReward. | table.insert(rewards, Icons._Currency(currReward.id, currReward.quantity)) | ||
end | end | ||
end | end | ||
Line 988: | Line 988: | ||
if referenceType == 'dungeon' then | if referenceType == 'dungeon' then | ||
-- We get the tasks associated with all monsters in the dungeon | -- We get the tasks associated with all monsters in the dungeon | ||
local | local area = nil | ||
local areaTypes = {'dungeons', 'abyssDepths'} | |||
for _, areaType in ipairs(areaTypes) do | |||
area = GameData.getEntityByName(areaType, referenceName) | |||
if area ~= nil then | |||
break | |||
end | |||
end | |||
local monsters = area.monsterIDs | |||
for _, monster in ipairs(monsters) do | for _, monster in ipairs(monsters) do | ||
IDs[monster] = true | IDs[monster] = true |