Skip to content
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

Parsing incoming network commands should not instantiate ObjectGuids #1216

Merged
merged 86 commits into from
Jan 4, 2019

Conversation

Mag-nus
Copy link
Member

@Mag-nus Mag-nus commented Jan 1, 2019

Parsing packets should read in the uint32 and pass that uint32 to the appropriate handler.

The handler can then decide if it can use the value as a uint32 or if it should instantiate an ObjectGuid around that value.

Only one WorldObject per ObjectGuid can exist at a time. The normal reference comparison is fine. IComparable gives the wrong impression that a WorldObject with the same ObjectGuid can be defined/instantiated by two different objects at the same time.
Fix death items dropping properly
Fix giving equipped items appearing in targets inventory
…ass uints

The idea here is that incoming network packet handlers should be doing the bare minimum to parse the packet.

The handler of the action should be what determines of an ObjectGuid is needed, or a uint is sufficient.
@Mag-nus Mag-nus merged commit 5620d0a into ACEmulator:master Jan 4, 2019
@Mag-nus Mag-nus deleted the NetworkingCleanup branch January 5, 2019 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants