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

refactor(server/player): improve money logging #483

Merged
merged 3 commits into from
Jun 24, 2024
Merged

Conversation

solareon
Copy link
Member

@solareon solareon commented Jun 8, 2024

Description

Logging money was lacking in fidelity with the current setup. This provides the ability to send tagged data to ox_lib which enables better parsing and analysis as well as clarifying the direction of change for the SetMoney function (usually triggered by ox_inventory money moves). Also adds the ability to know which resource triggered the add/remove/set money events so you can find that troublesome resource that is paying out too much.

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

Copy link
Member

@Manason Manason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ox_inventory will double log this as an item transfer right? Wondering if we should get rid of this logging here altogether and improve the ox_inventory item transfer logging instead.

server/player.lua Outdated Show resolved Hide resolved
server/player.lua Show resolved Hide resolved
@solareon
Copy link
Member Author

solareon commented Jun 8, 2024

ox_inventory will double log this as an item transfer right? Wondering if we should get rid of this logging here altogether and improve the ox_inventory item transfer logging instead.

Possibly depending on if you got the money from a swapSlot event or an addItem/removeItem event depending on your log level in ox_inventory (add/remove is only on level 2)

@solareon solareon merged commit abf7b7f into main Jun 24, 2024
4 checks passed
@solareon solareon deleted the setmoney-logs branch June 24, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants