Commit Graph

2242 Commits

Author SHA1 Message Date
Shauren d945a118db Core/Auras: Implemented SPELL_AURA_DISABLE_INERTIA (506) 2022-02-25 12:37:04 +01:00
Shauren 9f30afe352 Core/PacketIO: Updated packet structures to 9.2.0 2022-02-24 23:16:55 +01:00
Aqua Deus 1a0341ccbd Core/Auras: Implement SPELL_AURA_IGNORE_DUAL_WIELD_HIT_PENALTY (#27786) 2022-02-17 18:14:42 +01:00
Aqua Deus 64e8e11377 Core/Auras: Fix SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC for effects mechanics (#27783)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-02-16 21:56:49 +01:00
Aqua Deus f205a89c86 Core/Spells: Implement spell attribute SPELL_ATTR3_NO_DURABILITY_LOSS (#27750)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-02-15 23:36:18 +01:00
Shauren ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
Shauren 02979daf76 Core/Auras: Proc flag updates
* Rename to official names
* Corrected logic selecting flags for each spell cast - determine them by attributes instead of DmgClass
* Implemented new proc flags (PROC_FLAG_CAST_ENDED, PROC_FLAG_LOOTED)
2022-02-10 21:11:07 +01:00
Shauren 7295bfb6a0 Core/Spells: Implemented using db2 PositionFacing for SPELL_EFFECT_LEAP_BACK
Closes #19717
2022-02-10 18:20:38 +01:00
Shauren 7ff411013c Core/Auras: Implemented ProcFlags2 2022-02-10 12:38:31 +01:00
Shauren 68a662ae04 Core/Spells: Add type safety to proc related functions - using enum arguments instead of plain integers 2022-02-10 12:25:27 +01:00
Shauren 3844c79adb Core/Spells: Load entire proc flags array from db2 2022-02-09 23:46:29 +01:00
Aqua Deus d22d461633 Core/Spells: Implement SPELL_ATTR7_NO_ATTACK_DODGE, SPELL_ATTR7_NO_ATTACK_PARRY and SPELL_ATTR7_NO_ATTACK_MISS (#27715)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-02-07 20:53:32 +01:00
NoName ee620856ad Core/Movement: Corrected Animation Tier handling (PR #24875)
Co-authored-by: Warpten <vertozor@gmail.com>
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit dad187615d)
2022-02-05 15:40:31 +01:00
Giacomo Pozzoni b45277f1cf Core/Unit: Fix units on vehicles not dismounting on death (#25404)
* Core/Unit: Fix units on vehicles not dismounting on death

Closes #23095
Issue added in 982643cd96

* Remove leftovers from previous tries

(cherry picked from commit ff26027453)
2022-02-05 13:08:34 +01:00
Shauren 04021a30ba Core/Players: Directly store PlayerSpell in m_spells, not as pointer
Closes #25402

(cherry picked from commit 1e446b021b)
2022-02-05 13:07:25 +01:00
Treeston 4d62cc70d6 Scripts/Commands: Convert argument parsing of .npc commands
(And I snuck some chat command cleanup in there, more de-cluttering!)

(cherry picked from commit 88d446dadf)
2022-02-05 00:43:55 +01:00
Jinnaix 6830d883ad Core/Unit: send npcs home after fear runs out (#25347)
* Core/Unit: send npcs home after fear runs out

* Whoops, wrong

(cherry picked from commit 7e6f17a701)
2022-02-04 12:19:36 +01:00
Treeston 9f97fdd31a Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)
(cherry picked from commit 534a2388b7)
2022-02-04 00:27:14 +01:00
robinsch 5ba95cb42f Core/Unit: Fixed race condition when loot recipient is in different map (#25312)
(cherry picked from commit aaa089ab7f)
2022-02-04 00:27:12 +01:00
Shauren 950db60435 Core/Pets: Updated pet summoning for latest client version (5 Call Pet spells and stable size 200) 2022-02-02 00:08:37 +01:00
Shauren e102022eeb Core/Pets: Fixed crash happening when summoning a different pet than one that was unsummoned by summoning a guardian (imp -> infernal -> felhunter)
Closes #25478

(cherry picked from commit d29274f3a1)
2022-01-31 00:23:57 +01:00
Shauren ca92686b44 Core/Pets: Pet management refactoring (#25191)
* Core/Pets: Pet management refactoring

* Preload basic pet data on character login with async query
* Load additional pet data (declined names/auras/spells/cooldowns) using async query after we are sure pet loading will succeed
* Remove all select queries related to pet stable/unstable
* Remove all silent pet deletions except explicit UI-triggered abandons
* Fixed displaying stable master content when current pet is not summoned
* Allow to stable/swap unsummoned current pet

Closes #3610
Closes #21266

(cherry picked from commit 5c1fc5e387)
2022-01-31 00:17:21 +01:00
Robingad 1696d73860 Scripts/Spells: Move shaman Lava Burst crit chance calculation to scripts and add Lava Burst Overload (#27676) 2022-01-27 23:23:37 +01:00
Peter Keresztes Schmidt 2e3c612c80 Core/Unit: Make HandleEmoteCommand typesafe (#25249)
* Scripts/ScarletMonastery: Fix wrong emote during Headless Horseman encounter

* Scripts/HoR: Fix wrong emote during escape event

* Core/Unit: Make improve type safety of HandleEmoteCommand

Change argument type to the expected enum type Emote

* Scripts/CoS: Use SetUInt32Value to set UNIT_NPC_EMOTESTATE

UNIT_NPC_EMOTESTATE is no flag field

(cherry picked from commit 6c7837f947)
2022-01-26 21:46:51 +01:00
Ovah 2819951dce Core/Units: add new functionality for units to block or enable combat interactions (#25168)
* Core/Units: add new functionality for units to block or enable combat entirely via helper to reflect what CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT and client AI functions imply

* yeah...

* Nuke Creature::IsCombatDisallowed helper as its unused by now

* no combat extra flag may now be changed on transforms if the transformed entry does not have the flag

(cherry picked from commit 764f22fc91)
2022-01-26 18:41:41 +01:00
jackpoz a706c60828 Core/Misc: Code cleanup
(cherry picked from commit 3c28573d02)
2022-01-26 18:12:13 +01:00
Jinnaix adfb050551 Core/Unit: Creatures' minions now engage in combat if their controller is attacked (PR #25219)
Closes #24340

(cherry picked from commit db9072a183)
2022-01-26 18:10:57 +01:00
Giacomo Pozzoni 864d775280 Core/Misc: Fix static analysis issues (#25194)
(cherry picked from commit 07fd84b679)
2022-01-26 14:06:40 +01:00
Peter Keresztes Schmidt 44ea32ace4 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
2022-01-23 22:16:15 +01:00
Peter Keresztes Schmidt ad340466d0 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006
(cherry picked from commit 85b5b842ca)
2022-01-23 22:02:03 +01:00
Treeston d11c3807b3 Core/Time: Rename GetGameTime{System, Steady}Point methods
The names are a bit unhandy. Rename them (shorter but still meaningful).

GetGameTimeSystemPoint() -> GetSystemTime()
GetGameTimeSteadyPoint() -> Now()

Also add 2 new typedefs:

typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;

Closes #25042

(cherry picked from commit 896b68d5c2)
2022-01-23 21:36:03 +01:00
Shauren 596bf2b772 Core/Misc: Replace boost::optional with std::optional part 2 2022-01-23 20:31:52 +01:00
Shauren b4952db464 Core/Units: Named unit flags linked to CreatureDifficulty flags 2022-01-22 13:21:15 +01:00
jackpoz 68faf5bc4b Core/Common: Replace ASSERT(false, "...") with ABORT_MSG("...")
(cherry picked from commit 54c701cf0d)
2022-01-19 22:17:42 +01:00
Jeremy bbed5dc3e8 Core/Auras: Store non-unit caster guids in auras (#27625)
This allows retrieving any caster object, not just units
2022-01-18 21:18:25 +01:00
Shauren 3346366b0e Core/Auras: Fixed invalid iterator access in SPELL_AURA_TRIGGER_SPELL_ON_HEALTH_PCT implementation 2022-01-17 10:31:17 +01:00
Shauren 5889ab893e Core/Units: Fixed crash happening when despawning summoned units whose owner is no longer in world
Closes #27598
2022-01-12 12:50:17 +01:00
Keader 4110a06e81 Core/Misc: Fixed resistance calculate for Mutated Transformation and Twilight Bloodbolt (#24717)
Ref: 9f7b464a6a
- Implemented a new SpellScript hook that allow control Resistance/Absorb amount of a damage spell.

(cherry picked from commit d81a9e5bc3)
2022-01-06 19:59:50 +01:00
Ovah 294657f7dd Core/Units: flight and hover checks will now consider movement template data as well as manually set flight states
- manually set flight states via auras and scripts will no longer be ignored
- restored movement template consideration when generating pathings
- renamed IsLevitating to IsGravityDisabled to reflect the referenced movement flag's name

(cherry picked from commit 43ef610fe0)
2022-01-06 19:46:41 +01:00
jackpoz 5af8373cce Core/Misc: Fix Clang 10 build warnings
(cherry picked from commit 48c5c0d7a2)
2022-01-06 19:46:22 +01:00
Giacomo Pozzoni 9cb01a7904 Fixes/3.3.5 aura infinite loop (#24631)
* Core/Auras: Attempt to fix infinite loop with aura 18950 on map unload

* Core/Auras: Log a detailed error and assert when failing to remove all auras after a few tries

* Code cleanup

* Fix build warnings

* Fix more build warnings

(cherry picked from commit bd2d60c267)
2022-01-04 15:33:04 +01:00
HelloKitty 406c7219ad Further improve ChrRace DBC handling (#24508)
* Core/DBC: Added ChrRacesAllianceType for ChrRaces.dbc

* Core/Character: Check ChrRace DBC playable in HandleCharCreateOpcode

* Core/DBC: Implement ChrRacesFlags removing literals

Cannot take credit for this enum, derived from documentation in
https://wowdev.wiki/DB/ChrRaces

* Core/Character: Check CHRRACES_FLAGS_NOT_PLAYABLE on creation

* Core/DBC: Fix formatting of ChrRaces enums

* Core/DBC: Use ChrRaces CreatureType instead of hardcoded humanoid assumption

* Address enum style code changes

(cherry picked from commit 43b595111d)
2022-01-04 15:33:04 +01:00
Shauren d30e4a20e5 Core/Misc: Define and use ChrRacesFlag and CreatureModelDataFlags (ref 772f506a3b) 2022-01-02 19:14:32 +01:00
Shauren d56d92fbe7 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

(cherry picked from commit 1fecbc6892)
2022-01-02 16:17:18 +01:00
Shauren 6413466693 Core/Spells: Relaxed aura exclusivity check to allow casting spells that have other, non-aura effects even if aura will not be applied
Closes #24553

(cherry picked from commit 829cf38c67)
2022-01-02 00:30:31 +01:00
Shauren 679e9910e0 Core/Auras: Prevent getting negative scale with auras
Closes #24040

(cherry picked from commit 50576fa1f5)
2022-01-01 22:49:58 +01:00
Shauren c9443f190a 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

(cherry picked from commit 43d9ffd1bc)
2022-01-01 22:27:05 +01:00
Ovah d18d2b84f2 Core/Objects: cache current liquid status of objects when updating position data and use it to replace unnecessary vmap lookups (#24399)
* dropped unneeded IsUnderwater override for players since the default position data update considers collision height already so we don't have to rely on that tempfix anymore. This actually fixes breathing bars showing up depending on your characters size (gnomes get their breathing bar earlier, taurens later etc)

(cherry picked from commit bea850fb73)
2022-01-01 12:42:17 +01:00
Giacomo Pozzoni 6ec933f281 Core/Logs: Log full guid instead of just low guid
(cherry picked from commit 468ecb7252)
2021-12-31 21:56:40 +01:00
aquadeus 9cc3cd128c Core/Auras: Implement SPELL_AURA_MOD_MELEE_DAMAGE_FROM_CASTER (343) (#27491) 2021-12-30 12:08:02 +01:00