Module:Common: Difference between revisions

getRequirementString: Support requirement type MasteryLevel
No edit summary
(getRequirementString: Support requirement type MasteryLevel)
Line 295: Line 295:
if item ~= nil then
if item ~= nil then
table.insert(reqArray, 'Find ' .. Icons.Icon({item.name, type='item'}))
table.insert(reqArray, 'Find ' .. Icons.Icon({item.name, type='item'}))
end
elseif req.type == 'MasteryLevel' then
local skill = GameData.getSkillData(req.skillID)
local recipeKey = p.getSkillRecipeKey(req.skillID)
if skill ~= nil then
local action = GameData.getEntityByID(skill[recipeKey], req.actionID)
if action ~= nil then
table.insert(reqArray, Icons._MasteryReq(action.name, req.level, true))
end
end
end
elseif req.type == 'MonsterKilled' then
elseif req.type == 'MonsterKilled' then