fix: 천하통일 후에는 유산 포인트 사용 방지
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user