랜임 모드 버그 수정
This commit is contained in:
@@ -106,10 +106,10 @@ function getTurn(array $general, $type, $font=1) {
|
||||
$double = $command[1];
|
||||
|
||||
if($double == 98){
|
||||
$nationName = '(랜덤국가)';
|
||||
$nationName = '건국된 임의 국가';
|
||||
}
|
||||
else if($double == 99){
|
||||
$nationName = '[랜덤국가]';
|
||||
$nationName = '임의의 국가';
|
||||
}
|
||||
else{
|
||||
$nationName = getNationStaticInfo($double)['name']??'?!?!';
|
||||
|
||||
@@ -134,7 +134,7 @@ function process_25(&$general) {
|
||||
$allGen = array_sum($generals);
|
||||
|
||||
$genLimit = GameConst::$defaultMaxGeneral;
|
||||
if($admin['join_mode'] == 'onlyRandom' && $admin['init_year'] == $admin['year'] && $admin['init_month'] + 1 <= $admin['month']){
|
||||
if($admin['join_mode'] == 'onlyRandom' && $admin['init_year'] == $admin['year'] && in_array($admin['month'], [$admin['init_month'], ($admin['init_month'] + 1) %12])){
|
||||
$genLimit = GameConst::$initialNationGenLimitForRandInit;
|
||||
}
|
||||
else if($admin['year'] < $admin['startyear'] + 3){
|
||||
@@ -167,6 +167,9 @@ function process_25(&$general) {
|
||||
if($randVals){
|
||||
$nation = $nations[Util::choiceRandomUsingWeight($randVals)];
|
||||
}
|
||||
else{
|
||||
$nation = null;
|
||||
}
|
||||
|
||||
} else {
|
||||
$nation = $db->queryFirstRow('SELECT `name`,nation,scout,`level` FROM nation WHERE nation=%i', $where);
|
||||
|
||||
+2
-2
@@ -159,8 +159,8 @@ if($session->userGrade < 5 && !$allowReset){
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="join_mode" value="full" checked>일반
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="join_mode" value="onlyRandom" checked>랜덤 임관
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="join_mode" value="onlyRandom">랜덤 임관
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,6 @@ $v->rule('required', [
|
||||
'scenario',
|
||||
'fiction',
|
||||
'extend',
|
||||
'join_mode',
|
||||
'npcmode',
|
||||
'show_img_level',
|
||||
'tournament_trig',
|
||||
|
||||
+1
-1
@@ -155,7 +155,7 @@ function formSetup(){
|
||||
show_img_level:$('#show_img_level input:radio:checked').val(),
|
||||
tournament_trig:$('#tournament_trig input:radio:checked').val(),
|
||||
reserve_open:$('#reserve_open').val(),
|
||||
join_mode:$('#join_mode').val(),
|
||||
join_mode:$('#join_mode input:radio:checked').val(),
|
||||
}
|
||||
}).then(function(result){
|
||||
var deferred = $.Deferred();
|
||||
|
||||
+1
-1
@@ -746,7 +746,7 @@ function command_25($turn, $command) {
|
||||
|
||||
</select>
|
||||
<input type=submit value=임관>
|
||||
<input type=hidden name=command value=$command>";
|
||||
<input type=hidden name=command value=<?=$command?>>
|
||||
<?php foreach(range(0, count(turn) - 1) as $i): ?>
|
||||
<input type=hidden name=turn[] value=<?=$turn[$i]?>>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -63,4 +63,18 @@ class TimeUtil
|
||||
{
|
||||
return date('H:i:s', strtotime('00:00:00') + $second);
|
||||
}
|
||||
|
||||
/**
|
||||
* $year년, $month월 부터 $afterMonth 개월 이내인지. $afterMonth 포함.
|
||||
*
|
||||
*/
|
||||
public static function IsRangeMonth(int $baseYear, int $baseMonth, int $askYear, int $askMonth, int $afterMonth):bool{
|
||||
if($month < 1 || $month > 12){
|
||||
throw new \InvalidArgumentException('개월이 올바르지 않음');
|
||||
}
|
||||
if($afterMonth < 0){
|
||||
throw new \InvalidArgumentException('기간이 올바르지 않음');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user