Commit Graph
994 Commits
Author SHA1 Message Date
Shauren d7302ffd14 Core/Scenes: Implemented spell created SceneObjects 2021-10-11 12:59:19 +02:00
Shauren 3fe9b0a296 Core/Conversations: Replace _participants with generic personal object implementation 2021-10-09 13:30:47 +02:00
ModoX 00dd4629bd Core/Scenes: Defined more flags and implemented FadeToBlackscreenOnCancel (#26975) 2021-10-05 22:36:22 +02:00
Meji 0cfd14d2a0 Core/BattlePets: Misc fixes (#26990)
* Define BattlePetBreedQuality enum class.
* Check the quality of the battle pet species in battle_pet_quality table to avoid invalid values.
* Set CurrentBattlePetBreedQuality and WildBattlePetLevel update fields with the data of the summoned battle pet.
* Added function to calculate the WildBattlePetLevel of wild battle pets according to their spawn zone.
2021-10-03 21:20:45 +02:00
Shauren cbf1f2883a Core/Spells: Reduce number of CastSpell overloads to 1 2021-10-03 19:58:03 +02:00
Shauren 555b2d40ec Core/Spells: Send OriginalCastId in SMSG_SPELL_START and SMSG_SPELL_GO for triggered spells in 'game' project 2021-10-03 16:36:39 +02:00
Shauren 3af9be830d Core/Spells: Removed CastSpellExtraArgs constructors accepting ObjectGuid, they would become ambiguous with future changes 2021-10-03 14:58:35 +02:00
Meji de4eaa0de9 Core/BattlePets: Misc fixes (#26964)
* Define BattlePetSpeciesFlags enum class.
* Define BattlePetDbFlags enum class.
* Added check to prevent the pet from being caged if its species has flag BattlePetSpeciesFlags::NotTradable.
* Added check to prevent the pet from being caged if it's in battle pet slots.
* Added check to prevent the pet from being caged if its health is below maximum health.
* Only add pet if the species has flag BattlePetSpeciesFlags::WellKnown.
* Added function to check flag BattlePetSpeciesFlags::LegacyAccountUnique to avoid learning copies of unique pets.
* Implemented CMSG_BATTLE_PET_CLEAR_FANFARE.
2021-09-29 22:26:25 +02:00
ccrs 426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2)
2021-09-28 00:15:13 +02:00
Keader 69663cc94f Core/Spells: Fix UNIT_CREATED_BY_SPELL in SPELL_EFFECT_SUMMON (#21756)
(cherry picked from commit 309738dc3e08f572fad661e96f149a017011758c)
2021-09-23 23:50:13 +02:00
Treeston bc89e1cdb0 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2ffed5ba2a0336e9c93962b0fad9eaa)
2021-09-23 22:21:29 +02:00
ariel- a2ea26816e 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

Closes #21578
Closes #21579
Closes #21581

(cherry picked from commit d6b9f148a772d07b9353a0db95a6f05c9c848a63)
2021-09-05 22:43:48 +02:00
ariel- c07b9188df 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

Closes #21577

(cherry picked from commit 4ca9d6469da435cb818e3b56840669775627e050)
2021-09-05 15:19:55 +02:00
Shauren 8a4e1119ac Core/Spells: Unify spell effect access api in both branches 2021-09-04 15:13:15 +02:00
Shauren 6031b95ea7 Core/Spells: Remove outdated damage calculations from Spell::EffectSchoolDMG and Spell::EffectWeaponDmg 2021-08-30 21:21:51 +02:00
Shauren aebf308368 Core/Spells: Fixed Spell::EffectWeaponDmg for spells with multiple damage effects
Closes #26717
2021-08-28 19:53:53 +02:00
Shauren 3dd75a49b1 Core/Spells: Removed SpellEffIndex effIndex argument from spell effect handlers, it was commented out in almost every handler 2021-08-28 19:51:29 +02:00
Shauren bc2c76a5b8 Core/Spells: Refactor building SMSG_SPELL_EXECUTE_LOG to not create 192 empty vectors on every spell cast 2021-08-28 18:30:45 +02:00
ariel- 962f6d7988 Core/Spells: rework part 5: GameObject casting
Closes #21330
Closes #18885
Ref #18752

(cherry picked from commit 45c5e1b9d63796d168339a44f63418f220cf2403)
2021-08-28 15:59:11 +02:00
ariel- 65dca120d3 Core/Spells: rework part 4: iterate over effects first
Ref #18395

Implement far spell queue processing
Closes #7395

(cherry picked from commit 080d2c6cd439acb2059adc4e24a279de98aa0db6)
2021-08-28 15:59:11 +02:00
ariel- f3548d45d0 Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime
Closes #15088

(cherry picked from commit e8d5aa56cc48572d81e1898b7b4ff10cfa6d1957)
2021-08-28 15:59:11 +02:00
Jeremy 69edf282fa Partial: Core/Entities: Reduce the probability of units dropping under the map (#21322)
Reduce the probabilty of going under the map

(cherry picked from commit 9e0faace9a5114fc2324c2c601ba943272e0d6ff)

Revert "Core/Entities: Reduce the probability of units dropping under the map (#21322)"

(cherry picked from commit 2dadbda24ac1c2e6ff3dad650c7e25f4b3322342)
2021-08-08 21:21:34 +02:00
Shauren fcead0b4ea Core/Spells: Use caster as chat source in Spell::EffectSendChatMessage 2021-08-08 18:15:00 +02:00
Shauren ce1046a8fd Core/DataStores: 9.1.0 db2 structures 2021-08-08 00:18:10 +02:00
ariel- 15810eb579 Core/Unit: kill unused parameter from SpellxxxBonusTaken
(cherry picked from commit c7095375c37c3812d14fbc865b95c8442b8712cf)
2021-06-20 01:09:20 +02:00
ariel- 3485cb38ed 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

(cherry picked from commit 303efcf0e4ee9ce3cfe308a3d6aa2aece1aa39da)
2021-06-19 23:33:25 +02:00
ariel- f9b14ca795 Core/Spells: fix logic error causing near teleports to drop combat for players
Closes #21362

(cherry picked from commit 65709e1c3081c97442792695cbc0f0826015d625)
2021-06-19 23:33:24 +02:00
ariel- d34292534c Core/Spells: fix SPELLMOD_DAMAGE application order for melee spells
Closes #20597

(cherry picked from commit 2d2c43f4b91fef6fcd4d8c069a9bb41d66c97efe)
2021-06-19 23:33:23 +02:00
ariel- 5fbddef85f Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct

(cherry picked from commit 3b01cccd7eafaff9f3b8236a544e4fa46818926c)
2021-06-14 00:19:50 +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 cb9e72e521d3cc415dd15bf6912c87f89e41b92a)
2021-06-13 00:59:13 +02:00
xinef1 1912999b9e Core/Spells: Defined and implemented some new spell attributes (#18950)
(cherry picked from commit 23823f5147e808928e1d8cd31b6cdf31753ef14d)
2021-05-16 21:56:07 +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 532ab1c7f8653d1a2e48aa1f1f8a9ba1041d4bb7)
2021-05-16 21:56:01 +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
Shauren fb66575d38 Core/Grids: Move packet sending functionality out of MessageDistDeliverer and into separate, customizable class and unify LocalizedPacketDo, LocalizedPacketListDo as generic localizable action 2021-05-01 20:16:10 +02:00
Shauren 3a37a2e0d7 Core/Grids: Allow customizing packets sent with MessageDistDeliverer and MessageDistDelivererToHostile depending on receiver
* Switch combat log sending to that implementation
2021-04-30 00:08:07 +02:00
Shauren 4e00cb7c15 Core/Spells: Fix feed pet effect after wrong merge conflict resolution 2021-04-22 22:57:00 +02:00
Matan Shukry 60df74933f Core/Spells: Removed extra health from feed pet (#26305) 2021-04-22 22:02:19 +02:00
Matan ShukryandShauren a8fa2a03be Core/Items: Calculating item level + organized iterating over items (#26276)
* Unified iterating player items into a single function

Co-authored-by: Shauren <[email protected]>
2021-04-21 10:02:42 +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 d507a7e3388382960108b24143da48e5f912b4a7)
2021-04-16 15:22:42 +02:00
Treeston 76b2d37259 Core/Spell: Remove some leftover hack code from ::EffectSanctuary pertaining to vanish. None of this code did anything anymore.
(cherry picked from commit 3a536260f8cd6565726bf82e56dcb58b513b6331)
2021-04-15 05:53:27 +02:00
Shauren 2398c1e23c Core/Spells: Implemented SUMMON_PROP_FLAG_PERSONAL_GROUP_SPAWN 2021-03-28 20:22:05 +02:00
Shauren 46a81ea1f4 Core/Spells: Add missing privateObjectOwner support to Spell::SummonGuardian 2021-03-28 20:22:05 +02:00
Shauren 33b3ebcae6 Core/Objects: Pass privateObjectOwner guid directly to SummonCreature functions 2021-03-28 20:22:05 +02:00
Matan Shukry 1082a6645e Core/Objects: Move personal summon handling from TemporarySummon/GameObject to WorldObject and check it using dedicated guid field 2021-03-28 20:22:05 +02:00
Matan Shukry 1c852af7f2 Core/Spells: Implement SPELL_EFFECT_TELEPORT_TO_RETURN_POINT (#26217) 2021-03-28 00:22:34 +01:00
Shauren 07a47947e2 Core/Spells: Defined and implemented new spell interrupt flags 2021-03-24 23:36:53 +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 34768c5b44 Core/Spells: Implemented SPELL_EFFECT_PLAY_SCENE_SCRIPT_PACKAGE and SPELL_EFFECT_CREATE_PRIVATE_CONVERSATION 2021-03-04 20:31:08 +01:00
Shauren a05fc3ded5 Core/Spells: Updated spell effect type definitions to match latest client version 2021-03-04 20:30:50 +01:00