Commit Graph

1052 Commits

Author SHA1 Message Date
Ovahlord
e1d74d4dc6 Core/Misc: added more fallthrough attributes and added some missing breaks reported by CI 2020-07-19 12:24:58 +02:00
Peter Keresztes Schmidt
a06e5d7d40 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs 2020-07-18 22:43:24 +02:00
Ovahlord
40882b3f71 Core/Spells: define and implement SPELL_ATTR5_INCLUDE_MELEE_RANGE
*this attribute is being used to determine whenever a area targeting based spell shall include its melee range for target selection or not. This fixes many cases in which especially class abilities should hit targets that do not directly stand inside of the radius of a spell while maintaining that behaivior for spells without that attribute
2020-07-16 22:39:41 +02:00
Ovahlord
9e2e37e074 Core/Spells: check for spell immunities only for effects that are affecting the checked target 2020-07-10 19:12:37 +02:00
Shauren
1dd44ab9b9 Core/Spells: Don't select corpses for spell targets that expect to hit units
Closes #24980

# Conflicts:
#	src/server/game/Spells/Spell.cpp
2020-07-09 19:14:24 +02:00
Ovah
b09d6e2330 Core/Movement: reimplement follow movement (#124) 2020-06-26 21:22:21 +02:00
Ovahlord
29c332949f Core/Spells: followup fixed for merge conflicts 2020-06-22 12:03:30 +02:00
Shauren
9fe40967b1 Core/Spells: Implemented new target types
* TARGET_UNIT_TARGET_ALLY_OR_RAID
* TARGET_UNIT_CASTER_AND_SUMMONS
* TARGET_UNIT_AREA_THREAT_LIST
* TARGET_UNIT_AREA_TAP_LIST
2020-06-22 11:49:26 +02:00
Warpten
0af44ccc01 Core/Spells: implement DoT clipping
* Core/Spells: Implementation of DoT clipping.
* Core/Utilities: Backport "EnumFlags v3.0" from master.
* Core/Spells: Switch AURA_REMOVE_MODE to a flag set.
2020-06-04 18:16:03 +02:00
Ovahlord
e1f35847bb Core/Spells: backported radius calculation cleanup for SelectImplicitTargetDestTargets from 3.3.5 2020-05-16 20:04:22 +02:00
Giacomo Pozzoni
e3bab35d5e Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues (#24539)
* Core/MMAPs: Adjust walkable climb

Adjust walkable climb as recast using walkableClimb also to find the poly from a position, giving priority to polys that are below the position but closer than walkableClimb.

* Temporarily disable static collision (the whole check should be removed)

* Core/Spells: removed deprecated mmap path check for TARGET_DEST_CASTER_FRONT_LEAP

* Core/Objects: allow flying units to use the helper as well (flying units casting radius based spells)

* Code refactor

* Handle raycasts that end in a point with no height in the mmap mesh as PATHFIND_NOPATH

* Walk back a bit from raycast hitpoints as sometime the 2D result point is outside of the polygons due to floating point errors.

* Remove whitespace

* Revert 4a197ba22a as a raycast point path should have the Z retrieved with getPolyHeight(). Raycast will only return a 2-point path with Start and Hitpoint/End

* Cleanup PathGenerator raycast case

* Fix PathGenerator raycast broken if start and end are on same poly.
Fix PathGenerator raycast broken if no wall is hit.
Remove unused case of using raycast with an existing previous path (can be added back properly if needed).
Remove forcing poly length to 2 when we actually have already the right number.

* Use closestPointOnPolyBoundary on the second try of finding a point on poly for raycast.
Note that in this case the mesh height is not used which might cause issues. The poly boundary height will be used instead.

* Handle cases where getPolyHeight() fails because the point is on polygon border (and caused by floating point imprecision)

* Add far from poly flags

* Set PATHFIND_INCOMPLETE in raycast case if startFarFromPoly or endFarFromPoly

* Fix blink close to walls with no valid polygon behind the wall

* Require to re-extract mmaps

Co-authored-by: Ovah <dreadkiller@gmx.de>
# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
2020-05-16 13:45:57 +02:00
Ovahlord
db4e832fee Core/Spells: removed pre cast spell hacks from spell class and moved remnants to spell scripts
closes #81
2020-05-10 21:11:56 +02:00
Ovahlord
1472bc9a7d Core/Spells: removed deprecated path generation for TARGET_DEST_CASTER_FRONT_LEAP since MovePositonToFirstCollision now does the job 2020-05-01 14:46:55 +02:00
Ovahlord
cef6f94953 Core/Spells: implement SPELLVALUE_AURA_DURATION to allow casting spells with a duration value set 2020-04-23 19:22:31 +02:00
Ovahlord
b653f2f819 Core/Units: ported power type updates from master branch 2020-04-22 03:13:02 +02:00
Ovahlord
b770d2e4d0 Core/Spells: renamed Amplitude and ValueMultiplier to match DBC field names 2020-04-16 14:40:30 +02:00
Ovahlord
61df418204 Core/Misc: fixed two comment typos 2020-04-11 11:13:19 +02:00
Shauren
68affe12e2 Core/Spells: Fixed checking free inventory space for some spells that have bad dbc data 2020-04-10 22:55:25 +02:00
Ovahlord
8fde6ce50a Core/Spells: mount results will now be stored in a pointer and sent outside of CheckCast 2020-04-07 23:48:07 +02:00
Ovahlord
eb3e2f7ca5 Core/Spells: use enum class for mount results 2020-04-07 18:55:16 +02:00
Ovahlord
504f05ff6f Core/Spells: minor cleanup followup for 832e763d36 2020-04-07 17:30:08 +02:00
Ovahlord
832e763d36 Core/Packets: implement and enable SMSG_MOUNT_RESULT and use it for transformed cases 2020-04-07 17:25:15 +02:00
Ovahlord
77cf10ee5f Core/Misc: fixed gcc warnings 2020-04-04 20:20:41 +02:00
Ovahlord
98b075cb4b Core/Spells: implement TARGET_CORPSE_SRC_AREA_RAID and updated remaining resurrection effect handlers for updated corpse targeting 2020-03-26 22:03:58 +01:00
Ovahlord
df193945d9 Core/Spells: implement corpse target type support and properly fix resurrections 2020-03-26 19:54:54 +01:00
jackpoz
359eb2bc67 Core/Spells: Fix missing "Inventory is full" with spells that create more than 1 item 2020-03-19 23:31:35 +01:00
Ovahlord
fc12e97cfe Core/Spells: implement SPELL_EFFECT_APPLY_AURA_2 and TARGET_DEST_CASTER_FLOOR 2020-03-14 21:14:07 +01:00
Ovahlord
d9b854ad59 Core/Datastores: backported hotfix system implementation 2020-02-21 23:13:38 +01:00
Giacomo Pozzoni
cad41332ba Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon (#24036)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon

Fix path generator returning shortcuts when start and end are on the same polygon by handling this case as if start and end were on 2 different polygons. This will ensure BuildPointPath() gets called which calls FindSmoothPath(), making sure each step is not longer than SMOOTH_PATH_STEP_SIZE (4 yards)

* Change ingame cast error message to SPELL_FAILED_NOPATH from SPELL_FAILED_OUT_OF_RANGE if the generated path is too long
2020-02-20 21:29:46 +01:00
Giacomo Pozzoni
fbe4abf3be Core/MMaps: Fix charge underwater/falling (#24010)
* Core/MMaps: Fix charge underwater

Fix charge sometimes returning "no path available" when swimming/underwater.
Fix charge selecting a destination point 4 yards above swimming/underwater targets

* Allow falling units to charge targets that are below (lower Z coordinate)

* Disable "raycast" pathfinding as it's not blizzlike.

This might show some strange paths when charging with a target in front.
It also fixes some falling undermap issues.

This Reverts 272009ebee

* Remove Z offset when charging a target as it never made sense
2020-02-20 21:27:00 +01:00
jackpoz
183789053e Core/Misc: Fix GCC 8 warnings 2020-01-31 21:19:25 +01:00
Ovahlord
6bd0412f73 Core/Spells: do not set a beacon guid for channeled spells to match sniff behaivior 2020-01-27 12:48:35 +01:00
Ovahlord
2dd295a603 Core/Spells: updated MSG_CHANNEL_START to packet class and fixed its heal prediction 2020-01-27 11:22:30 +01:00
Ovahlord
fcb79fee07 Core/Datastores: updated DBC structure names to generated member format 2020-01-25 12:36:32 +01:00
Ovahlord
266e2f1895 Core/Spells: defined unknown field in spell start and spell go packet struct 2020-01-21 22:26:46 +01:00
Ovahlord
2374163cbb Core/Spells: make Travis happy 2020-01-21 06:54:43 +01:00
Ovahlord
744ac00469 Core/Spells: converted SMSG_SPELL_START and SMSG_SPELL_GO to packet class 2020-01-21 06:03:02 +01:00
Ovahlord
05fcab82d8 Core/Spells: corrected implementation of SPELL_AURA_BLOCK_SPELL_FAMILY and implement trigger cast flag to ignore blocked spells 2020-01-18 16:21:17 +01:00
Ovahlord
b210320df0 Core/Spells: unify successful spell cast and interrupt AI hooks into one helper with different cast results to reduce duplicate code
* fixed position update logic that was responsible for interrupting channeled spells because of a missing movement generator update call that was kicking in after the interrupt already happened
* improved Baron Ashburys timer layout
2020-01-16 05:01:39 +01:00
Aokromes
d6d3f06f06 New year 2020-01-04 18:32:38 +01:00
funjoker
6c56916b29 Misc: Update copyright information
Happy new year
2020-01-01 18:47:28 +01:00
Ovahlord
ffeb6002b5 Core/Spells: corrected another case of sending the too close spell error message when trying to cast a destination based spell 2019-12-13 23:22:49 +01:00
Ovahlord
0cdddca210 Core/Spells: corrected haste rune cooldown reduction behaivior
* the haste regeneration modifier will now act multiplicative on the base regeneration rate rather than modifying it directly
* renamed some functions for clarification
2019-12-10 15:23:43 +01:00
Ovahlord
abb62cc76f Core/Spells: reverted proc behaivior for pets and fixed applying spell mods for hunter pets and minions 2019-12-09 16:10:54 +01:00
Ovahlord
0c2cdee7a0 Core/Spells: allow more proc hooks to trigger when a owned unit casts a spell 2019-12-08 23:24:36 +01:00
Ovahlord
7ec720ef22 Core/Spells: spells of controlled units will now trigger their owner's proc auras as well and benefit from their proc chance modifiers 2019-12-08 23:05:41 +01:00
Warpten
cbb5f9132f Core/Spells: Death Strike will now always consume its runes even when not hitting the target 2019-12-08 11:34:45 +01:00
Ovahlord
398a42c917 Core/Spells: Totems will now get their hit result from their owner instead of doing it on their own 2019-12-08 11:29:29 +01:00
Warpten
2047d4c4b2 Core/Spells: define and implement UNIT_FLAG2_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS and corrected sending the correct spell failed message when being too close to a spell cast target 2019-12-08 01:55:23 +01:00
Ovahlord
76b032b24a Core/Spells: do not allow players to cast spells when they have a channeled spell that cannot be canceled 2019-09-07 04:54:39 +02:00