34 lines
638 B
PHP
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;
|
|
|
|
}
|