game2006api/webapp/mt/KillReward.php
aozhiwei 1d78165d86 1
2022-04-05 15:07:50 +08:00

37 lines
728 B
PHP

<?php
namespace mt;
use phpcommon;
class KillReward {
public static function get($kill)
{
self::msutBeHash();
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;
}