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

This commit is contained in:
Hide_D committed 2022-07-27 21:54:49 +09:00
1 parent 4e2193fe6f
commit b9cda08a4e
5 files changed
+21

No files matched your search

@@ -67,6 +67,10 @@ class BuyHiddenBuff extends \sammo\BaseAPI
$reqAmount = GameConst::$inheritBuffPoints[$level] - GameConst::$inheritBuffPoints[$prevLevel];
$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 < $reqAmount) {
@@ -40,6 +40,10 @@ class BuyRandomUnique extends \sammo\BaseAPI
}
$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];
$reqAmount = GameConst::$inheritItemRandomPoint;
@@ -51,6 +51,11 @@ class ResetSpecialWar 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) {
@@ -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) {
@@ -65,6 +65,10 @@ class SetNextSpecialWar extends \sammo\BaseAPI
$reqAmount = GameConst::$inheritSpecificSpecialPoint;
$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 < $reqAmount) {