0){ for ($i=1;$i<=count($meta);$i++){ if ($exp >= $meta[count($meta)]['total_exp']){ $exp = min($exp, $meta[count($meta)]['total_exp']); $lv = $meta[count($meta)]['id']; }else{ if ($i= $meta[$i]['total_exp'] && $exp < $meta[$i+1]['total_exp']) { $lv = $meta[$i]['id']; } } } } } } public static function getCurrentSeason(){ foreach (self::getMetaCommon() as $meta) { if (myself()->_getNowTime() >= strtotime($meta['begin_time']) && myself()->_getNowTime() <= strtotime($meta['end_time'])) { return $meta; } } return null; } protected static function getMetaList() { if (!self::$metaList) { self::$metaList = getMetaTable('Battlepass@Battlepass.php'); } return self::$metaList; } protected static function getMetaCommon() { if (!self::$metaCommon) { self::$metaCommon = getMetaTable('BattlepassCommon@BattlepassCommon.php'); } return self::$metaCommon; } protected static $metaList; protected static $metaCommon; }