Commit Graph

1093 Commits

Author SHA1 Message Date
ariel-
01d9306854 Core/Spells: kill unused parameter from Spell constructor
Added in 1f2292af79

(cherry picked from commit 9fc732eb97)
2021-06-19 23:33:23 +02:00
ariel-
c43f61df3d Core/Spell: killed deprecated code which randomly changed powercost for missed spells
Added in 80d3cd43f6

Closes #5954

(cherry picked from commit b1072faa50)
2021-06-16 21:40:33 +02:00
ariel-
d0f4310c44 Core/Entities: don't allow client control if player is still affected by any lose of control state
(cherry picked from commit e315e41d36)
2021-06-16 21:26:57 +02:00
ariel-
84a29d8077 Core/Unit: fixed crash
Closes #21231

(cherry picked from commit 22b24d8dae)
2021-06-14 01:19:38 +02:00
ariel-
fccf1a8c62 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling

Closes #19876

(cherry picked from commit cb9e72e521)
2021-06-13 00:59:13 +02:00
Shauren
0b2087ae41 Core/Criteria: Add all values of CriteriaStartEvent 2021-06-01 21:16:41 +02:00
Shauren
6ecfe58cae Core/Maps & Extractors: Move copypasted map file headers into a single shared file and replace #defines with enums 2021-05-29 21:21:37 +02:00
xinef1
1912999b9e Core/Spells: Defined and implemented some new spell attributes (#18950)
(cherry picked from commit 23823f5147)
2021-05-16 21:56:07 +02:00
ariel-
83159544b5 Core/Spells: fix casting NO_TARGET event spells
Closes #19978

(cherry picked from commit e245113660)
2021-05-16 21:56:05 +02:00
Treeston
34c7810fe5 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.

(cherry picked from commit 532ab1c7f8)
2021-05-16 21:56:01 +02:00
Shauren
5a9a3b3938 Core/Spells: Load SpellEffectInfo::ChainTargets as signed (there are negative values found in db2) 2021-05-15 02:13:45 +02:00
Shauren
1a7779a6e6 Core/Spells: Expose number of targets selected for each spell effect to scripts to allow implementing spells that do something depending on number of targets hit 2021-05-13 00:38:09 +02:00
ariel-
b426e64c39 Core/Entities: fix crash
- m_currentSpells and spell would be different in case cancelation of a channeled spell would remove the aura, and aura scripted to cast another channeled spell on remove
- In the above situation, we would lose reference of currentSpell and remove reference from wrong one, this was fixed by clearing the pointer before spell cancelation.

Closes #20172

(cherry picked from commit 5e284d4b38)
2021-04-27 23:56:35 +02:00
Matan Shukry
60df74933f Core/Spells: Removed extra health from feed pet (#26305) 2021-04-22 22:02:19 +02:00
Matan Shukry
2e2dc1afc9 Core/Spells: Added spell value duration to modify aura duration of a specific spell cast 2021-04-21 23:14:02 +02:00
Shauren
8eb3c61f1a Core/Misc: Fix cherry-pick errors 2021-04-16 15:23:04 +02:00
Treeston
9b141207d1 [3.3.5] CastSpell unclusterfucking (that's a word now) (#21123)
Core/Spell: The giant CastSpell unclusterfucking (that's a word now) of this generation.

- CastSpell now always takes three arguments - target, spellId, and a struct containing extra arguments
- This struct (CastSpellExtraArgs, see SpellDefines.h) serves as a conglomerate of every previous combination of the 20 billion different CastSpell overloads, all merged into one
  - It has some great utility constructors - check them out! All of these can be used to implicitly construct the ExtraArgs object.
- A gajillion refactors to make everything behave the way it always has

(cherry picked from commit d507a7e338)
2021-04-16 15:22:42 +02:00
Jeremy
446fc391f0 Core/Entities: Fix some weird movement due to los issues (#21125)
* Core/Entities: Fix some weird movement due to los issues
- Made LoS check use collisionHeight instead of midsection. Value was too low.
- Gnomes will now have a breath bar more quickly than for example a tauren.
- Changes have been made to checking for ground z as well, some tweeking might be needed but removed most of the scattered +2.0f/+0.5f/we
* Add 0.05f to isInAir check in Creature::UpdateMovementFlags

(cherry picked from commit e42903ec16)
2021-04-15 05:53:27 +02:00
ariel-
bebc20b4de Core/Spell: implement SPELL_FAILED_AURA_BOUNCED on DR spells
Closes #13695

(cherry picked from commit 5e2c5a52cd)
2021-04-15 05:53:27 +02:00
Shauren
9619f7c283 Core/Spells: Fixed spell channel object selection
Closes #21227
2021-04-14 00:01:35 +02:00
Robingad
f8255b1541 Core/Script: Implement CalcCritChance hooks for spell and aura scripts (#26116)
(cherry picked from commit AshamaneProject/AshamaneCore@4e0a3f4343)
2021-03-25 21:28:22 +01:00
Shauren
07a47947e2 Core/Spells: Defined and implemented new spell interrupt flags 2021-03-24 23:36:53 +01:00
Shauren
29169181cd Core/Spells: Defined more spell attributes 2021-03-21 17:51:23 +01:00
Shauren
9b5a46ca2b Core/Auras: Defined and implemented many new interrupt flags 2021-03-21 12:05:32 +01:00
Shauren
6585666e6e Core/Spells: Define all spell modifier types and implement ProcCooldown mod and PeriodicHealingAndDamage for melee periodic damage 2021-03-15 21:03:06 +01:00
Shauren
16135b5096 Core/Spells: Changed channel triggered spells to inherit positive/negative status from main spells
Closes #18259
Closes #21041

(cherry picked from commit 6122006b0c)
2021-03-15 20:17:31 +01:00
Shauren
efdca47aff Core/Auras: Remove m_effIndex member of AuraEffect and always take it from SpellEffectInfo 2021-03-11 10:32:03 +01:00
Shauren
0960308cfc Core/Spells: Add Spell::HasPowerTypeCost to check which power types a spell uses 2021-03-04 22:46:44 +01:00
Shauren
a05fc3ded5 Core/Spells: Updated spell effect type definitions to match latest client version 2021-03-04 20:30:50 +01:00
Shauren
624881bef5 Core/Spells: Refactor Player::ApplySpellMod to take SpellInfo argument instead of just spell id 2021-03-02 21:32:48 +01:00
Ovah
b77c9d7a8c Core/Spells: Gathering no longer fails after patch 3.1.0 (#21039)
* Core/Skills: gathering items with orange skill level will no longer fail as it has been removed with patch 3.1.0

Closes #21038

(cherry picked from commit 51bcd1a918)
2021-02-25 18:50:55 +01:00
Matan Shukry
23aa13257a Core/Spells: Fixed spells using SPELL_EFFECT_POWER_BURN not working when combined with other effect types that hit other units and power burn hits caster (#26097) 2021-02-23 00:16:02 +01:00
Shauren
51a9d2a9c2 Core/Auras: Implemented new spell modifier type to change aura stack size on apply 2021-02-21 18:36:18 +01:00
Shauren
dd31b36291 Core/Spells: Fix typo (fixes casting all spells) 2021-02-21 18:07:42 +01:00
Shauren
ac1ef5efbe Core/Auras: Implemented SPELL_AURA_DISABLE_ATTACKING_EXCEPT_ABILITIES 2021-02-21 16:10:48 +01:00
Shauren
1b8ef46808 Core/Auras: Reimplement SPELL_AURA_DISABLE_CASTING_EXCEPT_ABILITIES to properly allow casting listed spells 2021-02-21 16:10:22 +01:00
Shauren
bd7c714c97 Core/Auras: Rename many old aura types to their new meaning 2021-02-21 15:16:55 +01:00
Matan Shukry
0cae71eac5 Core/Spells: Adding SpellTargetObjectTypes to spell target checker to early-eliminate alive units (#26028)
* Added object type into checker that is used by grid search to early eliminate alive units when looking for corpses
* Removed script 'spell_hun_pet_carrion_feeder'. Ability doesn't exist anymore
2021-02-05 21:29:00 +01:00
Shauren
d697882dfb Core/Auras: Renamed a bunch of unknown or changed spell aura types and implemented some of them 2021-02-03 19:25:30 +01:00
Shauren
b2ddf547ff Core/Spells: Defined new spell attributes 2021-01-15 14:21:02 +01:00
Chaouki Dhib
540678be06 Core/Spells: Core/Spells: Improve teleport destination for a certain class of spells (Killing Spree, Shadowstep, ...) (#20434)
Close # 8758

(cherry picked from commit 9dbef4b6bb)
2020-12-31 23:23:50 +01:00
Shauren
b82a3a557a Core/DataStores: Updated db2 structures to 9.0.2
* Includes support for new character customization
2020-12-08 18:16:47 +01:00
Shauren
7f6eef37e6 Core/Spells: Use new spell visual structure instead of just SpellXSpellVisualID 2020-12-08 18:16:46 +01:00
Shauren
cab4c87d2d Core/PacketIO: Updated most packet structures to 9.0.1 2020-12-08 18:16:41 +01:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Gustavo
6135ee20a9 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

(cherry picked from commit e9cd7af2df)
2020-08-22 21:13:01 +02:00
treeston
bacc5ef94e Creatures now release spell focus on projectile launch (for spells that have a projectile portion) as opposed to projectile impact.
This should make some very slow projectiles (f.ex. Professor Putricide's Malleable Goo) a lot smoother.

(cherry picked from commit 5d3c69bf44)
2020-08-18 18:53:13 +02:00
Ovah
71db17220a Core/Spells: enable and implement SMSG_MISSILE_CANCEL (#25215) 2020-08-16 12:07:51 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Treeston
8be23fcbbd [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.

(cherry picked from commit e2a1ccd118)
2020-08-13 22:46:44 +02:00