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)) {