are you sure its not just displaying the gold icon sprite? because the visual is handled in the client side. and i believe there is also a check in the client that checks if current account gold balance is less than gold cost to return false and apply "not enough gold" frame, but the server side is what handles what is actually deducted and how much
set your fame to 1,500 and your gold to 1,500 as well, buy a char slot (they are 1,000, right? sure lets go with that), if your fame gets deducted even though the gold icon is still there, then the server side editing you done is correct, and you just need to change the client visuals and edit the check that checks if gold is less than the slot cost
but if your gold is deducted rather than your fame, then yes, the server editing was done wrong
note: not deca client