diff --git a/hwe/sammo/AbsFromUserPool.php b/hwe/sammo/AbsFromUserPool.php index 65e7df39..344f6957 100644 --- a/hwe/sammo/AbsFromUserPool.php +++ b/hwe/sammo/AbsFromUserPool.php @@ -46,7 +46,7 @@ abstract class AbsFromUserPool extends AbsGeneralPool{ $gameStor = KVStorage::getStorage($db, 'game_env'); $result = []; - $validUntil = TimeUtil::nowAddMinutes(24 * $gameStor->turnterm); + $validUntil = TimeUtil::nowAddMinutes(2 * $gameStor->turnterm); while(count($result) < $pickCnt){ $cand = Util::choiceRandomUsingWeightPair($pool); $poolID = $cand['id']; diff --git a/hwe/sammo/Scenario/GeneralBuilder.php b/hwe/sammo/Scenario/GeneralBuilder.php index d0d9da4f..59856946 100644 --- a/hwe/sammo/Scenario/GeneralBuilder.php +++ b/hwe/sammo/Scenario/GeneralBuilder.php @@ -8,6 +8,7 @@ use \sammo\GameUnitConst; use \sammo\CityConst; use \sammo\GameConst; use \sammo\SpecialityHelper; +use sammo\TimeUtil; use function sammo\buildGeneralSpecialClass; @@ -692,7 +693,8 @@ class GeneralBuilder{ 'dex3'=>$this->dex3, 'dex4'=>$this->dex4, 'dex5'=>$this->dex5, - 'aux'=>\sammo\Json::encode($this->aux) + 'aux'=>\sammo\Json::encode($this->aux), + 'lastrefresh'=>TimeUtil::now(), ]); $this->generalID = $db->insertId(); $turnRows = [];