105 Commits

Author SHA1 Message Date
Shauren
605e5f94c0 Core/Creatures: Moved autoattack handling from scripts to game 2024-01-08 22:23:12 +01:00
ModoX
0e2f041728 Core/InstanceScript: Refactored door types to reflect its behavior (#29406) 2023-11-06 00:11:42 +01:00
Shauren
2e7e49b749 Scripts/Spells: Removed unneccessary PrepareSpellScript and PrepareAuraScript uses 2023-07-24 10:48:50 +02:00
Meji
889e88ab80 Core/Spells: Fixed target radius logic in spell effects for TargetB (#29158) 2023-07-20 10:10:18 +02:00
Shauren
622eed752b Scripts/Spells: Converted remaining spell scripts to use ValidateSpellEffect 2023-06-03 23:17:28 +02:00
Shauren
46e0056196 Scripts/Instances: Add dungeon encounter data 2022-10-04 00:19:38 +02:00
offl
99a47c40b2 DB/Instance/Gruul's Lair: Overhaul
(cherry picked from commit cdb7904182)
2022-03-06 22:48:56 +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
Peter Keresztes Schmidt
c4098897a8 game/AI: Convert SelectAggroTarget to enum class (#24818)
* game/AI: Convert SelectAggroTarget to enum class

* game/AI: Rename SelectAggroTarget to SelectTargetMethod

(cherry picked from commit 418c3b1fd5)
2022-01-06 21:53:27 +01:00
ForesterDev
3171cd3fa9 Core/AI: refactor SpellHit and SpellHitTarget. (#24691)
* Core/AI: refactor SpellHit and SpellHitTarget.

- now caster/target is WorldObject instead of Unit
- remove SpellHitByGameObject / SpellHitTargetGameObject (handled by SpellHit / SpellHitTarget)
- rename parameters in scripts according parent methods

* Restore logic in Algalon script

* Changed check for REMORSELESS_WINTER hit to avoid dublicate call, because it has TARGET_UNIT_CASTER for effects 0/1 and TARGET_GAMEOBJECT_SRC_AREA for effect 2

* Fix build after merge

(cherry picked from commit e3b232fe0e)
2022-01-06 20:46:25 +01:00
Shauren
5d02739b98 Scripts: Fix rbac permission for skipping default boss sequencing check
(cherry picked from commit e660c8bc19)
2021-12-20 21:40:47 +01:00
Giacomo Pozzoni
fff0d174aa Scripts/Misc: Fix LoadMinionData() dynamic analysis issues
Fix issues reported by Address Sanitizer about LoadMinionData() calls on arrays that don't end with a {0, 0} pair.

(cherry picked from commit 08dcee0cf9)
2021-11-18 22:53:21 +01: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
Shauren
8a4e1119ac Core/Spells: Unify spell effect access api in both branches 2021-09-04 15:13:15 +02:00
Treeston
bce43de7f3 Core/AI: Some more refactoring prep for #19930. CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now.
(cherry picked from commit 6113b9dec2)
2021-04-16 20:22:13 +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
jackpoz
388034498f Core/Misc: Fix static analysis issues
(cherry picked from commit 9b7c73a19d)
2021-02-06 21:41:51 +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
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
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
jackpoz
70c2b4e5ba Scripts/GruulsLair: Fix indentation
(cherry picked from commit 9d77b2be3b)
2020-04-26 00:51:55 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
9ffabae6bf Scripts/Misc: Use InstanceMap* in InstanceScript instead of Map* 2018-06-16 17:24:10 +02:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
joschiwald
1fef1c595b Scripts: Added missing delimiter to MinionData arrays 2017-08-25 22:22:17 +02:00
joschiwald
9cb4a265a3 Misc: Fixed misleading indentation 2017-07-25 00:02:13 +02:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
a0a158b5b8 Core/Scripts: Include cleanup 2017-05-28 16:34:44 +02:00
Shauren
38c6694b8e More nopch fixes 2017-05-25 00:24:37 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Duarte Duarte
7eb4512eee Scripts: Minimize duplicated enum names in header files (#18346)
This reduces the number of cache resets with the Zapcc compiler

Standard followed is instance/raid TLA + DataTypes/CreaturesIds/etc
2016-12-01 01:51:07 +00:00
treeston
e2f2c70ba4 Merge branch '3.3.5-bossboundary' into 3.3.5-base (PR #16089)
(cherry picked from commit 5b8b8c6530)
2016-03-22 22:56:43 +01: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
Shauren
585f978c58 Core: Started work on 6.2.0.20182 2015-07-01 02:22:03 +02:00
Daniel M. Weeks
b948a4275e Add missing override keyword in scripts 2015-04-02 22:28:05 -04:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Rat
ce5b683a07 Core/Spells: fixed Script project building 2014-11-28 14:00:50 +01:00
jackpoz
6e27841382 Core/Misc: Refactor scripts to fix static analysis warnings
Seventh batch of fixes targeting 100 issues reported by Coverity
2014-09-21 22:15:04 +02:00
Shauren
9b316fe689 Core/Scripts: Fixed PCH build 2014-09-16 00:44:56 +02:00
Shauren
56f46e3ce5 Scripts
* Introduced GetGuidData/SetGuidData to store guids in instance scripts (GetData64/SetData64 are still there)
* CONDITION_INSTANCE_INFO: Changed existing DATA64 condition to GUID_DATA to preserve current use of this instance info type (most/all assume the data is a guid) and moved DATA64 to a different value - no db changes needed
* Fixed compile in boss scripts starting with letter A
2014-09-14 23:23:23 +02:00
joschiwald
ef9b4aea5e Core/InstanceScript: refactored load and save methods 2014-09-07 00:42:14 +02:00
jackpoz
3388587b7a Core/Misc: Replace rand() calls with SFMT 2014-07-22 21:43:19 +02:00
jackpoz
1083dbb993 Core/Misc: Remove Unit::Get* wrappers for ObjectAccessor::Get* 2014-05-20 21:21:33 +02:00
Shauren
f9c7bb4171 Partially revert f296095191 "Fix various warnings. The core, the scripts and the tools now compile without warnings with -Wall -Wextra -pedantic."
Visual studio does not support constexpr
Made semicolon after "Prepare*Script" mandatory - workaround for dumb IDEs inserting extra indentation level after newline
2014-05-18 12:50:10 +02:00
Praetonus
f296095191 Fix various warnings. The core, the scripts and the tools now compile without warnings with -Wall -Wextra -pedantic.
-Fix warnings from -Woverflow on implicit constant conversion.
-Fix warnings from -pedantic.
-Fix warnings from -pedantic.
-Fix warnings from -Wformat.

Two minor changes in addition :

-Replace a defined value equal to 2^31 - 1 by std::numeric_limits<int>::max().
-Remove useless null-check on pointer returned by new. New doesn't returns nullptr on failure, it throws std::bad_alloc.
2014-05-15 21:32:47 +02:00
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
joschiwald
8e833743d4 Scripts/GruulsLair: reworked InstanceScript
Known Issue: position desynch after creature respawn
2013-08-22 13:47:54 +02:00