[DiscordArchive] To which event?
[DiscordArchive] To which event?
Archived author: Honey • Posted: 2023-05-09T13:57:20.850000+00:00
Original source
That sounds like a decent approach if you control each and every Lua script. I don't see that ending well with code from multiple independent scripts though
Archived author: Foe • Posted: 2023-05-09T14:11:04.112000+00:00
Original source
You'd obviously have a return function per script, registered the same way as any other event registry
Archived author: Foe • Posted: 2023-05-09T14:11:55.672000+00:00
Original source
In essence it's the same thing as what you have now, but you'd do the registry of the return function on load and not define specific return functions on async query calls
Archived author: Foe • Posted: 2023-05-09T14:19:10.973000+00:00
Original source
All in all it's a massive performance improvement either way, especially when you start dealing with large queries and datasets. The main difference is how you deal with other logic that expects the data to be in place immediately
Archived author: Honey • Posted: 2023-05-09T14:34:40.286000+00:00
Original source
Most of the usage would be to load player related data at login. If the player manages to call a function which finds no data, a nil check prevents proceeding.
Try again in 2 seconds.
Archived author: Honey • Posted: 2023-05-09T14:36:05.531000+00:00
Original source
I can't judge the difference between a function per callback or one function handling all callbacks. Leaving that aside,it just seems like extra steps.
Archived author: Foe • Posted: 2023-05-09T14:48:56.478000+00:00
Original source
It's a preference thing really, I personally think it's cleaner to have one function that deals with one "function", not multiple functions dealing with, in essence, the same thing
Archived author: Foe • Posted: 2023-05-09T15:37:59.433000+00:00
Original source
Eluna::GEluna
Instead of this, you should use sEluna btw
Archived author: Foe • Posted: 2023-05-09T15:38:19.949000+00:00
Original source
That said, I'd probably move the whole template function into the ElunaQuery class
Archived author: Roboto • Posted: 2023-05-09T15:45:11.552000+00:00
Original source
Good catch, thanks!