game2006api/webapp/mt/GunTalent.php
2021-11-22 10:31:32 +08:00

31 lines
600 B
PHP

<?php
namespace mt;
use phpcommon;
class GunTalent {
public static function get($id)
{
return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null;
}
public static function isValidTalent($meta, $talentId)
{
$strArr = explode("|", $meta["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;
}