Fix item buy error

This commit is contained in:
Sky Johnson 2024-12-19 08:58:26 -06:00
parent e094bb86cd
commit 1026e93ce3

View File

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