Commit Graph
3333 Commits
Author SHA1 Message Date
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 f067228bd7 Core/Spells: allow the channel target tracking to bypass no turn unit states 2020-09-19 20:22:51 +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
Ovahlord a51d331e9a Core/Spells: do not save Priest's T11 Chakra Flow bonus to database to fix an exploit that was causing it to permanently last on the player 2020-09-13 22:24:02 +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
Keader 2159703022 Core/Spells: Implemented PROC_ATTR_CANT_PROC_FROM_ITEM_CAST 2020-09-08 20:58:11 +02:00
Shauren fb11c148c8 Core/Spells: Removed PROC_ATTR_DISABLE_EFF_* attributes and store that in a separate column 2020-09-08 20:56:11 +02:00
Shauren 64bc20bf35 Core/Players: Directly store PlayerSpell in m_spells, not as pointer 2020-09-07 21:36:13 +02:00
Ovahlord 9bf26d19fa Core/Spells: Divine Purpose will no longer get consumed by Divine Storm 2020-08-31 18:18:54 +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
Ovahlord 27bbba32aa Core/Spells:
* fixed Protector of the Innocent talent
* fixed Tower of Radiance talent
* fixed Blessed Life talent
* fixed Gift of the Earthmother Rejuvenation instant heal effect
2020-08-29 21:33:16 +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
Ovahlord 89fdfd5d7f Core/Spells: corrected Furor behaivior and fixed an exploit that was allowing druids to get full energy when turning into cat form 2020-08-28 15:51:29 +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 74b44c91a7 fixed warnings 2020-08-28 11:54:53 +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 b36233b8f6 fixed build 2020-08-09 17:55:50 +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 f456336791 Core/Spells: Magmaw's Mangle will now do 100% melee damage instead of 150% sniffs seem to confirm that the hotfix nerf from 2011-03-16 never got merged into the dbc files 2020-07-27 01:18:47 +02:00
Ovahlord 1ab7a9328f Core/Combat: reduce differences between 4.x and 335 2020-07-22 21:37:02 +02:00
Treeston eb8c652715 Core/Spell: Reset threat to zero when the hunter use Feign Death
Closes #23874
2020-07-22 19:24:01 +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 2f075b11e9 Core/Threat: Fear no longer suppresses threat. All confuse effects now suppress threat, even ones that wouldn't break on damage. 2020-07-22 17:51:44 +02:00
Treeston 7df7dcca7d Core/Threat: Threat system adjustments:
* Online states are now re-evaluated before victim update instead of continuously. Closes #22226. Tagging #21501.
* Victim update now happens every 1s as opposed to every server tick unless current target goes away.
* Suppressed threat is no longer re-established until the victim gains additional threat (by hitting the target, for instance).
* Assistance threat is now split between non-controlled units threatened by target, as opposed to all units threatened by target.

# Conflicts:
#	src/server/game/Combat/ThreatManager.cpp
2020-07-22 17:44:05 +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
Treeston 7d361cc25c Core/Spell: Remove some leftover hack code from ::EffectSanctuary pertaining to vanish. None of this code did anything anymore.
# Conflicts:
#	src/server/game/Spells/SpellEffects.cpp
2020-07-22 15:08:14 +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 cbd6fb2315 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Spells/SpellInfo.cpp
#	src/server/scripts/Battlefield/BattlefieldWG.cpp
#	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
#	src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
#	src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
#	src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
#	src/server/shared/DataStores/DBCDatabaseLoader.cpp
2020-07-18 22:47:52 +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