game2006api/webapp/mt/Skill.php
hujiabin 98152ae74a 1
2023-07-04 11:34:55 +08:00

46 lines
944 B
PHP

<?php
namespace mt;
require_once('mt/Skill.php');
use phpcommon;
class Skill {
const DEFAULT_SKILL = 10401;
public static function get($id)
{
return getXVal(self::getMetaList(), $id);
}
public static function getDefSkill(){
if (Parameter::getVal("hero_summoner_skill",'')){
return Parameter::getVal("hero_summoner_skill",'');
}else{
return self::DEFAULT_SKILL;
}
}
public static function getPresetSkill()
{
$list = array();
foreach (self::getMetaList() as $value){
if ($value['skill_id'] < 20000){
array_push($list,$value);
}
}
return $list;
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('skill@skill.php');
}
return self::$metaList;
}
protected static $metaList;
}