-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Add new account events: onAccountCreate/onAccountRemove & new function getAccountType #3019
Add new account events: onAccountCreate/onAccountRemove & new function getAccountType #3019
Conversation
New events: - `onAccountCreate` - `onAccountRemove`
looks okey for me |
What kind of use case do you have for these two events? Also, assuming you've tested these events, can you even process the events for "console accounts" and does it even make sense to trigger that event for guest accounts? |
Well, we have some events for creation of elements (
Yes, sir. For guest accounts, its a debatable thing in my opinion. It may or may not be necessary to fire an event when someone joins but its better to have more than less. or maybe other event (onGuestAccountCreated) might be fired specifically for guest accounts? |
Probably not useful but its better to have that than to check if it belongs to console or to a guest
Added const qualifiers, reformatted everything in general
As you decided to refactor the existing code I would suggest to take a look at CRegistryResultCell. It stores nVal, fVal and pVal all the time but only one can be in use at one time. So its better to use union to save memory and promote true sharing while looping. |
I can understand having the even trigger for player accounts, but I don't see any value for console or guest accounts - that's just noise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its all good, in fact perfect.
This has had enough feedback and eyes, thanks! @TracerDS please add the 2 events and function to the wiki |
…to#3019) New events: onAccountCreate, onAccountRemove New function: getAccountType * Refactored CAccountManager & CAccount a little * Refactored internal SQL logic
New events:
onAccountCreate
(takes 1 parameter: account)onAccountRemove
(takes 1 parameter: account)New function:
getAccountType