inheritAction: 특정 전특 획득

This commit is contained in:
2021-09-15 03:09:57 +09:00
parent 4040260ef7
commit a10bb03fef
2 changed files with 23 additions and 8 deletions
@@ -35,7 +35,7 @@ class ResetSpecialWar extends \sammo\BaseAPI
$currentSpecialWar = $general->getVar('special2');
if($currentSpecialWar === null || $currentSpecialWar == 'None'){
if ($currentSpecialWar === null || $currentSpecialWar == 'None') {
return '이미 전투 특기가 공란입니다.';
}
@@ -55,6 +55,11 @@ class ResetSpecialWar extends \sammo\BaseAPI
return '충분한 유산 포인트를 가지고 있지 않습니다.';
}
$oldTypeKey = 'prev_types_special2';
$oldSpecialList = $general->getAuxVar($oldTypeKey) ?? [];
$oldSpecialList[] = $currentSpecialWar;
$general->setAuxVar($oldTypeKey, $oldSpecialList);
$general->setAuxVar('inheritResetSpecialWar', $nextLevel);
$general->setVar('special2', 'None');
$inheritStor->setValue('previous', $previousPoint - $reqPoint);