add Gems
Adds gems currency to the player's balance.
This method provides a safe way to modify player gems with automatic dirty tracking. Only modifies the gems and dirty flag if the amount is non-zero, avoiding unnecessary database operations.
Usage Examples:
playerData.addGems(10) // Adds 10 gems
playerData.addGems(-5) // Removes 5 gems
playerData.addGems(0) // No change, no dirty flag setContent copied to clipboard
Important Notes:
Does not perform balance validation (negative balances are possible)
Premium currency should have additional validation in calling code
Consider transaction logging for gem operations
Parameters
amount
The amount of gems to add (can be negative to subtract)