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

Add handlers and requests for MapInfo packets #156

Merged
merged 12 commits into from
Mar 28, 2022

Conversation

sorokya
Copy link
Contributor

@sorokya sorokya commented Mar 27, 2022

This replaces the old Appear_Reply packet handler with a new MapInfo_Reply handler.

All places where the client was skipping unknown Player IDs or NPC indexes will now store those unknowns in ICurrentMapStateRepository.

Once a second the client will send either a MapInfo_Request, CharacterMapInfo_Request, or NPCMapInfo_Request packet to the server to get the unknown data.

This still doesn't fix the issue of removing out of view characters/npcs from the map. I'm not exactly sure what triggers it in the official client but it seems like if something is on the very edge of the screen (12 tiles away) it will be dropped from view when the map re-renders.

I wasn't sure where the best place to implement this behavior was though. Up for suggestions if you have any. This of course can be handled in a separate PR.

Copy link
Owner

@ethanmoffat ethanmoffat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great; however there's some big changes to the way handling for NPCs and players works in this, so I'd like to make sure you do some pretty extensive testing against etheos with it to make sure everything still works as expected

EOLib/Domain/Map/CurrentMapStateRepository.cs Outdated Show resolved Hide resolved
EOLib/Net/Translators/NPCFromPacketFactory.cs Outdated Show resolved Hide resolved
EOLib/PacketHandlers/MainPlayerWalkHandler.cs Show resolved Hide resolved
EOLib/PacketHandlers/NPCActionHandler.cs Outdated Show resolved Hide resolved
EOLib/PacketHandlers/NPCTakeDamageHandler.cs Outdated Show resolved Hide resolved
EndlessClient/Network/UnknownEntitiesRequester.cs Outdated Show resolved Hide resolved
@ethanmoffat
Copy link
Owner

This PR addresses #154

@ethanmoffat ethanmoffat added this to the Version 1 milestone Mar 27, 2022
@sorokya
Copy link
Contributor Author

sorokya commented Mar 28, 2022

This is great; however there's some big changes to the way handling for NPCs and players works in this, so I'd like to make sure you do some pretty extensive testing against etheos with it to make sure everything still works as expected

Addressed feedback and I did some testing against EOSERV/ETHEOS. Had to adjust the MapInfo reply handler to work with them. Players and NPCs still appeared and behaved as expected.

That should be the only possibly breaking change I think. The EOSERV already ignores the MapInfo requests packets so that should be safe.

@ethanmoffat ethanmoffat merged commit a4b3c85 into ethanmoffat:master Mar 28, 2022
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.

2 participants