inheritStore: 버프/디버프 구매 UI

This commit is contained in:
2021-09-15 23:49:20 +09:00
parent a10bb03fef
commit b84aeb71e0
9 changed files with 202 additions and 10 deletions
@@ -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;
}
}