Commit Graph

133 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
Chaouki Dhib
91a70f9aa2 Core/Movement: minor MotionMaster refactor (#18367)
(cherry picked from commit eca3645d8b)
2018-03-12 10:32:04 +01:00
Riztazz
05fb27dae4 [3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)
Implement smooth movement for all waypoint pathing and escortai

(cherry picked from commit 28050f338d)
2018-02-11 15:53:32 +01:00
Aokromes
b3e2684675 Merge pull request #18053 from ccrs/motion
Core/MotionMaster: cleanup, reordering and renaming

(cherry picked from commit fe68b2e998)

# Conflicts:
#	src/server/game/Movement/MotionMaster.cpp
#	src/server/game/Movement/MotionMaster.h
2018-02-11 14:43:04 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Golrag
9128b00f59 Core/Movement: Set CatmullRom only when flying when using MoveSmoothPath (#19903) 2017-07-13 17:50:13 +02:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
f2039981e0 Core/Game: Include cleanup, part 3 2017-05-20 00:09:37 +02:00
Shauren
7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
joschiwald
036f67c0c1 Core/Collision: Replaced phasemask with proper phases in GameObject collision calculation 2017-05-05 21:22:58 +02:00
Aokromes
d8fdc893ee Commit name: Add flying check to MoveSmoothPath
By Malcrom
2017-04-16 15:10:48 +02:00
Shauren
3731f4087b Core/Movement: Pass SpellEffectExtraData PointMovementGenerator 2017-03-14 16:36:10 +01:00
Shauren
fd0d0f25a9 Core/Spells: Fixed extra charge effect visuals 2017-03-12 00:40:52 +01:00
treeston
b12f19f066 Movement/SplineChain: Streamline the script workflow for resume info a bit, provide static method that does all the ugly pointer casts for you. Also prevent a nullptr dereference crash if scripts mishandle motionmaster, and canonize Chain == nullptr to signify "no resume info".
(cherry picked from commit d3214a0012)

d3214a0 follow-up for code style.
(cherry picked from commit 4deeee66bd)
2017-03-02 21:10:00 +01:00
treeston
205ec4c3bf Core/Unit: Standardize SetFacingTo and SetFacingToObject behavior while moving. Both now fail while moving unless arg2 bool is true.
Movement/SplineChain: Bump value range for DB chainId up to uint16 (0 to 65535) from uint8 (0 to 255). Turns out sniffs generate far more chains than I expected.

(cherry picked from commit 2170541a51)

Code style follow-up, I blame Notepad++.
(cherry picked from commit 7860da0de6)
2017-03-02 20:47:29 +01:00
treeston
59d48ce7e4 Core/Movement: Add new SplineChainMovementGenerator that allows accurate replication of sniffed waypoints in static sequences, along with DB facilities that allow loading of waypoints from DB.
(cherry picked from commit 6d00d3f283)

Merge remote-tracking branch 'Treeston/3.3.5-splinechains' into 3.3.5 (PR #17946)
(cherry picked from commit 20f483967f)

Core/Movement: Add a convenience default ctor to SplineChainResumeInfo, and fix PCH build in some configurations (zzz why do we even keep Appveyor and Travis around).
(cherry picked from commit 4fa646c0b2)

PCH build fix. Again.

(( Alright, you made me waste 20 minutes of my life on a full nonPCH rebuild of the core now. ))
(( I hope you're happy. ))
(cherry picked from commit 4a1a460241)
2017-03-01 22:03:35 +01:00
Shauren
5e437f5d3d Core/Movement: Implement SpellEffectExtraData curve modifiers 2017-02-18 21:55:28 +01:00
treeston
7b3b333dd5 Core/Position: Allow implicit casting to G3D::Vector. Also, add a utility overload to MotionMaster.
(cherry picked from commit 9f15482b84)
2017-02-18 17:55:40 +01:00
Aokromes
433162875d Core/Movement: Update MoveSmoothPath for flying creatures
By Malcrom
2017-01-14 15:03:47 +01:00
SnapperRy
2e5550758c Core/Movement: interrupt a creature's current cast when fleeing for assistance, and (if spell is not castable while moving) when running random/fleeing movement generators. (#17271)
Also make sure the creature is alive before updating.

Fixes #12823.
(cherry picked from commit 2db9269ec1)

DB/Creature: World Trigger (Not Immune NPC) InhabitType update

Closes #17332 by Malcrom
(cherry picked from commit 78d08834c0)

DB/Item: Fix text in Rune-Inscribed Parchment

Closes #17329 by tkrokli
(cherry picked from commit 8879545f21)

DB/Quest: improve chaining for "The Ashenvale Hunt" quests

Closes #17323 by SnapperRy
(cherry picked from commit d034eedb81)

DB/trinity_string: wrong string about character customization + minor fix

Closes #17306 by lyn1337
(cherry picked from commit 0951e559eb)

DB/Quest: fix some completion/offer reward quest texts

Closes #17336 by SnapperRy
(cherry picked from commit e9025036b9)

DB/Quest: add queststarters for "Regthar Deathgate"

Closes #17337 by SnapperRy
(cherry picked from commit 0b8921a0ef)

DB/Quest: fix chaining for "The Real Threat"

Closes #17338 by SnapperRy
(cherry picked from commit c9cb86d6c5)

DB/Quest: fix repeatableness (or lack of) for some quests

Closes #17339 by SnapperRy
(cherry picked from commit b9f2e2a81b)

DB/Quest: improvements for "Fool's Stout"

Closes #17340 by SnapperRy
(cherry picked from commit 4ec753dc50)
2017-01-13 00:07:43 +01:00
joschiwald
71ffdccb5a Core/Movement: enable item use and spell cast when dismounting
Remove error message and allow spell cast or item use from
mounted state on ground, especially when sitting on
a landed flying mount. Current behavior is that the player
will get the error message "You can't do that while moving"
when trying to cast a spell or pick up an item
while sitting on a flying mount after having landed.

By joschiwald, closes #6236

(cherry picked from commit 19aac66bc2)
2017-01-12 03:36:32 +01:00
Shauren
dad19df69d Core/Units: Renamed and documented UNIT_FLAG_DISABLE_MOVE to prevent people from trying to use this flag to root a creature leaving them wondering why it doesn't do anything
(cherry picked from commit b36da77185)

Core/Scripts: build fix

(cherry picked from commit 258368a2bd)
2017-01-09 21:16:36 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Vincent-Michael
3cd19d3b30 Core: Removed Whitespaces 2016-04-16 12:19:23 +02:00
Chaouki Dhib
d26b0419c3 Core/Movement: Added a wrapper method in MotionMaster for a unit to move toward another unit and stop once it reaches the target at a certain distance. (#16806)
(cherry picked from commit 97b053d203)
2016-04-16 01:31:15 +01:00
Aokromes
d4146a23ac Merge pull request #16038 from tkrokli/grammar_and_spelling_corrections_335
[3.3.5] Core/Logs: English text corrections
(cherry picked from commit 4cd937140b)
2016-04-08 19:48:58 +02:00
treeston
73b917e122 Merge remote-tracking branch 'Eliminationzx/FixJumpDestOrientation' into 3.3.5 (PR #16450) with some minor CS adjustments
(cherry picked from commit cfed2d7a3d)
2016-04-05 19:02:11 +02:00
Shauren
e0437ca494 Core/Spells: Implemented casting spells on movement finish from SPELL_EFFECT_JUMP, SPELL_EFFECT_JUMP_DEST and SPELL_EFFECT_CHARGE 2016-01-25 19:35:41 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
joschiwald
92b08fc74b Scripts/VioletHold: rewrote the whole instance
thanks @MitchesD for help

(cherry picked from commit df21162fe4)
(cherry picked from commit 3a4f54197c)
(cherry picked from commit f50df72820)
(cherry picked from commit 95bae7143f)
(cherry picked from commit 5406f82044)
2015-11-01 13:09:30 +01:00
Shauren
32a2e58429 Core/Taxi: Implemented rebuilding taxi path for early landing and enabled CMSG_TAXI_REQUEST_EARLY_LANDING 2015-09-21 00:01:44 +02:00