From 9329ea16688038101fd77bbd0daa987c253f8353 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 17 Feb 2018 16:47:40 +0900 Subject: [PATCH] =?UTF-8?q?=ED=98=B8=ED=99=A9/=EC=9E=AC=EB=82=9C=EC=9D=98?= =?UTF-8?q?=20=EC=A6=9D=EA=B0=90=EC=9D=B4=20=ED=95=B4=EB=8B=B9=20=EB=8F=84?= =?UTF-8?q?=EC=8B=9C=EC=9D=98=20=EC=B9=98=EC=95=88=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=A5=B4=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_time_event.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/twe/func_time_event.php b/twe/func_time_event.php index faad4b5c..144f387c 100644 --- a/twe/func_time_event.php +++ b/twe/func_time_event.php @@ -551,8 +551,9 @@ function disaster($connect) { else { $ratio = 6 - round(1.0*$city['secu']/$city['secu2']*3); } // 3 ~ 6% if(rand()%100+1 < $ratio) { - $disastercity[count($disastercity)] = $city['city']; - $disasterratio[count($disastercity)] = 1.0 * $city['secu'] / $city['secu2']; + $idx = count($disastercity); + $disastercity[$idx] = $city['city']; + $disasterratio[$idx] = 1.0 * $city['secu'] / $city['secu2']; $disastername .= $city['name']." "; } }