<?php

namespace Tool\LoadTemplate\Logic;

use Game\Constant\ConstTemplate\TemplateLevel;
use Tool\LoadTemplate\ILogic;

class LevelLogic extends ILogic
{
    /**
     * @param $row
     * @return bool
     * 需要字段转为int
     */
    public function dealRow(&$row): bool
    {
        $row[TemplateLevel::LevelId] = (int)$row[TemplateLevel::LevelId];
        $row[TemplateLevel::BpMin] = (int)$row[TemplateLevel::BpMin];
        $row[TemplateLevel::BpMax] = (int)$row[TemplateLevel::BpMax];
        $row[TemplateLevel::LevelGrade] = (int)$row[TemplateLevel::LevelGrade];
        $row[TemplateLevel::ResetLevel] = (int)$row[TemplateLevel::ResetLevel];
        $row[TemplateLevel::Num] = (int)$row[TemplateLevel::Num];
        $row[TemplateLevel::Weight] = (int)$row[TemplateLevel::Weight];
        return true;
    }
}
