Rewrite Waypoint related commands (c2612)
Toggle the commands .wp add .wp modify and .wp show to be able to work with waypoints from creature_movement_template
Technical changes:
* Move Path Selection to WaypointManager
* Set visual waypoints to be summoned npcs
Remove .npc addmove command to add a waypoint. (c2619)
For this .wp add command is expected to be used
Remove unneeded functions from WaypointManager (c2620)
Waypoint Commands: Improve export command, remove import command (c2621)
* Also finally drop the wpguid columns from creature_movement[_template]
* Also remove all static spawns of id=1 (they are usually waypoints from the old system)
* Fix a minor bug in WaypointManager than can result in a crash if bad params are passed
Waypoint-Commands: Prefer current path's movement for handling (c2626)
WaypointMovement: Allow External sources to load waypoints (with different path ids) (c2627)
* Add SetExternalWaypointTable(..) function to ScriptMgr.h scope to be able to define from which table external waypoints are loaded
* Add AddWaypointFromExternal(..) function to ScriptMgr.h scope to load points into WaypointManager
* Expand MotionMaster::MoveWaypoint function to use source and pathId for specifying which path to load
* Expand MotionMaster::MoveWaypoint function to use some overwrite information for "entry".
This will be helpfull to have one path for mobs with different entry (ie ally/horde npcs with same behaviour)
* For externally loaded waypoints let CreatureAI::MovementInform have EXTERNAL_WAYPOINT_MOVE(256) + pathId as type.
This will allow an external user to know which of "his" paths is used
* Adapt the related commands a little bit such that parts of the commands will also be usable for external paths
At the moment .wp show and .wp export work with external paths.
WaypointMovement: Add support to set the next waypoint (c2635)
* Also add support to initialize a path with waittime before starting movement
* Add additional types for external use of MovementInform such that MovementInform is called when a waypoint is started, or when the last waypoint is handled
* Improve some minor technical issues
Let .wp add command start with 1 as first waypoint (c2640)
- Select a creature and type ".mmap path go" to move to that creature using generated path.
- Select a creature and type ".mmap path to_me" to see path from creature to your player char.
- You must be a GM to see these points.
Improve random movement generator. (c2607) @cyberium
Now creatures will have possibility to move up/down on swim/fly situation.
Random groundpoint will have more accurracy and the creature have less chance to go throught object.
Note:
- Some creature may have invalid value like inhabit type and other flags in relation of movement in water. If its the case the result is not so good. DB must be corrected for these creatures.
- we have to find a way to handle correctly movement flags.
Make sure player stop moving when confused aura is removed. (c2629) @cyberium
modified version of @kvipka work
Improve confused movement generator. (c2630) @cyberium
Improve fleeing movement generator. (c2631) @cyberium
Restructured mangosd, realmd and some general cleanup
Moved docs to the correct doc folder
Moved SOAP related lib files to the correct dep location
Updated PCH naming convention for SD2 to match the rest of the source
General CMake cleanup
Possibly fixed postgre build, to be tested
* Add SCRIPT_COMMAND_MOVE_DYNAMIC to move to a random point or towards another unit
* Toggle GetRandomPoint function to be able to return a random point with min-distance or a given direction.
* Toggle MovementGenerator::GetResetPosition to be able to return a reasonable orientation for reset.
Ideas and requirement research by virusav!
Thanks to virusav and Grz3s for test-feedback! (c2603)
(c2599)
This will set the movement flags and send SMSG_SPLINE_MOVE_* opcodes on movement change.
This will fix movement for flying vehicles and allow future scripting possibilities.
(c2608) Make CanSwim and CanFly abstract method. Also precise UNIT_FL…AG_UNK_15 possible use.
@cyberium