From b4062a593110250e7dc093a64a0343a1280adcfd Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 16 Sep 2021 03:03:20 +0900 Subject: [PATCH] fix: LazyVarUpdate unset --- hwe/sammo/API/InheritAction/BuyRandomUnique.php | 2 +- hwe/sammo/LazyVarUpdater.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hwe/sammo/API/InheritAction/BuyRandomUnique.php b/hwe/sammo/API/InheritAction/BuyRandomUnique.php index ffaba187..a0e56e97 100644 --- a/hwe/sammo/API/InheritAction/BuyRandomUnique.php +++ b/hwe/sammo/API/InheritAction/BuyRandomUnique.php @@ -39,7 +39,7 @@ class BuyRandomUnique extends \sammo\BaseAPI $db = DB::db(); $inheritStor = KVStorage::getStorage($db, "inheritance_{$userID}"); - $previousPoint = $inheritStor->getValue('previous')??0; + $previousPoint = ($inheritStor->getValue('previous')??[0, 0])[0]; if($previousPoint < GameConst::$inheritItemRandomPoint){ return '충분한 유산 포인트를 가지고 있지 않습니다.'; } diff --git a/hwe/sammo/LazyVarUpdater.php b/hwe/sammo/LazyVarUpdater.php index e4cfb283..8c460d42 100644 --- a/hwe/sammo/LazyVarUpdater.php +++ b/hwe/sammo/LazyVarUpdater.php @@ -10,7 +10,7 @@ trait LazyVarUpdater{ function getRaw(bool $extractAux=false):array{ if($extractAux){ $this->getAuxVar(''); - + } return $this->raw; } @@ -58,7 +58,7 @@ trait LazyVarUpdater{ } if($var === null){ - unset($this->auxVar[$key]); + unset($this->raw['auxVar'][$key]); $this->auxUpdated = true; return; }