From e960446638ff0865de75523d48d9cd76dd81bea6 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Thu, 27 Jul 2023 17:03:19 +0000 Subject: [PATCH] =?UTF-8?q?wip:=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/b_currentCity.php | 3 +-- hwe/sammo/General.php | 16 ++++++++-------- hwe/sammo/GeneralLite.php | 6 +++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/hwe/b_currentCity.php b/hwe/b_currentCity.php index 7728a5fd..4762892c 100644 --- a/hwe/b_currentCity.php +++ b/hwe/b_currentCity.php @@ -327,8 +327,7 @@ $templates = new \League\Plates\Engine('templates'); if ($ourGeneral && !$isNPC) { $turnText = []; - $generalObj = new General($general, null, null, null, null, null, null, false); - foreach ($generalTurnList[$generalObj->getID()] as $turnRawIdx => $turn) { + foreach ($generalTurnList[$general['no']] as $turnRawIdx => $turn) { $turnIdx = $turnRawIdx + 1; $turnText[] = "{$turnIdx} : $turn"; } diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index ce9b2144..9d4a6ad8 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -15,14 +15,14 @@ class General extends GeneralLite implements iAction protected $rawCity = null; - /** @var Map */ + /** @var Map */ protected Map $rankVarRead; - /** @var Map */ + /** @var Map */ protected Map $rankVarIncrease; - /** @var Map */ + /** @var Map */ protected Map $rankVarSet; - /** @var Map */ + /** @var Map */ protected ?Map $accessLogRead; /** @var \sammo\ActionLogger */ @@ -59,8 +59,8 @@ class General extends GeneralLite implements iAction * @param null|Map $rawRank * @param null|Map $rawAccessLog * @param null|array $city DB city 테이블의 row값 - * @param int|null $year 게임 연도 - * @param int|null $month 게임 월 + * @param int $year 게임 연도 + * @param int $month 게임 월 */ public function __construct(array $raw, ?Map $rawRank, ?Map $rawAccessLog, ?array $city, ?array $nation, int $year, int $month) { @@ -931,7 +931,7 @@ class General extends GeneralLite implements iAction } if($queryMode < GeneralQueryMode::Full){ - throw new \InvalidArgumentException('충분하지 않은 queryMode:' . $queryMode); + throw new \InvalidArgumentException('충분하지 않은 queryMode:' . $queryMode->name); } $db = DB::db(); @@ -1013,7 +1013,7 @@ class General extends GeneralLite implements iAction static public function createGeneralObjFromDB(int $generalID, ?array $column = null, GeneralQueryMode $queryMode = GeneralQueryMode::Full): self { if($queryMode < GeneralQueryMode::Full){ - throw new \InvalidArgumentException('충분하지 않은 queryMode:' . $queryMode); + throw new \InvalidArgumentException('충분하지 않은 queryMode:' . $queryMode->name); } $db = DB::db(); diff --git a/hwe/sammo/GeneralLite.php b/hwe/sammo/GeneralLite.php index fda9136b..5c761890 100644 --- a/hwe/sammo/GeneralLite.php +++ b/hwe/sammo/GeneralLite.php @@ -274,7 +274,7 @@ class GeneralLite * @param ?int[] $generalIDList * @param null|array $column * @param GeneralQueryMode $queryMode - * @return \sammo\Generalite[] + * @return \sammo\GeneralLite[] * @throws MustNotBeReachedException */ static public function createGeneralLiteObjListFromDB(?array $generalIDList, ?array $column = null, GeneralQueryMode $queryMode = GeneralQueryMode::FullWithoutIAction): array @@ -284,7 +284,7 @@ class GeneralLite } if($queryMode > GeneralQueryMode::FullWithoutIAction){ - throw new \InvalidArgumentException('지원하지 않는 queryMode:' . $queryMode); + throw new \InvalidArgumentException('지원하지 않는 queryMode:' . $queryMode->name); } $db = DB::db(); @@ -371,7 +371,7 @@ class GeneralLite static public function createGeneralLiteObjFromDB(int $generalID, ?array $column = null, GeneralQueryMode $queryMode = GeneralQueryMode::FullWithoutIAction): self { if($queryMode > GeneralQueryMode::FullWithoutIAction){ - throw new \InvalidArgumentException('지원하지 않는 queryMode:' . $queryMode); + throw new \InvalidArgumentException('지원하지 않는 queryMode:' . $queryMode->name); } $db = DB::db();