local UnitResultReportCell = class("UnitResultReportCell", BaseCell)

function UnitResultReportCell:refresh(info, maxValue)
    if maxValue <= 0 then
        maxValue = 1
    end
    local uiMap = self:getUIMap()
    local icon = ModuleManager.HeroManager:getHeroIcon(info.heroId)
    if icon then
        uiMap["unit_result_report_cell.icon"]:setSprite(GConst.ATLAS_PATH.ICON_HERO, icon)
    end
    local smallFrame = ModuleManager.HeroManager:getHeroSmallFrame(info.heroId)
    if smallFrame then
        uiMap["unit_result_report_cell.frame"]:setSprite(GConst.ATLAS_PATH.ICON_HERO, smallFrame)
    end
    uiMap["unit_result_report_cell.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = info.dmg / maxValue
    uiMap["unit_result_report_cell.value"]:setText(GFunc.num2Str(info.dmg))
end

return UnitResultReportCell