Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xrGame: fix ability to get a negative money balance after paid service #1204

Closed
wants to merge 3 commits into from

Conversation

Vlad2001MFS
Copy link
Contributor

Why:
Money was checked when player press to a some question in dialog. If player by buy something at this moment, then your money state will be changed, but a condition for a service dialog wil not be rechecked.

How:
Just reset a talk dialog state to initial when player press to a trade button.

Issue: #1173

Why:
Money was checked when player press to a some question in dialog. If player by buy something at this moment, then your money state will be changed, but a condition for a service dialog wil not be rechecked.

How:
Just reset a talk dialog state to initial when player press to a trade button.

Issue: OpenXRay#1173
@Xottab-DUTY Xottab-DUTY added the Vanilla Bug The original game issue. label Jan 4, 2023
@Xottab-DUTY Xottab-DUTY linked an issue Mar 31, 2023 that may be closed by this pull request
@github-actions github-actions bot added the UI label Mar 31, 2023
@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Mar 31, 2023

From what I can guess, this can potentially cause more problems with broken dialog lines: you selected some phrase which triggered a dialog line, then switched to trade – now that line is broken: not all phrases finished, but you can't restart it again.
That's a corner case probably, but still can be a case.

We need to recheck if this approach can cause such problems or existing dialog system won't allow that and we can merge this.

For now, I think we need to improve money system itself – make it more hardened, prevent situations when money balance can turn negative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Negative money balance after paid service
2 participants