Fix item buy error
This commit is contained in:
parent
e094bb86cd
commit
1026e93ce3
|
@ -214,9 +214,9 @@ function buy(int $id)
|
||||||
$toChange = $special[0];
|
$toChange = $special[0];
|
||||||
$changeAmount = $index === 0 ? $special[1] : -$special[1];
|
$changeAmount = $index === 0 ? $special[1] : -$special[1];
|
||||||
|
|
||||||
user()[$toChange] += $changeAmount;
|
user()->$toChange += $changeAmount;
|
||||||
$specialFields[] = "$toChange = ?";
|
$specialFields[] = "$toChange = ?";
|
||||||
$specialValues[] = user()[$toChange];
|
$specialValues[] = user()->$toChange;
|
||||||
|
|
||||||
// Adjust attack or defense power
|
// Adjust attack or defense power
|
||||||
if ($toChange == "strength" || $toChange == "dexterity") {
|
if ($toChange == "strength" || $toChange == "dexterity") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user