TrinityCore / WowPacketParser

World of Warcraft Packet Parser
GNU General Public License v3.0
410 stars 352 forks source link

Implement waypoint generation #859

Open killerwife opened 3 weeks ago

killerwife commented 3 weeks ago

Review welcome

TODO:

Propagate to all movement handlers
Iron out which points to take with normal interpolated movement - atm taking all

BAndysc commented 3 weeks ago

I believe it might be a good occasion to use protobuf format parsing.

Big part of the PR is introduction of "monster_move" structure (here named CreatureMovement). Protobuf already does it - it is a universal (game version agnostic) structure for most common packets. By re-using protobuf parsing, there is less code repetition and there is no need to modify handlers.

However, until now there was no infrastructure to use protobuf for processing packets, I have added a PR which introduces "proto query builders" https://github.com/TrinityCore/WowPacketParser/pull/860 and this is a demo PR how your change would look like with this new protobuf parsing: https://github.com/TrinityCore/WowPacketParser/pull/861

killerwife commented 3 weeks ago

I have no real opinion on that, just that the surrounding code needs time to cook. I specifically did not use UniversalGuid because the classes in protobuf do not have ToString conversions added to mimic the UX of the normal classes and that then creates a jarring experience when looking at parse and sql file.

Either way the PR is not done since I need to prototype it in terms of what points to take and so on. If at point of being done you guys choose to pull the data from protobuf thats fine, but from my point of view, the stuff that has to be done to use protobuf at this point in time is more complex and less readable. So kinda sounds like someone needs to start using it first who actually adds more than one pr in half a year to improve the usage of protobuf and provide examples in the codebase.

killerwife commented 6 days ago

@BAndysc now its feature complete in case you want to convert it.