Skip to content

fix: validate amount before removing value from players bank#122

Draft
jpaulooliveira wants to merge 1 commit into
zimbadev:mainfrom
jpaulooliveira:validation-remove-money-npc
Draft

fix: validate amount before removing value from players bank#122
jpaulooliveira wants to merge 1 commit into
zimbadev:mainfrom
jpaulooliveira:validation-remove-money-npc

Conversation

@jpaulooliveira
Copy link
Copy Markdown
Collaborator

Added a validation function (validRemoveMoney) to ensure the value being removed is valid before completing the transaction.

This fixes a bug where players could buy items from NPCs without sufficient funds. The issue appears to stem from a mismatch in total value calculation in the NPC trade window, allowing purchases without the required money.

The original removeMoney logic was copied and adjusted in validRemoveMoney to properly validate the transaction beforehand.

433494444-6e65fce0-4cdc-4d99-83fe-6423a33c1f18 (1)

@jprzimba jprzimba changed the title fix: validate amount before removing value from players bank [fix] validate amount before removing value from players bank Apr 15, 2025
@jprzimba jprzimba changed the title [fix] validate amount before removing value from players bank fix: validate amount before removing value from players bank Apr 16, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale label May 17, 2025
@jprzimba jprzimba marked this pull request as draft June 29, 2025 02:49
@github-actions github-actions Bot removed the Stale label Jun 29, 2025
@zimbadev zimbadev deleted a comment from sonarqubecloud Bot Jul 20, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant