game2005api/webapp/mt/Drop.php
2021-11-22 10:41:52 +08:00

38 lines
778 B
PHP

<?php
namespace mt;
use phpcommon;
class Drop {
public static function get($id)
{
return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null;
}
public static function getOldDrop($id)
{
$meta = self::get($id);
return array(
'drop_id' => $meta['drop_id'],
'item_id' => $meta['item_id'],
'num' => $meta['num'],
'weight' => $meta['weight'],
'type' => $meta['type'],
'time' => $meta['time'],
);
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('drop@drop.php');
}
return self::$metaList;
}
protected static $metaList;
}