From 1026e93ce364e79bf946a61d3bd1fa2cf29b11c2 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Thu, 19 Dec 2024 08:58:26 -0600 Subject: [PATCH] Fix item buy error --- src/actions/towns.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/towns.php b/src/actions/towns.php index 9e80384..960f9d4 100644 --- a/src/actions/towns.php +++ b/src/actions/towns.php @@ -214,9 +214,9 @@ function buy(int $id) $toChange = $special[0]; $changeAmount = $index === 0 ? $special[1] : -$special[1]; - user()[$toChange] += $changeAmount; + user()->$toChange += $changeAmount; $specialFields[] = "$toChange = ?"; - $specialValues[] = user()[$toChange]; + $specialValues[] = user()->$toChange; // Adjust attack or defense power if ($toChange == "strength" || $toChange == "dexterity") {