game2006api/webapp/mt/KillReward.php
aozhiwei 8107c257eb 1
2022-05-06 10:27:58 +08:00

37 lines
728 B
PHP

<?php
namespace mt;
use phpcommon;
class KillReward {
public static function get($kill)
{
self::mustBeHash();
return getXVal(self::$killHash, $kill);
}
protected static function mustBeHash()
{
if (is_null(self::$killHash)) {
self::$killHash = array();
foreach (self::getMetaList() as $meta) {
self::$killHash[$meta['kill_num']] = $meta;
}
}
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('killReward@killReward.php');
}
return self::$metaList;
}
protected static $metaList;
protected static $killHash;
}