InheritAction: UI 턴 초기화, 전투 특기 초기화, 랜덤 유니크
- 턴 초기화에 버그가 있는듯?
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user