diff --git a/hwe/sammo/API/InheritAction/BuyRandomUnique.php b/hwe/sammo/API/InheritAction/BuyRandomUnique.php index 4f707346..6aaf56b4 100644 --- a/hwe/sammo/API/InheritAction/BuyRandomUnique.php +++ b/hwe/sammo/API/InheritAction/BuyRandomUnique.php @@ -45,7 +45,7 @@ class BuyRandomUnique extends \sammo\BaseAPI } $general->setAuxVar('inheritRandomUnique', TimeUtil::now()); - $inheritStor->setValue('previous', $previousPoint - GameConst::$inheritItemRandomPoint); + $inheritStor->setValue('previous', [$previousPoint - GameConst::$inheritItemRandomPoint, 'BuyRandomUnique']); $general->applyDB($db); return null; } diff --git a/hwe/sammo/API/InheritAction/BuySpecificUnique.php b/hwe/sammo/API/InheritAction/BuySpecificUnique.php index a91d24bb..ee355f5f 100644 --- a/hwe/sammo/API/InheritAction/BuySpecificUnique.php +++ b/hwe/sammo/API/InheritAction/BuySpecificUnique.php @@ -72,7 +72,7 @@ class BuySpecificUnique extends \sammo\BaseAPI $itemTrials[$itemKey] = $amount; $general->setAuxVar('inheritUniqueTrial', $itemTrials); - $inheritStor->setValue('previous', $previousPoint - $amount); + $inheritStor->setValue('previous', [$previousPoint - $amount, ['BuySpecificUnique', $itemKey, $amount]]); $trialStor->setValue("u{$userID}", [$userID, $generalID, $amount]); $general->applyDB($db); return null; diff --git a/hwe/sammo/API/InheritAction/ResetSpecialWar.php b/hwe/sammo/API/InheritAction/ResetSpecialWar.php index d2f2ef18..a22e6395 100644 --- a/hwe/sammo/API/InheritAction/ResetSpecialWar.php +++ b/hwe/sammo/API/InheritAction/ResetSpecialWar.php @@ -50,7 +50,7 @@ class ResetSpecialWar extends \sammo\BaseAPI $db = DB::db(); $inheritStor = KVStorage::getStorage($db, "inheritance_{$userID}"); - $previousPoint = $inheritStor->getValue('previous') ?? 0; + $previousPoint = ($inheritStor->getValue('previous') ?? [0, 0])[0]; if ($previousPoint < $reqPoint) { return '충분한 유산 포인트를 가지고 있지 않습니다.'; } @@ -62,7 +62,7 @@ class ResetSpecialWar extends \sammo\BaseAPI $general->setAuxVar('inheritResetSpecialWar', $nextLevel); $general->setVar('special2', 'None'); - $inheritStor->setValue('previous', $previousPoint - $reqPoint); + $inheritStor->setValue('previous', [$previousPoint - $reqPoint, 'ResetSpecialWar']); $general->applyDB($db); return null; } diff --git a/hwe/sammo/API/InheritAction/ResetTurnTime.php b/hwe/sammo/API/InheritAction/ResetTurnTime.php index 6c813b0d..b4120874 100644 --- a/hwe/sammo/API/InheritAction/ResetTurnTime.php +++ b/hwe/sammo/API/InheritAction/ResetTurnTime.php @@ -46,7 +46,7 @@ class ResetTurnTime extends \sammo\BaseAPI $db = DB::db(); $inheritStor = KVStorage::getStorage($db, "inheritance_{$userID}"); - $previousPoint = $inheritStor->getValue('previous') ?? 0; + $previousPoint = ($inheritStor->getValue('previous') ?? [0, 0])[0]; if ($previousPoint < $reqPoint) { return '충분한 유산 포인트를 가지고 있지 않습니다.'; } @@ -60,13 +60,13 @@ class ResetTurnTime extends \sammo\BaseAPI $afterTurn = Util::randRange($turnTerm * -60 / 2, $turnTerm * 60 / 2); $turnTime = $turnTime->add(TimeUtil::secondsToDateInterval($afterTurn)); - if($turnTime <= $serverTurnTimeObj){ + if ($turnTime <= $serverTurnTimeObj) { $turnTime = $turnTime->add(TimeUtil::secondsToDateInterval($turnTerm * 60)); } $general->setVar('turntime', TimeUtil::format($turnTime, true)); $general->setAuxVar('inheritResetTurnTime', $nextLevel); - $inheritStor->setValue('previous', $previousPoint - $reqPoint); + $inheritStor->setValue('previous', [$previousPoint - $reqPoint, 'ResetTurnTime']); $general->applyDB($db); return null; } diff --git a/hwe/sammo/API/InheritAction/SetNextSpecialWar.php b/hwe/sammo/API/InheritAction/SetNextSpecialWar.php index 9bd458de..195e50d8 100644 --- a/hwe/sammo/API/InheritAction/SetNextSpecialWar.php +++ b/hwe/sammo/API/InheritAction/SetNextSpecialWar.php @@ -54,7 +54,7 @@ class SetNextSpecialWar extends \sammo\BaseAPI return '이미 그 특기를 예약하였습니다.'; } - if($inheritSpecificSpecialWar !== null){ + if ($inheritSpecificSpecialWar !== null) { return '이미 예약한 특기가 있습니다.'; } @@ -62,13 +62,13 @@ class SetNextSpecialWar extends \sammo\BaseAPI $db = DB::db(); $inheritStor = KVStorage::getStorage($db, "inheritance_{$userID}"); - $previousPoint = $inheritStor->getValue('previous') ?? 0; + $previousPoint = ($inheritStor->getValue('previous') ?? [0, 0])[0]; if ($previousPoint < $reqAmount) { return '충분한 유산 포인트를 가지고 있지 않습니다.'; } $general->setAuxVar('inheritSpecificSpecialWar', $type); - $inheritStor->setValue('previous', $previousPoint - $reqAmount); + $inheritStor->setValue('previous', [$previousPoint - $reqAmount, ['SetNextSpecialWar', $type]]); $general->applyDB($db); return null; } diff --git a/hwe/ts/inheritPoint.vue b/hwe/ts/inheritPoint.vue index ea5ff200..7edba2bd 100644 --- a/hwe/ts/inheritPoint.vue +++ b/hwe/ts/inheritPoint.vue @@ -62,14 +62,16 @@