game2006api/webapp/mt/SkillCommon.php
2022-09-01 14:42:19 +08:00

38 lines
809 B
PHP

<?php
namespace mt;
use phpcommon;
class SkillCommon {
protected static $metaList;
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('skillCommon@skillCommon.php');
}
return self::$metaList;
}
public static function get($id)
{
// return self::getMetaList();
return getXVal(self::getMetaList(), $id);
}
public static function getAttrBySkillCommon($id){
$mateOne = self::get($id);
if ($mateOne['skill_level']>0){
return [
'attr_id' => $mateOne['attr_id'],
'type' => $mateOne['attr_add_type'],
'val' => $mateOne['attr_number']
];
}else{
return [];
}
}
}