Commit Graph

1090 Commits

Author SHA1 Message Date
Shauren
ef25a19326 Core/Units: Allow mind controlling non-controllable vehicles (for example players that become vehicle during boss encounters or creatures that only are vehicles to show non standard power type)
Closes #24562
2021-02-19 13:15:08 +01:00
Ovahlord
3a97aad549 Core/Spells: corrected mechanic of target type 126 and renamed it to TARGET_UNIT_AREA_ENEMY 2020-11-25 15:15:03 +01:00
Ovahlord
754c138f89 Core/Spells: ported CastSpell unclusterfucking from 3.3.5 branch 2020-11-04 22:37:11 +01:00
Ovahlord
a6a1c619f5 Core/Spells: reverted 6c34d8b5ce since the new place for the hook call does conflict with other hook calls which are already handled 2020-10-02 19:31:55 +02:00
Ovahlord
6c34d8b5ce Core/Spells: relocated SPELL_FINISHED_CHANNELING_COMPLETE handling to a better place 2020-10-02 19:04:33 +02:00
Ovahlord
d753df4ae9 Core/Spells: improved spell finish reason enum naming for finished channeled spells 2020-10-01 20:24:03 +02:00
Ovahlord
0a480f3ae8 Core/Units: update internal facing of units on every update tick when a target guid or a tracking channeled spell is being used 2020-09-23 20:48:43 +02:00
Ovahlord
02d700f3c2 Core/Spells: fixed a potential crash when trying to turn towards a non-existing target on spell cast 2020-09-15 14:51:37 +02:00
Ovahlord
d606fa4688 Core/Spells: update serverside orientation of SPELL_ATTR1_CHANNEL_TRACK_TARGET on periodic aura update ticks instead of every spell update tick 2020-09-13 22:43:11 +02:00
ariel-
dcd017bbad Core/Spell: fix LoS checks for GameObject spells
Closes #21580
2020-09-11 15:11:24 +02:00
Wyrserth
d2b27bc43c Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura (#23319)
* Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura.

* Forgot to change this in last-second rename.

* Apply suggested changes, thanks Shauren!

# Conflicts:
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Unit/UnitDefines.h
#	src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp
#	src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_ahune.cpp
2020-09-11 15:06:15 +02:00
Ovahlord
3274117cec Core/Spells: cleaned up and improved spell focusing behavior
* removed hacky update_object call from SetSpellFocus helper
* corrected facing behaivior in SetSpellFocus
* spells with SPELL_ATTR5_DONT_TURN_DURING_CAST will no longer set a target guid for proper clientside facing behaivior
* channeled spells with a destination target will no longer pick a objectTarget
* update serverside orientation for channeled spells with SPELL_ATTR1_CHANNEL_TRACK_TARGET
2020-09-09 20:08:35 +02:00
Ovahlord
aba4da0898 Core/Spells: revert ec997a4715 and apply stricter rules to avoid unwanted behaivior 2020-08-30 14:30:55 +02:00
Ovahlord
ec997a4715 Core/Spells: revert SPELL_ATTR5_INCLUDE_MELEE_RANGE naming since all non-generic aoe spells are suposed to use hitbox sums instead 2020-08-30 14:17:01 +02:00
Giacomo Pozzoni
6a8ecc3ee3 Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888
# Conflicts:
#	src/common/Collision/DynamicTree.cpp
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/World/World.cpp
2020-08-29 13:49:21 +02:00
Ovahlord
85018f9421 Core/Spells: fixed name clash between local variables and class member corpseTarget 2020-08-29 13:15:43 +02:00
Warpten
2b2fc5fb8a Core/Spells: remove PrepareSpellScript and PrepareAuraScript macros and make Hooklist use emplace behaivior (#174) 2020-08-28 15:40:26 +02:00
Ovahlord
677990a1b8 Core/Spells: removed more unused parameters for 4.x since SPELL_AURA_MOD_CRIT_PERCENT_VERSUS is not used at all 2020-08-28 12:20:35 +02:00
Ovahlord
25c980c390 Core/Units: ported spell crit chance updates from 335 branch 2020-08-28 11:46:07 +02:00
Shauren
4ea65b38bd Core/Spells: Fix refreshing exclusive auras that have different values in each effect
Closes #24592
2020-08-23 20:22:18 +02:00
Shauren
3dfa88f20e Core/Spells: Relaxed aura exclusivity check to allow casting spells that have other, non-aura effects even if aura will not be applied 2020-08-23 20:21:40 +02:00
Shauren
5d98550574 Core/Spells: Fixed refreshing stat buff auras that have been improved by talents 2020-08-23 20:20:18 +02:00
Shauren
0c08285932 Core/Spells Fixed scroll stacking check when not targeting self
* Reuse code that removes non-stackable auras at apply to check before casting the spell to keep reagents/cast item
2020-08-23 20:18:52 +02:00
FAQ
cc085443ac Core/Spells: Scrolls should not be consumed, when they fail to apply. 2020-08-23 20:15:30 +02:00
Ovahlord
359d6f3a9f Core/Spells: fixed a potential crash in proccing auras of pet / guardian summoners 2020-08-23 17:32:48 +02:00
Ovahlord
ec1b73e6eb Core/Spells: reduce the scope of which controlled unit may proc owner's auras from controlled units to pets and guardians 2020-08-23 14:21:38 +02:00
Ovahlord
5be03870b5 Core/Spells:
* fixed Hunter Fervor talent
* fixed Hunter Killing Streak talent
* fixed Crouching Tiger, Hidden Chimera talent
* allow controlled units to proc the auras of their owner when dealing spell damage
2020-08-23 00:51:52 +02:00
Ovahlord
a2fa0c2ffa Core/Units: treat CREATURE_FLAG_EXTRA_NO_COMBAT as a pseudo passive react state. Units with that flag will no longer enter combat with potential targets unless they are being engaged by their opponent or explicitely commanded to do so
* apply no combat flag on every creature and their difficulty entries that have been flagged in creaturedifficulty.db2
2020-08-09 18:02:41 +02:00
Ovahlord
ddbe5d9dd2 Core/Spells: ported some edge case fixes for taunts 2020-08-09 17:45:17 +02:00
Ovahlord
f1d040fee5 Core/Spells: tempfix for checking for multiple single target spell effect immunities 2020-08-07 20:04:16 +02:00
Ovahlord
f42d242996 Core/Spells: implement and enable SMSG_MISSILE_CANCEL and use it in Murozond encounter 2020-08-04 16:53:59 +02:00
Ovahlord
1ab7a9328f Core/Combat: reduce differences between 4.x and 335 2020-07-22 21:37:02 +02:00
Ovahlord
de6a514ec5 Core/Misc: fixed build 2020-07-22 18:35:41 +02:00
Treeston
e54f8ca4f7 Core/Misc: Rename Unit::AttackedTarget to Unit::AtTargetAttacked to match naming scheme for these notifiers
# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Spells/Spell.cpp
2020-07-22 18:07:24 +02:00
Treeston
d9e6e82c7d Core/Unit: UNIT_FLAG renames
[UNIT_FLAG_PLAYER_CONTROLLED -> UNIT_FLAG_POSSESSED]
[UNIT_FLAG_PVP_ATTACKABLE -> UNIT_FLAG_PLAYER_CONTROLLED]
Signed off by: Shauren, Warlockbugs.

# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/Entities/Pet/Pet.cpp
#	src/server/game/Entities/Unit/UnitDefines.h
#	src/server/game/Spells/Auras/SpellAuraEffects.cpp
#	src/server/game/Spells/Spell.cpp
2020-07-22 17:32:51 +02:00
Treeston
942c3a77da Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2020-07-22 16:49:37 +02:00
Gustavo
d55b5549c6 Core/Scripts: Rewrite Boss Kalecgos (Sunwell Plateau) (#19897)
* Core/Scripts: Rewrite Boss Kalecgos (Sunwell Plateau)

Scripted all spells
Corrected behavior of Spectral Blast and Curse of Boundless Agony
Removed wrong wipe behavior
Fix problem where bosses would be stuck with banish
Added Boundaries
Corrected texts
Removed old hacks
Other minor fixes

# Conflicts:
#	sql/old/4.3.4/world/19_2017_06_18/2017_08_08_00_world.sql
#	src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
#	src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
2020-07-22 14:50:24 +02:00
Treeston
ec04d3b2cd [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2020-07-22 13:43:23 +02:00
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