From 07035b5a1271fac7eb997cff2ca52907f967aa0d Mon Sep 17 00:00:00 2001 From: Hide_D Date: Thu, 27 Jul 2023 17:26:43 +0000 Subject: [PATCH] =?UTF-8?q?wip:=20=EA=B0=92=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/General.php | 5 ++++- hwe/sammo/GeneralLite.php | 12 ------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index 9d4a6ad8..d7643d88 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -478,8 +478,11 @@ class General extends GeneralLite implements iAction } } - function updateVar(string $key, $value) + function updateVar(string|\BackedEnum $key, $value) { + if($key instanceof \BackedEnum){ + $key = $key->value; + } if (($this->raw[$key] ?? null) === $value) { return; } diff --git a/hwe/sammo/GeneralLite.php b/hwe/sammo/GeneralLite.php index d692f75d..90bd1cb9 100644 --- a/hwe/sammo/GeneralLite.php +++ b/hwe/sammo/GeneralLite.php @@ -161,18 +161,6 @@ class GeneralLite return $this->getVar("dex{$armType}"); } - function updateVar(string $key, $value) - { - if (($this->raw[$key] ?? null) === $value) { - return; - } - if (!key_exists($key, $this->updatedVar)) { - $this->updatedVar[$key] = true; - } - $this->raw[$key] = $value; - } - - function getRankVar(RankColumn $key, $defaultValue = null): int { if (!$this->rankVarRead->hasKey($key)) {