feat: get skillname from character

This commit is contained in:
Kazhnuz 2021-08-31 10:57:34 +02:00
parent 3c94f9c1c6
commit 28f41fcc49

View file

@ -15,4 +15,18 @@ function CharacterData:getResistences()
return self.data.resists
end
function CharacterData:getSkillName(skill)
local skilldata = core.datas:get("skills", skill)
local name = skilldata.fullname
if (skilldata.altName ~= nil) then
if (skilldata.altName[self.simplename] ~= nil) then
name = skilldata.altName[self.simplename]
end
end
print(name)
return name
end
return CharacterData