fix: 최대 임관년도 수 계산 버그

This commit is contained in:
2022-10-04 01:07:11 +09:00
parent 32dd3ff43f
commit 82cdaa433e
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1828,7 +1828,7 @@ function deleteNation(General $lord, bool $applyDB): array
InheritanceKey::max_belong->value, InheritanceKey::max_belong->value,
max( max(
$general->getVar('belong'), $general->getVar('belong'),
$general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 ($general->getInheritancePoint(InheritanceKey::max_belong) ?? 0) / 10
) )
); );
} }
@@ -184,7 +184,7 @@ class che_등용수락 extends Command\GeneralCommand{
InheritanceKey::max_belong->value, InheritanceKey::max_belong->value,
max( max(
$general->getVar('belong'), $general->getVar('belong'),
$general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 ($general->getInheritancePoint(InheritanceKey::max_belong) ?? 0) / 10
) )
); );
} }
+1 -1
View File
@@ -118,7 +118,7 @@ class che_하야 extends Command\GeneralCommand{
InheritanceKey::max_belong->value, InheritanceKey::max_belong->value,
max( max(
$general->getVar('belong'), $general->getVar('belong'),
$general->getInheritancePoint(InheritanceKey::max_belong) ?? 0 ($general->getInheritancePoint(InheritanceKey::max_belong) ?? 0) / 10
) )
); );
} }
+5 -5
View File
@@ -172,7 +172,7 @@ class InheritancePointManager
break; break;
case InheritanceKey::max_belong: case InheritanceKey::max_belong:
$extractFn = function () use ($general, $multiplier) { $extractFn = function () use ($general, $multiplier) {
$maxBelong = max($general->getVar('belong'), $general->getAuxVar(InheritanceKey::max_belong->value) ?? 0); $maxBelong = max($general->getVar('belong'), ($general->getAuxVar(InheritanceKey::max_belong->value) ?? 0) / 10);
return [$maxBelong * $multiplier, null]; return [$maxBelong * $multiplier, null];
}; };
break; break;
@@ -362,15 +362,15 @@ class InheritancePointManager
/** @var InheritancePointType */ /** @var InheritancePointType */
$keyTypeObj = $this->inheritanceKey->get($key); $keyTypeObj = $this->inheritanceKey->get($key);
if($isRebirth){ if ($isRebirth) {
if($keyTypeObj->rebirthStoreCoeff === null){ if ($keyTypeObj->rebirthStoreCoeff === null) {
$keepValues[$rKey] = [$value, $auxV]; $keepValues[$rKey] = [$value, $auxV];
continue; continue;
} }
$value *= $keyTypeObj->rebirthStoreCoeff; $value *= $keyTypeObj->rebirthStoreCoeff;
} }
$keyText = $this->getInheritancePointType($key)->info; $keyText = $this->getInheritancePointType($key)->info;
$userLogger->push("{$keyText} 포인트 {$value} 증가", "inheritPoint"); $userLogger->push("{$keyText} 포인트 {$value} 증가", "inheritPoint");
$totalPoint += $value; $totalPoint += $value;
@@ -381,7 +381,7 @@ class InheritancePointManager
$inheritStor->resetValues(); $inheritStor->resetValues();
foreach($keepValues as $rKey => $pointPair){ foreach ($keepValues as $rKey => $pointPair) {
$inheritStor->setValue($rKey, $pointPair); $inheritStor->setValue($rKey, $pointPair);
} }
$inheritStor->setValue(InheritanceKey::previous->value, [$totalPoint, null]); $inheritStor->setValue(InheritanceKey::previous->value, [$totalPoint, null]);