From 564f0bc4077250f8bede3e2126cd1bea31464389 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 11 Aug 2021 01:02:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B2=9C=ED=86=B5=20=ED=9B=84=EC=97=90?= =?UTF-8?q?=EB=8F=84=20rank=20var=20=EB=93=B1=EC=9D=B4=20=EA=B0=B1?= =?UTF-8?q?=EC=8B=A0=EB=90=98=EB=8A=94=20=EA=B2=83=20=EC=B2=98=EB=9F=BC=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/General.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index e1e62739..a957a811 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -58,7 +58,7 @@ class General implements iAction{ 'snipe_combat'=>[true, 10, '병종 상성 우위 횟수'], 'combat'=>[['rank', 'warnum'], 5, '전투 횟수'], 'sabotage'=>[['rank', 'firenum'], 20, '계략 성공 횟수'], - 'unifier'=>[true, 1, '천통 수뇌'], + 'unifier'=>[true, 1, '천통 기여'], 'dex'=>[false, 0.001, '숙련도'], 'tournament'=>[true, 1, '토너먼트'], 'betting'=>[false, 10, '베팅 당첨'], @@ -1167,7 +1167,7 @@ class General implements iAction{ /** * @return int|float */ - public function getInheritancePoint(string $key, &$aux=null){ + public function getInheritancePoint(string $key, &$aux=null, bool $forceCalc=false){ $inheritType = static::INHERITANCE_KEY[$key]??null; if($inheritType === null){ throw new \OutOfRangeException("{$key}는 유산 타입이 아님"); @@ -1184,7 +1184,8 @@ class General implements iAction{ [$storeType, $multiplier, ] = $inheritType; - if($storeType === true){ + $gameStor = KVStorage::getStorage(DB::db(), 'game_env'); + if($storeType === true || ($gameStor->isunited != 0 && !$forceCalc)){ $inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$ownerID}"); [$value, $aux] = $inheritStor->getValue($key); return $value; @@ -1329,11 +1330,12 @@ class General implements iAction{ $inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$ownerID}"); $inheritStor->cacheAll(); foreach(static::INHERITANCE_KEY as $key=>[$storType, ,]){ - $point = $this->getInheritancePoint($key); + $aux = null; + $point = $this->getInheritancePoint($key, $aux, true); if($storType === true){ continue; } - $inheritStor->setValue($key, $point); + $inheritStor->setValue($key, [$point, $aux]); } $oldInheritStor = KVStorage::getStorage(DB::db(), "inheritance_result");