46 lines
944 B
PHP
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;
|
|
|
|
}
|