37 lines
728 B
PHP
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;
|
|
|
|
}
|