From b9cda08a4ef0b88cd68413845510d61b93208a4c Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 27 Jul 2022 21:54:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B2=9C=ED=95=98=ED=86=B5=EC=9D=BC=20?= =?UTF-8?q?=ED=9B=84=EC=97=90=EB=8A=94=20=EC=9C=A0=EC=82=B0=20=ED=8F=AC?= =?UTF-8?q?=EC=9D=B8=ED=8A=B8=20=EC=82=AC=EC=9A=A9=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/API/InheritAction/BuyHiddenBuff.php | 4 ++++ hwe/sammo/API/InheritAction/BuyRandomUnique.php | 4 ++++ hwe/sammo/API/InheritAction/ResetSpecialWar.php | 5 +++++ hwe/sammo/API/InheritAction/ResetTurnTime.php | 4 ++++ hwe/sammo/API/InheritAction/SetNextSpecialWar.php | 4 ++++ 5 files changed, 21 insertions(+) diff --git a/hwe/sammo/API/InheritAction/BuyHiddenBuff.php b/hwe/sammo/API/InheritAction/BuyHiddenBuff.php index 2c0dd284..8aadee57 100644 --- a/hwe/sammo/API/InheritAction/BuyHiddenBuff.php +++ b/hwe/sammo/API/InheritAction/BuyHiddenBuff.php @@ -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) { diff --git a/hwe/sammo/API/InheritAction/BuyRandomUnique.php b/hwe/sammo/API/InheritAction/BuyRandomUnique.php index e8e77b66..6c134cd7 100644 --- a/hwe/sammo/API/InheritAction/BuyRandomUnique.php +++ b/hwe/sammo/API/InheritAction/BuyRandomUnique.php @@ -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; diff --git a/hwe/sammo/API/InheritAction/ResetSpecialWar.php b/hwe/sammo/API/InheritAction/ResetSpecialWar.php index 62bb6025..1aff877d 100644 --- a/hwe/sammo/API/InheritAction/ResetSpecialWar.php +++ b/hwe/sammo/API/InheritAction/ResetSpecialWar.php @@ -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) { diff --git a/hwe/sammo/API/InheritAction/ResetTurnTime.php b/hwe/sammo/API/InheritAction/ResetTurnTime.php index 479608a6..b0537bc6 100644 --- a/hwe/sammo/API/InheritAction/ResetTurnTime.php +++ b/hwe/sammo/API/InheritAction/ResetTurnTime.php @@ -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) { diff --git a/hwe/sammo/API/InheritAction/SetNextSpecialWar.php b/hwe/sammo/API/InheritAction/SetNextSpecialWar.php index 30a31e51..a865293d 100644 --- a/hwe/sammo/API/InheritAction/SetNextSpecialWar.php +++ b/hwe/sammo/API/InheritAction/SetNextSpecialWar.php @@ -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) {