chore: rename getStatByType

This commit is contained in:
Kazhnuz 2021-06-12 10:29:46 +02:00
parent 011335ab1a
commit 1fb2469188

View file

@ -44,13 +44,13 @@ function CharacterEquip:getEquipStats(stat, ignore)
local ignore = ignore or ""
for _, category in ipairs(categories) do
if (category ~= ignore) then
boost = boost + self:getStatByType(stat, category)
boost = boost + self:getEquipStatByType(stat, category)
end
end
return boost
end
function CharacterEquip:getStatByType(stat, category)
function CharacterEquip:getEquipStatByType(stat, category)
if (not utils.string.isEmpty(self.equip[category])) then
local data = core.datas:get("items", self.equip[category])
local boost = data.statsBoost[stat] or 0