From f7dc1a588b7451775f7e31014f5089527eb0ae37 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 18 Apr 2018 09:24:10 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8A=A5=EB=A0=A5=EC=B9=98=20=EB=B0=9B?= =?UTF-8?q?=EC=95=84=EC=98=AC=20=EB=95=8C=20general=EC=9D=B4=20NULL?= =?UTF-8?q?=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=EB=8F=84=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_process.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hwe/func_process.php b/hwe/func_process.php index 2db914c5..789612a7 100644 --- a/hwe/func_process.php +++ b/hwe/func_process.php @@ -13,6 +13,9 @@ namespace sammo; * @return int|float 계산된 능력치 */ function getGeneralLeadership(&$general, $withInjury, $withItem, $withStatAdjust, $useFloor = true){ + if($general === null){ + return 0; + } $leadership = $general['leader']; if($withInjury){ $leadership *= (100 - $general['injury']) / 100; @@ -47,6 +50,9 @@ function getGeneralLeadership(&$general, $withInjury, $withItem, $withStatAdjust * @return int|float 계산된 능력치 */ function getGeneralPower(&$general, $withInjury, $withItem, $withStatAdjust, $useFloor = true){ + if($general === null){ + return 0; + } $power = $general['power']; if($withInjury){ $power *= (100 - $general['injury']) / 100; @@ -78,6 +84,10 @@ function getGeneralPower(&$general, $withInjury, $withItem, $withStatAdjust, $us * @return int|float 계산된 능력치 */ function getGeneralIntel(&$general, $withInjury, $withItem, $withStatAdjust, $useFloor = true){ + if($general === null){ + return 0; + } + $intel = $general['intel']; if($withInjury){ $intel *= (100 - $general['injury']) / 100;