refac: General 객체 생성을 GeneralQueryMode를 활용

- 기존 $constructMode
- 버그 있음..?
This commit is contained in:
2023-07-07 18:39:23 +00:00
parent b4f197b7d8
commit ee3d84d7b0
36 changed files with 110 additions and 63 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ namespace sammo\Event\Action;
use sammo\ActionLogger;
use sammo\CityConst;
use sammo\DB;
use sammo\Enums\GeneralQueryMode;
use sammo\Enums\InheritanceKey;
use sammo\GameConst;
use sammo\General;
@@ -139,7 +140,7 @@ class UpdateNationLevel extends \sammo\Event\Action
$nation['nation'],
$targetKillTurn
);
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc', 'aux'], 2);
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc', 'aux']);
$chiefID = null;
$uniqueLotteryWeightList = [];
@@ -214,7 +215,7 @@ class UpdateNationLevel extends \sammo\Event\Action
}
if ($chiefID) {
$chiefObj = General::createGeneralObjFromDB($chiefID, ['belong', 'npc', 'aux'], 2);
$chiefObj = General::createGeneralObjFromDB($chiefID, ['belong', 'npc', 'aux'], GeneralQueryMode::Lite);
$chiefObj->increaseInheritancePoint(InheritanceKey::unifier, 250 * $levelDiff);
$chiefObj->applyDB($db);
}