fix: 하야, 망명 시 최대 임관 년수가 반영되지 않는 버그 수정

This commit is contained in:
2022-09-21 22:48:55 +09:00
parent 2f94a8a2ca
commit c89bd2f63f
3 changed files with 17 additions and 3 deletions
+3 -3
View File
@@ -1823,11 +1823,11 @@ function deleteNation(General $lord, bool $applyDB): array
// 전 장수 재야로
foreach ($nationGeneralList as $general) {
$general->setAuxVar(
InheritanceKey::max_belong->value,
$general->setInheritancePoint(
InheritanceKey::max_belong,
max(
$general->getVar('belong'),
$general->getAuxVar(InheritanceKey::max_belong->value) ?? 0
$general->getInheritancePoint(InheritanceKey::max_belong) ?? 0
)
);
$general->setVar('belong', 0);
@@ -179,6 +179,13 @@ class che_등용수락 extends Command\GeneralCommand{
$db->update('nation', $setScoutNationValues, 'nation=%i', $destNationID);
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
$general->setInheritancePoint(
InheritanceKey::max_belong,
max(
$general->getVar('belong'),
$general->getInheritancePoint(InheritanceKey::max_belong) ?? 0
)
);
$general->setVar('permission', 'normal');
$general->setVar('belong', 1);
$general->setVar('officer_level', 1);
+7
View File
@@ -113,6 +113,13 @@ class che_하야 extends Command\GeneralCommand{
$general->setVar('troop', 0);
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
$general->setInheritancePoint(
InheritanceKey::max_belong,
max(
$general->getVar('belong'),
$general->getInheritancePoint(InheritanceKey::max_belong) ?? 0
)
);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();