From f233e8241e9253498ceb05811a2c436bed5cb4cb Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 8 Jul 2023 02:10:22 +0000 Subject: [PATCH] =?UTF-8?q?Merge=20pull=20request=20'feat,refac:=20General?= =?UTF-8?q?=20=ED=85=8C=EC=9D=B4=EB=B8=94=EC=9D=98=20=EB=B2=8C=EC=A0=90(?= =?UTF-8?q?=EA=B0=B1=EC=8B=A0)=20=ED=95=AD=EB=AA=A9=EC=9D=84=20=EB=B3=84?= =?UTF-8?q?=EB=8F=84=20=ED=85=8C=EC=9D=B4=EB=B8=94=EB=A1=9C=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC'=20(#232)=20from=20general=5Faccess=5Flog=20into=20de?= =?UTF-8?q?vel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Betting.php | 2 +- hwe/sammo/Command/General/che_등용.php | 2 +- hwe/sammo/Command/General/che_선양.php | 2 +- hwe/sammo/Command/General/che_장수대상임관.php | 2 +- hwe/sammo/DiplomaticMessage.php | 6 +++--- hwe/sammo/Enums/GeneralQueryMode.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hwe/sammo/Betting.php b/hwe/sammo/Betting.php index 52e19192..2c6604d2 100644 --- a/hwe/sammo/Betting.php +++ b/hwe/sammo/Betting.php @@ -402,7 +402,7 @@ class Betting $userLogger->flush(); } } else { - $generalList = General::createGeneralObjListFromDB(array_unique(Util::squeezeFromArray($rewardList, 'generalID')), ['gold', 'npc', 'betgold'], GeneralQueryMode::Core); + $generalList = General::createGeneralObjListFromDB(array_unique(Util::squeezeFromArray($rewardList, 'generalID')), ['gold', 'npc', 'betgold'], GeneralQueryMode::Lite); foreach ($rewardList as $rewardItem) { $gambler = $generalList[$rewardItem['generalID']]; $reward = Util::round($rewardItem['amount']); diff --git a/hwe/sammo/Command/General/che_등용.php b/hwe/sammo/Command/General/che_등용.php index be224275..0b4b035e 100644 --- a/hwe/sammo/Command/General/che_등용.php +++ b/hwe/sammo/Command/General/che_등용.php @@ -77,7 +77,7 @@ class che_등용 extends Command\GeneralCommand protected function initWithArg() { - $destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['nation', 'experience', 'dedication'], GeneralQueryMode::Core); + $destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['nation', 'experience', 'dedication'], GeneralQueryMode::Lite); $this->setDestGeneral($destGeneral); [$reqGold, $reqRice] = $this->getCost(); diff --git a/hwe/sammo/Command/General/che_선양.php b/hwe/sammo/Command/General/che_선양.php index 24e4a95d..23be46a6 100644 --- a/hwe/sammo/Command/General/che_선양.php +++ b/hwe/sammo/Command/General/che_선양.php @@ -66,7 +66,7 @@ class che_선양 extends Command\GeneralCommand protected function initWithArg() { - $destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['gold', 'nation'], GeneralQueryMode::Core); + $destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['gold', 'nation'], GeneralQueryMode::Lite); $this->setDestGeneral($destGeneral); $this->fullConditionConstraints = [ diff --git a/hwe/sammo/Command/General/che_장수대상임관.php b/hwe/sammo/Command/General/che_장수대상임관.php index ba486e23..70bd734b 100644 --- a/hwe/sammo/Command/General/che_장수대상임관.php +++ b/hwe/sammo/Command/General/che_장수대상임관.php @@ -84,7 +84,7 @@ class che_장수대상임관 extends Command\GeneralCommand{ protected function initWithArg() { $destGeneralID = $this->arg['destGeneralID']; - $destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['nation'], GeneralQueryMode::Core); + $destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['nation'], GeneralQueryMode::Lite); $this->setDestGeneral($destGeneral); $this->setDestNation($this->destGeneralObj->getVar('nation'), ['gennum', 'scout']); diff --git a/hwe/sammo/DiplomaticMessage.php b/hwe/sammo/DiplomaticMessage.php index a57e2538..1df2c596 100644 --- a/hwe/sammo/DiplomaticMessage.php +++ b/hwe/sammo/DiplomaticMessage.php @@ -76,7 +76,7 @@ class DiplomaticMessage extends Message{ $gameStor = KVStorage::getStorage(DB::db(), 'game_env'); - $destGeneralObj = General::createGeneralObjFromDB($this->dest->generalID, ['picture', 'imgsvr', 'aux'], GeneralQueryMode::Core); + $destGeneralObj = General::createGeneralObjFromDB($this->dest->generalID, ['picture', 'imgsvr', 'aux'], GeneralQueryMode::Lite); $commandObj = buildNationCommandClass('che_불가침수락', $destGeneralObj, $gameStor->getAll(true), new LastTurn(), [ 'destNationID'=>$this->src->nationID, @@ -100,7 +100,7 @@ class DiplomaticMessage extends Message{ protected function cancelNA(){ $gameStor = KVStorage::getStorage(DB::db(), 'game_env'); - $destGeneralObj = General::createGeneralObjFromDB($this->dest->generalID, ['picture', 'imgsvr', 'aux'], GeneralQueryMode::Core); + $destGeneralObj = General::createGeneralObjFromDB($this->dest->generalID, ['picture', 'imgsvr', 'aux'], GeneralQueryMode::Lite); $commandObj = buildNationCommandClass('che_불가침파기수락', $destGeneralObj, $gameStor->getAll(true), new LastTurn(), [ 'destNationID'=>$this->src->nationID, @@ -122,7 +122,7 @@ class DiplomaticMessage extends Message{ protected function stopWar(){ $gameStor = KVStorage::getStorage(DB::db(), 'game_env'); - $destGeneralObj = General::createGeneralObjFromDB($this->dest->generalID, ['picture', 'imgsvr', 'aux'], GeneralQueryMode::Core); + $destGeneralObj = General::createGeneralObjFromDB($this->dest->generalID, ['picture', 'imgsvr', 'aux'], GeneralQueryMode::Lite); $commandObj = buildNationCommandClass('che_종전수락', $destGeneralObj, $gameStor->getAll(true), new LastTurn(), [ 'destNationID'=>$this->src->nationID, diff --git a/hwe/sammo/Enums/GeneralQueryMode.php b/hwe/sammo/Enums/GeneralQueryMode.php index 7c78117d..254e45d2 100644 --- a/hwe/sammo/Enums/GeneralQueryMode.php +++ b/hwe/sammo/Enums/GeneralQueryMode.php @@ -5,7 +5,7 @@ namespace sammo\Enums; // mergeQueryColumn, createGeneralObjListFromDB, createGeneralObjFromDB 호출시 column 특수 모드 지정 enum GeneralQueryMode: int { - /** 장수 식별을 위한 최소한의 정보 */ + /** 장수 식별을 위한 최소한의 정보, logger 초기화 없음 */ case Core = 0; /** 게임 내에서 필수 이벤트 처리를 위한 정보, iAction 제외 */ case Lite = 1;