game2006api/webapp/mt/GunTalent.php
aozhiwei b24d06e00e 1
2021-12-01 15:45:20 +08:00

34 lines
638 B
PHP

<?php
namespace mt;
use phpcommon;
class GunTalent {
public static function get($id)
{
return getXVal(self::getMetaList(), $id, null);
}
public static function isValidTalent($meta, $talentId)
{
if (empty($talentId)) {
return false;
}
$strArr = explode("|", $meta["talent_list"]);
return in_array($talentId, $strArr);
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('gunTalent@gunTalent.php');
}
return self::$metaList;
}
protected static $metaList;
}