40 lines
765 B
PHP
40 lines
765 B
PHP
<?php
|
|
|
|
|
|
namespace mt;
|
|
|
|
|
|
class MapMode
|
|
{
|
|
const PRACTICE_MODE = 101;
|
|
const GOLD_MODE = 201;
|
|
const BET_MODE = 301;
|
|
const RANKING_MODE = 401;
|
|
const TREASURE_BOX_MODE = 501;
|
|
|
|
public static function find($id){
|
|
return getXVal(self::getMetaList(), $id);
|
|
}
|
|
|
|
public static function findByMapMode($modeId){
|
|
foreach (self::getMetaList() as $meta){
|
|
if ($meta['mapMode'] == $modeId){
|
|
return $meta;
|
|
}
|
|
}
|
|
return array();
|
|
}
|
|
|
|
|
|
|
|
protected static function getMetaList()
|
|
{
|
|
if (!self::$metaList) {
|
|
self::$metaList = getMetaTable('mapMode@mapMode.php');
|
|
}
|
|
return self::$metaList;
|
|
}
|
|
|
|
protected static $metaList;
|
|
|
|
} |