<?php

namespace loyalsoft;

include __DIR__ . '/main.php';
echoLine("phpver: " . PHP_VERSION . PHP_EOL);

//SelfChecker::CheckAll();
//
//set_time_limit(15);                                                           # 设置执行超时时间
//
//
//var_dump(TimeUtil::Hour());
//
//var_dump(date('YmdH'));
$arr = (array) GameConfig::item_weapon();
var_dump($arr);
uksort($arr, function ($a, $b) {
    return intval($a) < intval($b);
});
//var_dump($arr);
$wp = null;
$hero_typeId = 101005;
foreach ($arr as $id => $mo) {
//            isEditor() and $mo = new \sm_item_weapon();
    $heroList = explode(',', $mo->hero_id);
    foreach ($heroList as $hero_id) {
        if ($hero_id == $hero_typeId) {
            $wp = $mo;
            break;
        }
    }
}
var_dump($wp);
