inheritStore: 버프/디버프 구매 UI
This commit is contained in:
@@ -65,15 +65,15 @@ class BuyHiddenBuff 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 '충분한 유산 포인트를 가지고 있지 않습니다.';
|
||||
}
|
||||
|
||||
$inheritBuffList[$type] = $level;
|
||||
$general->setAuxVar('inheritBuff', $inheritBuffList);
|
||||
$inheritStor->setValue('previous', $previousPoint - $reqAmount);
|
||||
$general->flushUpdateValues();
|
||||
$inheritStor->setValue('previous', [$previousPoint - $reqAmount, [$type, $level]]);
|
||||
$general->applyDB($db);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class BuyRandomUnique extends \sammo\BaseAPI
|
||||
|
||||
$general->setAuxVar('inheritRandomUnique', TimeUtil::now());
|
||||
$inheritStor->setValue('previous', $previousPoint - GameConst::$inheritItemRandomPoint);
|
||||
$general->flushUpdateValues();
|
||||
$general->applyDB($db);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class BuySpecificUnique extends \sammo\BaseAPI
|
||||
$general->setAuxVar('inheritUniqueTrial', $itemTrials);
|
||||
$inheritStor->setValue('previous', $previousPoint - $amount);
|
||||
$trialStor->setValue("u{$userID}", [$userID, $generalID, $amount]);
|
||||
$general->flushUpdateValues();
|
||||
$general->applyDB($db);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class ResetSpecialWar extends \sammo\BaseAPI
|
||||
$general->setAuxVar('inheritResetSpecialWar', $nextLevel);
|
||||
$general->setVar('special2', 'None');
|
||||
$inheritStor->setValue('previous', $previousPoint - $reqPoint);
|
||||
$general->flushUpdateValues();
|
||||
$general->applyDB($db);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class ResetTurnTime extends \sammo\BaseAPI
|
||||
$general->setVar('turntime', TimeUtil::format($turnTime, true));
|
||||
$general->setAuxVar('inheritResetTurnTime', $nextLevel);
|
||||
$inheritStor->setValue('previous', $previousPoint - $reqPoint);
|
||||
$general->flushUpdateValues();
|
||||
$general->applyDB($db);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class SetNextSpecialWar extends \sammo\BaseAPI
|
||||
|
||||
$general->setAuxVar('inheritSpecificSpecialWar', $type);
|
||||
$inheritStor->setValue('previous', $previousPoint - $reqAmount);
|
||||
$general->flushUpdateValues();
|
||||
$general->applyDB($db);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user