fix: 천하통일 후에는 유산 포인트 사용 방지

This commit is contained in:
2022-07-27 21:54:49 +09:00
parent 4e2193fe6f
commit b9cda08a4e
5 changed files with 21 additions and 0 deletions
@@ -50,6 +50,10 @@ class ResetTurnTime extends \sammo\BaseAPI
$reqPoint = GameConst::$inheritResetAttrPointBase[$nextLevel];
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if($gameStor->isunited){
return '이미 천하가 통일되었습니다.';
}
$inheritStor = KVStorage::getStorage($db, "inheritance_{$userID}");
$previousPoint = ($inheritStor->getValue('previous') ?? [0, 0])[0];
if ($previousPoint < $reqPoint) {