fix: 천통시 명장 일람에 유상포인트 최종 계산을 누락한 버그 수정

This commit is contained in:
2022-05-11 00:26:47 +09:00
parent 9aabe0442d
commit 8c11661fb4
+6 -1
View File
@@ -4,6 +4,7 @@ namespace sammo;
use Monolog\Logger;
use sammo\Enums\InheritanceKey;
use sammo\Enums\RankColumn;
/**
* 게임 룰에 해당하는 함수 모음
@@ -1024,12 +1025,16 @@ function checkEmperior()
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
$inheritPointManager = InheritancePointManager::getInstance();
foreach (General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc < 2')) as $genObj) {
$allUserGenerals = General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc < 2'));
foreach ($allUserGenerals as $genObj) {
if ($genObj->getNationID() == $nationID) {
if ($genObj->getVar('officer_level') > 4) {
$genObj->increaseInheritancePoint(InheritanceKey::unifier, 2000);
};
}
}
processSumInheritPointRank();
foreach ($allUserGenerals as $genObj) {
$inheritPointManager->mergeTotalInheritancePoint($genObj, true);
$inheritPointManager->applyInheritanceUser($genObj->getVar('owner'));
$inheritPointManager->clearInheritancePoint($genObj);