-
Notifications
You must be signed in to change notification settings - Fork 241
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
Phase 1 Refactor of Session, NetworkSession, Action handlers #267
Conversation
Source/ACE/Entity/Landblock.cs
Outdated
Creature cwo = new Creature(c); | ||
worldObjects.Add(cwo.Guid, cwo); | ||
// Creature cwo = new Creature(c); | ||
// worldObjects.Add(cwo.Guid, cwo); |
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 disabled creature spawning here. Is there another place where this is happening now, as I couldn't really find it anywhere else.
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.
Reverted it. For some reason that section causes an Exception for me, so was easier to comment it out.
…r, added stateful progression of events. Trying to encapsulate logic better. This is lead up to major rebase of how Messages/Actions are handled.
…rked delegate callers to handle that. Now all message handler calls are effectivly an instance function call for Session.
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.
Overall...
- ".Objects" namespace - do not like
- Player class doing game action network decoding - do not like.
- MANY cases of file names not matching class names. In the case of partial classes, I'm a big fan of ClassName.PartialName.cs
[GameAction(GameActionType.AllegianceUpdateRequest)] | ||
private void AllegianceUpdateRequestAction(ClientMessage message) | ||
{ | ||
var unknown1 = message.Payload.ReadUInt32(); |
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.
This is bad for the Player class. The Player class, which represents a person at the keyboard playing the game, is now responsible for parsing network Game Actions? Please no.
public partial class Player | ||
{ | ||
[GameAction(GameActionType.Suicide)] | ||
private void CharacterSuicide(ClientMessage message) |
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 this used to work...
Merged SocketManager into WorldManager
Made Session inherit from NetworkSession, flattening the model
Moved GameMessage handlers into Session class, partial classes
Moved GameAction handlers into Player class, partial classes
This move makes functionality encapsulated into these classes, allowing a move to fewer public members.
Phase 2 will be to build on WorldObject model to improve queued game actions, broadcast, and action ordering/timing.