- Since a timer can be set on MovementGenerator::Pause, dont update it till the movespline is Finalized
- Don't set HomePosition on every Update, check if movespline is Finalized
* This is still doesnt feel correct, should it only be called on WaypointNode Start?
(cherry picked from commit 2ce9a0a094)
- Creature: update current waypoint to store nodeId and pathId
- MotionMaster: change variable type on GetMotionSlotType and GetMotionSlot to keep consistency and prevent errors (ASSERT is now no longer needed)
- UnitAI: add new waypoint hooks WaypointPathStarted and WaypointPathEnded
- SAI: handle WAYPOINT related events if creature is no escorting
* SMART_EVENT_WAYPOINT_RESUMED still not implemented for no escorting
TODO: the new hooks can save, now duplicated, logic on EscortAI and SAI
closes#20777
updates #20310
updates 21bd52cb99
(cherry picked from commit e10d7dd45c)
remove the CanMove check since it will never trigger
the timer is left there to prevent errors on loading such as leader being created before the other members of the formation making them skip the first movement; purely a workaround
(cherry picked from commit c7d565739b)
There are three possible scenarios regarding regenerating health
- db lock and curhealth set to > 0
- db lock and curhealth set to 0
- dynamic lock (set in scripts and such) overriding db lock
(cherry picked from commit 91c0d49c18)
remove home position set from creature PauseMovement, and use it when necessary
change log level on DelayedDelete
(cherry picked from commit cd4775420a)
Following the work done in #19361 this is the cleanup and improvement of the related logic of waypoint management.
Ref 28050f3#18020
(taking the good parts and ignoring the incomplete work)
(cherry picked from commit 7fff83d675)
* Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup
* Use this lookup in Map:: relocation methods to update m_areaId and m_zoneId fields on WorldObject
* Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields
* Clean up liquid state handling on Unit and Player
* Hand floor's Z coord up through GetFullTerrainStatusForPosition, use it to update a new field in WorldObject, and use that to feed a new GetFloorZ call on WorldObject.
Closes#16489
(cherry picked from commit f6c849729b)
- Get rid of fugly void pointers
- Streamlined AI selection code, using Permissible as it should've been instead of harcoded checks on the selector code
- Moved IdleMovementGenerator singleton to factory code
(cherry picked from commit ce3787f190)
Use own movement generator for creatures following on a formation.
First step of implementation, huge room for improvement.
Closes#19422
(cherry picked from commit 46221b6dc1)
SmartAI NPCs using SMART_ACTION_JUMP_TO_POS
should resume their path when they have reached the jump location.
The changes in this PR makes the action work as intended.
Closes#18760
(cherry picked from commit 6e08051825)