4,951
edits
Falterfire (talk | contribs) (Changed getByID functions to key off of index to match how the game does things) |
Falterfire (talk | contribs) (Added nolink option to getMonsterStyleIcon) |
||
Line 77: | Line 77: | ||
local MonsterName = args[1] | local MonsterName = args[1] | ||
local notext = args.notext | local notext = args.notext | ||
local nolink = args.nolink | |||
local monster = p.getMonster(MonsterName) | local monster = p.getMonster(MonsterName) | ||
Line 85: | Line 86: | ||
local iconText = '' | local iconText = '' | ||
if monster.attackType == Constants.attackType.Melee then | if monster.attackType == Constants.attackType.Melee then | ||
iconText = Icons.Icon({'Melee', notext=notext}) | iconText = Icons.Icon({'Melee', notext=notext, nolink=nolink}) | ||
elseif monster.attackType == Constants.attackType.Ranged then | elseif monster.attackType == Constants.attackType.Ranged then | ||
iconText = Icons.Icon({'Ranged', type='skill', notext=notext}) | iconText = Icons.Icon({'Ranged', type='skill', notext=notext, nolink=nolink}) | ||
else | else | ||
iconText = Icons.Icon({'Magic', type='skill', notext=notext}) | iconText = Icons.Icon({'Magic', type='skill', notext=notext, nolink=nolink}) | ||
end | end | ||