-
Notifications
You must be signed in to change notification settings - Fork 16
game: add entity event registry and logout countdowns #402
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
base: main
Are you sure you want to change the base?
Conversation
c2bff74 to
19ec775
Compare
|
|
||
| internal static class SimpleBehaviourUtils | ||
| { | ||
| // located here as a workaround for readability - omitting qualifiers in main class |
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.
You can do a using static to do this: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive#the-static-modifier
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.
There is already a using static QuantumCore.Game.World.AI.SimpleBehaviourUtils.CombatEvent; at the top of the file, unless you're referring to a different approach? Ideally I would have nested the enum inside SimpleBehaviour but I couldn't lose the qualification that way.
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.
oh I was confused by the comment. You did lose the qualification didn't you? You can use these constants without the whole type name?
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.
Yes, because they are in a different class, if the enum is nested inside the same class I think you cannot
| if (spawnedEntity.Health > 0) | ||
| { | ||
| spawnedEntity.Die(); | ||
| spawnedEntity.TryScheduleKnockout(); |
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.
tbh I don't like how technical the new naming is. Die is way easier to understand than TryScheduleKnochout it implies knowing way more of the whole system. Think about a plugin dev touching c# for the first time?
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.
We could rename to a simple Knockout(), but this also returns a bool so more explicitly it would be TryKnockout(). I agree it's not very clear what it does, honestly I don't fully understand why the game even implemented this "feature" in the first place.
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.
What's the difference in "Knockout" and "Die" in your opinion?
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.
An intermediate state before dead - i would rather switch to an enum over the current bool Dead
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.
You could do that but how is knockout different from dead?
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.
Well in the client they seem different, as this knockout packet shows a kind of dizzy "seeing stars" particle effect, while the dead packet plays the death animation and lays the model flat on the ground. Also IIRC it was also that when in the knockout state, you either wait out the normal delay for death, or you attack earlier and instantly kill the target, so it works like a sort of "fatal / terminal phase" where it is one shot away from death.
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.
Never seen that feature in the game. I thought dying was the only thing
Implemented retail gameplay features: