31 lines
547 B
PHP
31 lines
547 B
PHP
<?php
|
|
|
|
namespace mt;
|
|
|
|
use phpcommon;
|
|
|
|
class Hero {
|
|
|
|
public static function get($id)
|
|
{
|
|
return getXVal(self::getMetaList(), $id);
|
|
}
|
|
|
|
public static function getDefaultSkin($meta)
|
|
{
|
|
$values = explode('|', $meta["skinlist"]);
|
|
return count($values) > 0 ? $values[0] : 0;
|
|
}
|
|
|
|
protected static function getMetaList()
|
|
{
|
|
if (!self::$metaList) {
|
|
self::$metaList = getMetaTable('player@player.php');
|
|
}
|
|
return self::$metaList;
|
|
}
|
|
|
|
protected static $metaList;
|
|
|
|
}
|