Commit Graph

154 Commits

Author SHA1 Message Date
Shauren 07d6eb3a57 Scripts/Spells: Fixed remaining spells with SPELL_ATTR3_CAN_PROC_FROM_PROCS attribute 2023-06-27 22:22:16 +02:00
Shauren f8a6a9b017 Scripts/Spells: Added spell effect validation helper 2023-05-30 19:34:19 +02:00
Shauren f6ab9fd92e DB/Spells: Added proc requirements to a few auras that have SPELL_ATTR3_CAN_PROC_FROM_PROCS attribute 2023-04-01 16:24:14 +02:00
Shauren d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren 78698463ff Core/Spells: Remove all hardcoded restrictions for pick pocket spell effect and rely only on presence of pickpocket loot in db 2022-09-11 14:13:10 +02:00
offl 0408693646 Scripts/Spells: Add comments with id & name of spells part 3
(cherry picked from commit 03c727326d)
2022-03-10 23:52:03 +01:00
Aqua Deus e14f7582cb Scripts/Spells: Convert rogue spell scripts to new script registration syntax (#27752) 2022-02-15 23:52:51 +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 0a1acb9c05 Scripts/Spells: Replace RegisterAuraScript with RegisterSpellScript and remove it
(cherry picked from commit 7d4fbf706a)
2022-02-04 00:27:10 +01:00
Shauren 596bf2b772 Core/Misc: Replace boost::optional with std::optional part 2 2022-01-23 20:31:52 +01:00
Shauren 5be16577f7 Build fix for older boost version 2021-12-25 21:53:47 +01:00
Matan Shukry a3d06f2f32 Scripts/Spells: Implemented various rogue spells (#26319)
* Ruthlessness
* Mastery: Main Gauche
* Venomous Wounds
* Symbols of Death
* Backstab
* Premeditation
* Grand Melee
* True Bearing
* Slice and Dice
* Roll the Bones
2021-12-25 21:25:54 +01:00
Shauren 9fc8c86e9a Scripts/Auras: Lookup aura scripts by their type, not name 2021-10-27 01:01:41 +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 303efcf0e4)
2021-06-19 23:33:25 +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 3b01cccd7e)
2021-06-14 00:19:50 +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
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
Matan Shukry 6b9ff7442e Scripts/Spells: Removed unused rogue spell scriptss (#26157) 2021-02-27 13:50:05 +01:00
Matan Shukry 7159de62b6 Scripts/Spells: Remove const from AuraEffect argument for AuraEffectProcFn 2021-02-13 14:08:16 +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
Shauren 1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren c7306439e7 Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower 2020-06-12 01:29:18 +02:00
Aokromes b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
xinef1 ca26c33145 Implemented binary resistances and some more (#18933)
- Fixed possible exploit with tamed pets having template immunities
- Implemented binary resistances
- Corrected resistances calculations
- Pets properly inherit players spell penetration
- Fixed doubled block calculation for damaging melee spells
- Auras removing snare effects will only remove the snaring component
- Shapeshifting will properly remove movement impairing auras only and not crowd control (dragon's breath)
- Immunities are properly checked versus all schools appearing in spell, unit is immune only if immune to all schools
- Spells with melee and magic school mask should compare armor reduction with resistances and select smaller reduction
- Demonic Circle: Teleport no longer removes root effects

(cherrypicked from 93746e8c4a)
2019-07-21 21:06:54 +02:00
vincent-michael 5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
joschiwald 570da66533 Scripts/Spells: Fixed eviscerate and envenom damage
Closes #21923
Closes #21874
2018-05-12 12:49:12 +02:00
Shauren 007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
vincent-michael 7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
joschiwald b12b37058c Scripts/Spells: Fixed Rogue Stealth SpellScript
Ref #20883
2017-11-18 21:33:46 +01:00
ariel- b86150352d Core/Scripts: added missing null checks for DamageInfo struct
(cherry picked from commit 666422d827)

# Conflicts:
#	src/server/scripts/Spells/spell_dk.cpp
#	src/server/scripts/Spells/spell_mage.cpp
#	src/server/scripts/Spells/spell_paladin.cpp
#	src/server/scripts/Spells/spell_priest.cpp
#	src/server/scripts/Spells/spell_rogue.cpp
#	src/server/scripts/Spells/spell_shaman.cpp
#	src/server/scripts/Spells/spell_warlock.cpp
#	src/server/scripts/Spells/spell_warrior.cpp
2017-09-05 11:57:29 +02:00
ariel- 12646fe4b3 Core/Scripts: fix undefined reference errors in Linux
Closes #19915
2017-06-19 14:34:00 -03:00
Shauren 24b8aa1166 Build fix for VS 2015 2017-06-17 23:26:27 +02:00
Shauren 6c9b5e4cf5 Core/Spells: Fixed Atonement 2017-06-17 15:31:52 +02:00
Shauren 12d0306543 Core/Spells: Use ValidateSpellInfo in all scripts 2017-06-03 01:34:21 +02:00
Shauren 2200b4b0e1 Nopch fix 2017-05-24 21:30:43 +02:00
Shauren c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
tkrokli 65eefebe43 More warning fixes
- unused variables reported by clang in travis-ci
2017-04-26 10:53:38 +02:00
ariel- b7bf703737 Core/Scripts: Convert spells to new proc system
- Converted Unit::HandleDummyAuraProc function to AuraScripts
  * Extra: DMC: Madness now uses DB texts. yay!
  * Extra: improvements on Imp. Spell Reflection (range and max targets, filter caster with conditions)

- Fixed Glyph of Succubus. (Closes #6599)

- Changed old (not-blizz) behavior of Vampiric Embrace:
  * Before: party heal affected the priest too and self heal was reduced by that amount to not over-heal
  * Now: self heal amount not affected, rather filter the priest out of the party heal using conditions :)

- Solve bug in AQ 3p set bonus, it should only trigger when healing others, not self heals.
- Priest T10 2p bonus (heal) now rolls its effect properly

- Use brand new GetEffectiveHeal to fix #17142
- While we're at it, also close #17034 for good
- Converted Unit::HandleAuraProc function to AuraScripts (#17941)
- Converted Unit::HandleAuraProc function to AuraScripts (cont'd) (#17955)
- Corrected Flametongue weapon damage formula
- Actually check offhand weapon for flametongue in Lava Lash script
- Implemented halved proc chance for Missile Barrage on Arcane Barrage, Fireball, Frostbolt and Frostfire Bolt cast
- Converted Unit::HandleProcTriggerSpell function to AuraScripts (#17956)
- De-hack Earth shield. Fixes #13808
- Updated Honor among Thieves
- Implemented mana proc for Mark of Conquest in case of ranged attack
- Fixed Scent of Blood giving more stacks than the talent rank currently learnt.
- Ported old proc table. Proc system is dead. Long live the proc system!
- Recklessness should get charges removed per cast. Closes #15529
- Use proc system to remove Molten Core charges on Incinerate/Soul Fire cast. Closes #15942

Closes #3463
Closes #5401
Closes #15595
Closes #15974
Closes #16679
Closes #17925

(cherry picked from commit 2ff855054f)

# Conflicts:
#	src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
#	src/server/scripts/Spells/spell_dk.cpp
#	src/server/scripts/Spells/spell_druid.cpp
#	src/server/scripts/Spells/spell_hunter.cpp
#	src/server/scripts/Spells/spell_item.cpp
#	src/server/scripts/Spells/spell_mage.cpp
#	src/server/scripts/Spells/spell_paladin.cpp
#	src/server/scripts/Spells/spell_priest.cpp
#	src/server/scripts/Spells/spell_rogue.cpp
#	src/server/scripts/Spells/spell_shaman.cpp
#	src/server/scripts/Spells/spell_warlock.cpp
#	src/server/scripts/Spells/spell_warrior.cpp
2017-04-23 19:01:39 +02:00
Shauren 8f49a32d13 Core/Spells: Removed even more uses of SpellIcon to identify spells 2017-04-03 00:27:16 +02:00
mik1893 5a93f2b974 Core/Spells: Proc handler script converions (#17122)
* Blazing Speed (Mage)
* Blessed Recovery (Priest)
* Druid Forms Trinket
* Idol Of Mutilation
* Nature's Guardian (Shaman)
* Nether Protection (Warlock)
* Piercing Shots and Bonus 4P T9 Hunter
* Lightning Shield (Shaman)
* Acclimation (DK)
* Move DK T10 4P Melee Bonus
* Move DK Improved Blood Presence triggered heal (DK)
* Rogue T10 2P Bonus
* Illumination (Paladin)
* Soul Preserver
* Death Choice trinket
* stack trinket scripts (ToC25 Caster Trinket, Lightning Capacitor, Thunder Capacitor)
* Battle Experience (ICC - Gunship)
* Blood Reserve (enchant proc)
* Darkmoon Card Greatness
* Charm of the Amani Witch Doctor
* Mana Drain

(cherry picked from commit 5b8e68ee63)
2017-01-08 22:37:18 +01:00
vincent-michael 86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Ivan Beňovic 8ff5b35be1 Core/Spells: Add SpellMissInfo argument to BeforeHit hooks and call them also when the spell doesn't hit. (#17613) 2016-07-20 09:08:58 +02:00
Shauren d92f529d93 Core/Spells: Fixed Stealth and Vanish
Closes #15779
2016-04-29 21:21:58 +02:00
Shauren cc262ec12e Core/Spells: Updated Eviscerate and Envenom formulas
Closes #16886
Closes #16887
2016-04-29 20:05:41 +02:00
ccrs 7672ca1945 Core/Spells: Rogue Honor Among Thieves
(cherry picked from commit 983bbe4a4c)
2016-04-05 18:36:57 +02:00
Shauren 70412e7e25 Core/Misc: MSVC warning fixes 2016-04-05 00:15:56 +02:00
Vincent-Michael 478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Vincent-Michael 00b4e8b6cc Scripts: Added missing overrides 2015-11-15 03:38:02 +01:00
Shauren 675a2fcd3b Core/Util: Fixed flag128 and removed flag96 - previously if flag128 and flag96 were used in together the result was always a bool instead of expected flag result due to implicit boolean conversion 2015-04-27 00:33:27 +02:00
Shauren 56186319bd Core/Spells: Cooldown updates
* Refactored cooldown handling to separate class shared by creatures and players
* Updated and enabled cooldown packets
* Implemented creature school lockouts
* Implemented spell charges
* Fixed AuraUpdate structure
* Fixed aura flag AFLAG_NOCASTER handling
* Implemented spell charge related auras
2015-02-17 01:01:44 +01:00