Qbox-project / qbx_core

http://qbox-project.github.io
Other
45 stars 109 forks source link

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

Closed solareon closed 1 week ago

solareon commented 3 weeks ago

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

solareon commented 3 weeks ago

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)