refac: General create 함수명 변경

This commit is contained in:
2023-08-01 16:28:29 +00:00
parent 29273d7a8b
commit 55fca2337d
68 changed files with 87 additions and 89 deletions
+1 -5
View File
@@ -7,11 +7,7 @@ use \sammo\{
Util,
JosaUtil,
General,
DummyGeneral,
ActionLogger,
GameConst,
LastTurn,
GameUnitConst,
Command,
ScoutMessage
};
@@ -77,7 +73,7 @@ class che_등용 extends Command\GeneralCommand
protected function initWithArg()
{
$destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['nation', 'experience', 'dedication'], GeneralQueryMode::Lite);
$destGeneral = General::createObjFromDB($this->arg['destGeneralID']);
$this->setDestGeneral($destGeneral);
[$reqGold, $reqRice] = $this->getCost();
@@ -68,7 +68,7 @@ class che_등용수락 extends Command\GeneralCommand{
protected function initWithArg()
{
$destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], null);
$destGeneral = General::createObjFromDB($this->arg['destGeneralID'], null);
$this->setDestGeneral($destGeneral);
$this->setDestNation($this->arg['destNationID'], ['gennum', 'scout']);
@@ -67,7 +67,7 @@ class che_모반시도 extends Command\GeneralCommand{
$lordID = $db->queryFirstField('SELECT no FROM general WHERE nation = %i AND officer_level = 12', $nationID);
$lordGeneral = General::createGeneralObjFromDB($lordID);
$lordGeneral = General::createObjFromDB($lordID);
$generalName = $general->getName();
$lordName = $lordGeneral->getName();
+1 -1
View File
@@ -66,7 +66,7 @@ class che_선양 extends Command\GeneralCommand
protected function initWithArg()
{
$destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['gold', 'nation'], GeneralQueryMode::Lite);
$destGeneral = General::createObjFromDB($this->arg['destGeneralID'], ['gold', 'nation'], GeneralQueryMode::Lite);
$this->setDestGeneral($destGeneral);
$this->fullConditionConstraints = [
@@ -84,7 +84,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
protected function initWithArg()
{
$destGeneralID = $this->arg['destGeneralID'];
$destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['nation'], GeneralQueryMode::Lite);
$destGeneral = General::createObjFromDB($this->arg['destGeneralID'], ['nation'], GeneralQueryMode::Lite);
$this->setDestGeneral($destGeneral);
$this->setDestNation($this->destGeneralObj->getVar('nation'), ['gennum', 'scout']);
+1 -1
View File
@@ -87,7 +87,7 @@ class che_증여 extends Command\GeneralCommand
protected function initWithArg()
{
$destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], ['gold', 'rice', 'nation'], GeneralQueryMode::Lite);
$destGeneral = General::createObjFromDB($this->arg['destGeneralID'], ['gold', 'rice', 'nation'], GeneralQueryMode::Lite);
$this->setDestGeneral($destGeneral);
$this->fullConditionConstraints = [
+1 -1
View File
@@ -269,7 +269,7 @@ class che_화계 extends Command\GeneralCommand
$destCityGeneralList = [];
$cityGeneralID = $db->queryFirstColumn('SELECT no FROM general WHERE city = %i AND nation = %i', $destCityID, $destNationID);
$destCityGeneralList = General::createGeneralObjListFromDB($cityGeneralID, ['name', 'city', 'nation', 'officer_level', 'leadership', 'horse', 'strength', 'weapon', 'intel', 'book', 'item', 'last_turn', 'injury', 'special', 'special2', 'injury', 'crewtype', 'crew', 'atmos', 'train']);
$destCityGeneralList = General::createObjListFromDB($cityGeneralID, ['name', 'city', 'nation', 'officer_level', 'leadership', 'horse', 'strength', 'weapon', 'intel', 'book', 'item', 'last_turn', 'injury', 'special', 'special2', 'injury', 'crewtype', 'crew', 'atmos', 'train']);
foreach ($destCityGeneralList as &$destCityGeneral) {
$destCityGeneral->setRawCity($this->destCity);
unset($destCityGeneral);