game2006api/webapp/mt/PveGemini.php
hujiabin 5a3dbc6b28 1
2022-09-16 14:35:41 +08:00

44 lines
954 B
PHP

<?php
namespace mt;
use phpcommon;
class PveGemini {
const FIRST_INSTANCE_ID = 10001;
public static function get($id)
{
return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null;
}
public static function getAbleCombatMeta($id){
$arr = array();
if (!$id){
array_push($arr,self::FIRST_INSTANCE_ID);
}else{
foreach (self::getMetaList() as $value){
if ($value['gemini_id']<=$id){
array_push($arr,$value['gemini_id']);
}
}
if (self::get($id+1)){
array_push($arr,$id+1);
}
}
return $arr;
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('pveGemini@pveGemini.php');
}
return self::$metaList;
}
protected static $metaList;
}