Commit Graph

647 Commits

Author SHA1 Message Date
Shauren
dcca884605 Core/Misc: Really fixed nopch MSVC build
(cherry picked from commit e19bb7a1a5)
2021-02-25 20:29:22 +01:00
ccrs
045b26fe9f Core/Movement: correction on header use on some generators
(cherry picked from commit daef1493f2)
2021-02-25 20:20:29 +01:00
Shauren
34cd11860d Core/Misc: Fixed nopch MSVC build
(cherry picked from commit e977bb4c4d)
2021-02-25 19:59:07 +01:00
ccrs
88c3a184cc Core/Movement: some corrections on WaypointMovementGenerator
- 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)
2021-02-15 19:13:25 +01:00
Shauren
409ca262b3 Core/Movement: Updated MovementFlags2 for 9.0.2 2021-02-11 22:03:30 +01:00
ccrs
bf12bae467 Core/Misc: waypoint movement
- 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)
2021-01-29 19:23:53 +01:00
Aokromes
93552510ab Core/Logs: Fix more logs
the others have exit,so they continue to be error because they are critical

(cherry picked from commit b68484cfb0)
2021-01-21 22:30:40 +01:00
Shauren
83eecaf2c4 Core/PacketIO: Fill new packet fields with data 2020-12-08 18:16:46 +01:00
Shauren
cab4c87d2d Core/PacketIO: Updated most packet structures to 9.0.1 2020-12-08 18:16:41 +01:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
ccrs
debe97b77a Core/Movement: minor correction on WaypointMovementGenerator
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)
2020-08-23 18:46:49 +02:00
ccrs
c065c5c774 Core: fix noPCH build v2.0
(cherry picked from commit 5f370a035c)
2020-08-23 18:02:32 +02:00
Carbenium
4e44bc6ea2 Core: Fix non-PCH build
(cherry picked from commit 45cb8c90e9)
2020-08-23 17:57:07 +02:00
ccrs
9a5e2b80b3 Core/Creature: regenerate health
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)
2020-08-23 15:56:21 +02:00
ccrs
5e39572c06 Core/Movement: 7fff83d675 followup
since MOTION_SLOT_IDLE cannot be expired, signal path done and behave like IdleMotionGenerator

(cherry picked from commit eb2769996f)
2020-08-23 00:52:05 +02:00
ccrs
0a133e77d6 Core/Movement: 7fff83d675 followup
remove home position set from creature PauseMovement, and use it when necessary
change log level on DelayedDelete

(cherry picked from commit cd4775420a)
2020-08-23 00:48:46 +02:00
ccrs
97585597f0 Core/Movement: waypoint movement (#20121)
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)
2020-08-23 00:45:46 +02:00
ccrs
6209ceddb9 Core/Movement: ee2d7c1d53 followup
(cherry picked from commit 4f43f4d72f)
2020-08-22 20:50:56 +02:00
ccrs
b521bf1d3a Core/Movement: PropagateSpeedChange should only be called on the top (current active) movement generator
(cherry picked from commit 40903dcd65)
2020-08-22 20:50:24 +02:00
ccrs
4cf5cb9031 Core/Movement: add new helper that cleans the referenced MovementSlot
(cherry picked from commit ee2d7c1d53)
2020-08-22 20:49:13 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
treeston
64baba77b6 30ac4f5 follow-up. (Finally, Keader. Finally.)
(cherry picked from commit c81f221e48)
2020-07-16 22:00:29 +02:00
treeston
ec9fbaceb0 Fix an issue where temp summons were ignoring m_regenHealth. (Hi Keader.)
(cherry picked from commit 30ac4f5377)
2020-07-16 22:00:29 +02:00
treeston
8eaf00a11f Fixed a potential crash when resuming a SplineChainMovementGenerator.
(cherry picked from commit e5301e2c98)
2020-07-16 22:00:28 +02:00
Treeston
51ce3b1c1d [3.3.5] Get zone/area IDs from vmap data in the liquid update (#19840)
* 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)
2020-07-16 22:00:24 +02:00
ariel-
1881088744 Core/AI: Factory functions cleanup
- 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)
2020-06-14 23:49:05 +02:00
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
ariel-
9ef39fa5d2 Core/Movement: allow focused spells to not break movement if it's movement allowed spell
- Core/Unit: made IsFocusing virtual

Thanks to ccrs for suggestion

(cherry picked from commit 522f537048)
2020-04-28 12:35:23 +02:00
ccrs
4e03d2717a Core/Movement: correct no point recalculation on speed change in TargetedMovementGenerator
(cherry picked from commit 4d7e7a97b3)
2020-04-27 12:25:52 +02:00
ccrs
84df2c57a3 Core/Movement: FormationMovementGenerator
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)
2020-04-27 12:25:52 +02:00
ccrs
14c6a4d823 [3.3.5] Core/Movement: MotionMaster & MovementGenerators cleaning (#19361)
(cherry picked from commit 21b8c4997a)
2020-04-27 12:25:52 +02:00
Shauren
7272508cb4 Core: Fix clang 10 warnings 2020-04-26 01:25:50 +02:00
tkrokli
a0feff65be Game/AI: SMART_ACTION_JUMP_TO_POS should resume path when reached jump location (#19029)
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)
2020-04-24 17:18:50 +02:00
ccrs
953cdbf205 Fix warning
field '_top' will be initialized after field '_owner'

(cherry picked from commit 2b5c765bcd)
2020-04-24 17:18:50 +02:00
ccrs
f135b7aea1 Core/Movement: 96f4c7c followup
(cherry picked from commit 9be7f5f57b)
2020-04-24 17:18:50 +02:00
ccrs
b2d1b11326 Core/MotionMaster: cleanup use of _expireList
And restore broken _cleanFlag check/use on update (eca3645d8b)

(cherry picked from commit 96f4c7c187)
2020-04-24 17:18:50 +02:00
ccrs
1f0dc07ef1 Core/Unit: cleanup UnitState enum
(cherry picked from commit bf56049f2f)
2020-04-24 17:18:50 +02:00
ccrs
dbe54973fb Core/Movement: cleanup MovementGeneratorType
(cherry picked from commit fce974c3b3)
2020-04-24 17:18:49 +02:00
Chaouki Dhib
5d076cfe29 Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells.
Pull request #16290 by chaodhib.
God bless, finally.

(cherry picked from commit a1f2f30c14)
2020-04-24 17:18:49 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
ariel-
396457e36a Core/Movement: Corrected all speed checks after 23b6991273
Ref issue #19210

(cherrypicked from 2e68736afc)
2019-08-17 20:04:14 +02:00
Riztazz
2caec4f4d2 Revert "[3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)"
This reverts commit 05fb27dae4.

(cherrypicked from a3c6880579)
2019-08-17 20:04:14 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
xinef1
cfefd27cb8 Added some missing SetFallInformation calls (#19121)
Fixed HP drop bug on zeppelins
Fixed possible packet relocation problems on huge transports

(cherrypicked from b3f04ec157)
2019-07-21 21:06:54 +02:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
xinef1
befea2f7a6 Core/Creatures: Stop falling if corpse is removed (can happen when alive unit is despawned instantly in air) (#18995)
Do not allow to start waypoint movement when unit is dead

(cherry-picked from f86ca9e3c9)
2018-12-09 14:18:42 +01:00
HelloKitty
46c69df3a7 Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528

(cherry-picked from 01d715eaef)
2018-12-09 14:18:42 +01:00
LluisMas
1f1c2a207e Core/Players: Changed flight masters to suppress positive transforms/shapeshifts instead of preventing starting flight (#21943) 2018-07-22 15:32:11 +02:00
Shauren
edb2b16f54 Tools/mmaps_generator: Give land priority during area merges over liquids
Closes #21700
2018-04-22 01:01:48 +02:00