Commit Graph
37632 Commits
Author SHA1 Message Date
Shauren dc8bf301bb Core/Auras: Fixed saving auras with same spell id but different item source 2022-09-12 09:15:21 +02:00
PolarCookie b4b8fffa22 Core/Spells: fix issues with delayed spells and auras 2022-09-12 09:15:20 +02:00
HelloKitty 1d013e5d3f Core/Spells: Include RealPointsPerLevel when determining if aura is negative (#22427) 2022-09-12 09:15:20 +02:00
Shauren adfeaa7666 Core/PacketIO: Fixed SMSG_SPELLNONMELEEDAMAGELOG structure 2022-09-12 09:15:20 +02:00
ariel- b1adc269fb Core/Player: partial revert of m_items handling as it's cause of a exploit 2022-09-12 09:15:20 +02:00
ariel- 3a3e70f2b6 Core/Spells: all bleed effects should ignore armor 2022-09-12 09:15:19 +02:00
ariel- f6bb4241f6 Core/Spells: fix another regression with arcane missiles being marked positive 2022-09-12 09:15:19 +02:00
ariel- 80b256795c Core/Spells: always initialize hitinfo aura
Ref 437c5c7b9d2122f7b1f46fd4e0f502c8be1e3091
2022-09-12 09:15:19 +02:00
ariel- 1d1787f70a Scripts/Spells: fix Seaforium Blast script crash 2022-09-12 09:15:19 +02:00
ariel- 82ffeb587b Core/Spells: fix delayed hit aura crash 2022-09-12 09:15:18 +02:00
ariel- 58e418574e Core/Player: properly clear m_items array when unequipping items from the bag
- Also cleanup weapon damage ap mult when direct destroying a equipped weapon
2022-09-12 09:15:18 +02:00
Ovahlord f75fdfef6f warning fix 2022-09-12 09:15:18 +02:00
ariel- 082121cb38 Core/Entities: cleanup of weapon damage
- ScalingStatDistribution/Value (ie heirlooms): apply bonuses in all cases, some calls used nullptr (like after disarm) and item wasn't regaining them
- AP multiplier wasn't correctly reflected after unequipping a weapon
- Correctly set base damages at unequip
2022-09-12 09:15:18 +02:00
ariel- 460c317399 Core/Spells: fix issues with delayed spells and auras
- Was losing info of delayed targets due to remove_if move-assigning targets, it needs to be saved into delayed target vector before returning from lambda
- Delayed auras applying on many targets are now handled gracefully
2022-09-12 09:15:17 +02:00
ariel- 427582b0f7 Core/Spells: only apply aura effects when needed. 2022-09-12 09:15:17 +02:00
ariel- ae23b5d45a Core/Auras: fix nopch 2022-09-12 09:15:17 +02:00
ariel- ee99e76fa9 Core/Auras: fix auras apply on player when loading. Fixes Ghost aura flags and player deathstate 2022-09-12 09:15:17 +02:00
ariel- 55577ad85b Core/Spells: Fix some issues with channeled spells and aura duration mods 2022-09-12 09:15:16 +02:00
ariel- 1725fa9006 Core/Entities: fix creatures ignoring immune flags. 2022-09-12 09:15:16 +02:00
ariel- b3c8d78fa2 Core/Spell: fix SendSpellMiss requiring caster Unit 2022-09-12 09:15:16 +02:00
ariel- c889b81f2c Core/Spell: fix target checks
- Aura will be applied at last moment possible (after damage) to prevent regressions on #18395
- Partial revert of 9b38a6352c0fe2499de54fd769aa1c721a410bda as it wasnt handling correctly checks without spells
2022-09-12 09:15:15 +02:00
ariel- 5e6167ce46 Core/Spells: register and apply individual aura effects on hit handler
- Remove area aura processing from spell system, they're fully handled by aura owner update now
2022-09-12 09:15:15 +02:00
ariel- 9b54c3f842 Core/Spells: tweak 'neutral' spell positivity
- Fixes Mind Control dummy self aura appearing as a debuff
2022-09-12 09:15:15 +02:00
ariel- 1fe5563431 Core/Spells: Fix periodic rolling adding bonuses twice
Calculation is now done in CalculateAmount
2022-09-12 09:15:15 +02:00
ariel- b6fac86b71 Core/Spells: rework part 5: GameObject casting 2022-09-12 09:15:14 +02:00
Ovahlord c901772640 Core/Misc:
* applied character database updates for the caster depenency removal
* corrected implementation of SPELL_ATTR3_SUPPRESS_CASTER_PROCS and SPELL_ATTR3_SUPPRESS_TARGET_PROCS based on master branch
* removed a duplicate SpellAuraInterruptFlags::ActionDelayed removal call
2022-09-12 09:15:14 +02:00
ariel- 4bb8c93df8 Core/Spells: rework part 4: iterate over effects first
Implement far spell queue processing

# Conflicts:
#	src/server/game/Spells/Spell.cpp
2022-09-12 09:15:13 +02:00
ariel- 3fbbea61bd Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime
# Conflicts:
#	src/server/game/Spells/Auras/SpellAuras.h
2022-09-12 09:15:13 +02:00
ariel- 98a988a77a Core/Spells: rework part 2: Split up target selection logic
Target check only determines what kind of entities we can target, spell positivity determines if that entity is valid for attack/assist
2022-09-12 09:15:13 +02:00
ariel- 95bc5dcc40 Core/Spells: rework part 1: Improved positive detection logic
# Conflicts:
#	src/server/game/Spells/SpellInfo.cpp
2022-09-12 09:15:12 +02:00
Ovahlord 36b5e120af build fix 2022-09-12 09:15:12 +02:00
ariel- 2baddd4393 Core/Auras: remove too strict checks in area auras, since a few aren't owned by its caster 2022-09-12 09:15:12 +02:00
Ovahlord 3e89f6c8e3 Core/Scripts: remove hack that caused aura to not be applied and saved twice on owned auras, causing an error on save
- This is handled by group stack rules actually
- Also reset removed aura counter when cleaning removed auras
2022-09-12 09:15:12 +02:00
ariel- 6640641cce Core/Auras: restrict target map update only to area auras as player requires to have auras registered on load 2022-09-12 09:15:12 +02:00
ariel- e23f4e38cf Core/Auras: skip target map update for one world tick if owner is not yet in world 2022-09-12 09:15:11 +02:00
ariel- 9f9f3fa24f Core/Auras: make area and dynauras condition compliant by using the spellarea searcher instead of script searchers 2022-09-12 09:15:11 +02:00
ariel- 3bfa32d15b Core/Unit: kill unused parameter from SpellxxxBonusTaken 2022-09-12 09:15:11 +02:00
ariel- 6024b7b4fb Core/Unit: corrected calculation for SPELL_AURA_MOD_DAMAGE_TAKEN/SPELL_AURA_MOD_HEALING auras
- Spell bonus calculation and penalty was done twice, but it's simply flat +SP, which should be taken into account before other bonuses
- Fixed missing code from SpellDamageBonusDone/SpellHealingBonusDone and killed multiplication by stack amount twice for default coefficient spells (already multiplied on level penalty)
2022-09-12 09:15:11 +02:00
ariel- c81f48197d Core/Spells: calculate crit chance only for spells that do damage/healing 2022-09-12 09:15:10 +02:00
ariel- dc46f0621b Core/Spells: remove 'Vanish Purge' hack, the spell is present on DB and is copy of one in vanilla DBC
Thanks to killerwife for the heads-up
2022-09-12 09:15:10 +02:00
Ovahlord cecaedfb80 Scripts/Misc: added a few pointer checks in JustDied hook overrides 2022-09-12 09:15:10 +02:00
ariel- 64b9b1c28b Core/Spells: kill unused parameter from Spell constructor 2022-09-12 09:15:10 +02:00
ariel- 0d6840ee7f Core/Spell: killed deprecated code which randomly changed powercost for missed spells 2022-09-12 09:15:09 +02:00
ariel- 80ab03a8af Core/Player: only call _ApplyWeaponDamage for actual weapons 2022-09-12 09:15:09 +02:00
Ovahlord 2b9d976ed1 fixed build 2022-09-12 09:15:09 +02:00
ariel- 276d6e49f1 Core/Entities: killed Creature::SetInCombatWithZone and replaced with AI version
Closes #12108 (again)

(cherry picked from commit 7c9722a4ae08b5f283f6a085a411e37604a7da9f)

# Conflicts:
#	src/server/game/AI/SmartScripts/SmartScript.cpp
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
#	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
#	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
#	src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
#	src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
#	src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
#	src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
#	src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
#	src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
2022-09-12 09:15:09 +02:00
Ovahlord 4e3c6bcf6a DB: added a missing spell script name from a cherrypick 2022-09-12 09:15:08 +02:00
Ovahlord 30e219bfa1 Core/Entities: don't allow client control if player is still affected by any lose of control state 2022-09-12 09:15:08 +02:00
ariel- 0f69e644d2 Core/PlayerAI: perform cast checks on auto ranged attack 2022-09-12 09:15:08 +02:00
ariel- c9e732b0bf This hook modifies damage AFTER it has been reduced by target auras/armor/resistances etc, it's useful if you want to scale damage by a factor, but not to add flat bonuses.
We're fixing those by moving calculation to Launch phase, where target taken bonuses haven't been used yet.

- Bronjahm: Magic's Bane
- BPC: Shadow Prison
- Oculus: Shock Lance
- Ymiron: Dark Slash (extra fix, it was wrongly damaging half of total health, it's supposed to be half of CURRENT health!)
- DK: Raise Ally Thrash spell (also extra fix: corrected formula)
- Warrior: Bloodthirst (shouldn't matter much as it's damage class none and those don't get bonuses by default)
- Warrior: Concussion Blow
- Warlock: extra fix for Haunt, healing part shouldn't scale with spell power
2022-09-12 09:15:08 +02:00