Commit Graph

1100 Commits

Author SHA1 Message Date
Treeston
3418a33a87 Misc: Pass std::chrono types by value everywhere.
(cherry picked from commit 2ef9d301f0)
2021-10-14 19:39:42 +02:00
Shauren
cbf1f2883a Core/Spells: Reduce number of CastSpell overloads to 1 2021-10-03 19:58:03 +02:00
Meji
5c287929b2 Core/Gossip: Update GossipOptionIcon enum (#26906) 2021-10-03 16:24:07 +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
ccrs
426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96)
2021-09-28 00:15:13 +02:00
Maxwelllmj
bd91674e66 Scripts/Karazhan: make Barnes properly start the Opera Event (#21970)
Close: #21881
(cherry picked from commit 4fe5a167d2)
2021-09-26 23:23:26 +02:00
Shauren
9709643f50 Core/Misc: Fix copyright headers 2021-09-26 14:22:52 +02:00
ccrs
d59a6af9c6 Core/Movement: move MoveSplineInit (#21857)
The number of edge cases in which weirdness is seen on "effect movements" will be kinda reduced, plus consistency, plus movementInform on custom movement spline initalizations.

(cherry picked from commit 2a45418032)
2021-09-26 14:19:36 +02:00
Nitair
4f0aa11c6e Scripts/Stratholme: Baroness Anastari rework (PR #21687)
(cherry picked from commit dc28889151)
2021-09-25 22:45:56 +02:00
Treeston
f69d12504c Core/Object: Bump hover delta handling on nearpoints downstack into GetNearPoint2D (from movement generators); functionality should be unchanged
(cherry picked from commit ebc96af6bb)
2021-09-23 22:28:06 +02:00
Treeston
bc89e1cdb0 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2)
2021-09-23 22:21:29 +02:00
Shauren
8a4e1119ac Core/Spells: Unify spell effect access api in both branches 2021-09-04 15:13:15 +02:00
Wyreth
8713a62328 Core/Entities: remove grid-wide visibility from setActive and implement another method for it (#20725)
(cherry picked from commit 56874b44f0)
2021-08-08 21:21:34 +02:00
Wilcalaf
e9833447ed Archaedas should properly start now when clicking on the altar. (#21401)
(cherry picked from commit 0c1aaac219)
2021-06-20 00:30:33 +02:00
Treeston
e8754cbdaf Scripts/Instance: Transition Gnomeregan to boss states (instance spawn group prep)
(cherry picked from commit a4fc32dd86)
2021-06-19 23:33:37 +02:00
Keader
9b7f3bff9f Core/Scripts: Fixed tabs issues introduced in 5bef3e426a
(cherry picked from commit 31ad6358fb)
2021-06-19 23:33:24 +02:00
Keader
ad5b0fa9cd Core/Scripts: Fixed possible crashs related with JustDied
(cherry picked from commit 5bef3e426a)
2021-06-19 23:33:24 +02:00
sirikfoll
9573987775 Scripts/Magisters Terrace: Removed not allowed ENSURE_AI call from constructor
Closes #20727

(cherry picked from commit cfaa4e6caf)
2021-06-19 23:33:24 +02:00
sirikfoll
e2c72cc02e Scripts/Sunwell Plateau: Fixed and improved spell "Curse of Boundless Agony" target selection (Boss Kalecgos)
(cherry picked from commit 14b6e3bbb3)
2021-06-19 23:33:24 +02:00
ariel-
c77925da4a Core/Entities: killed Creature::SetInCombatWithZone and replaced with AI version
Closes #12108 (again)

(cherry picked from commit 7c9722a4ae)
2021-06-16 21:03:06 +02:00
ariel-
861cf261c5 Core/Formations: update codestyle and fix crash
Closes #21288

(cherry picked from commit 73cc613dc8)
2021-06-16 19:26:32 +02:00
ariel-
62c571076e Core/Scripts: added nullptr checks to DamageTaken hooks
Since cb9e72e521 attacker may not be in world when hook is called

(cherry picked from commit 0db5c2df3f)
2021-06-16 12:02:14 +02:00
sirikfoll
5b5bc4c5c7 Scripts/Scarlet Enclave: Quest The Endless Hunger will work correctly after Unworthy Initiate Respawn
Due to dynamic spawns, we need to be able to update the Npc GUID after the respawn, otherwise the quest can only be completed by the first player

(cherry picked from commit 72ff2e30c3)
2021-06-15 23:43:17 +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
Kittnz
267aeddc05 Scripts/EasternKingdoms: implement Children of Goldshire event (#20745)
* Script: Implement Childeren of Goldshire

Notes: Need to update waypoints and default location of the childeren
http://wowwiki.wikia.com/wiki/Children_of_Goldshire
(cherry picked from commit a9c853ee3f)
2021-06-13 22:30:10 +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
b9d63c2009 Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument 2021-05-16 21:56:06 +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
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
Keader
a7883380ce Core/AI: Making guid const& in SetGUID method (#21128)
(cherry picked from commit 465b43fabe)
2021-04-15 05:53:27 +02:00
Killyana
eba8916ca2 Typo
(cherry picked from commit b08280fcfe)
2021-04-15 05:53:27 +02:00
Killyana
2e828b4026 Scripts/Stratholme: Fix a DB error
Ref #20749

(cherry picked from commit be56a4669e)
2021-04-15 05:53:27 +02:00
jackpoz
bddd58d469 Scripts/Stratholme: Add missing header for no-pch build
(cherry picked from commit 9a515c29ba)
2021-04-15 05:53:27 +02:00
jackpoz
cf04609c9a Scripts/Stratholme: Fix build
(cherry picked from commit 828c5d08e7)
2021-04-15 05:53:27 +02:00
jackpoz
b99654924c Scripts/Stratholme: Fix build
(cherry picked from commit a98b2aa8c8)
2021-04-15 05:53:27 +02:00
Riztazz
d01914ffcc Scripts/Stratholme: Few changes to how Ysida behaves during the Baron run (#20749)
(cherry picked from commit 2a25d9d9a7)
2021-04-15 05:53:27 +02:00
Shauren
69e0b9a985 Core/Auras: Update AuraState enum and implement missing new ones 2021-03-16 20:48:42 +01:00
Aokromes
0b3a09b1b4 Misc: Kill trailing white spaces
(cherry picked from commit 5f2c5f2ed3)
2021-02-15 19:13:25 +01:00
jackpoz
852c9e9108 Core/Misc: Fix static analysis issues
(cherry picked from commit a80c95a1c7)
2021-02-06 21:41:51 +01:00
jackpoz
388034498f Core/Misc: Fix static analysis issues
(cherry picked from commit 9b7c73a19d)
2021-02-06 21:41:51 +01:00
Riztazz
dffef65da2 Scripts/Stratholme: spawn Timmy the Cruel if conditions are met (#20750)
* Timmy the cruel
* Rename some variables and use sniffed spawn position
* codestyle
* Use areaboundary instead
* include order
* aokromes request
* remove static
* never cp on tc

(cherry picked from commit c69825d96d)
2021-02-06 21:41:51 +01:00
Killyana
e73bd9763f Creature/Scripts: Add Aggro sound to Cairne Bloodhoo, Sylvanas Windrunner and Thrall
(cherry picked from commit 48ecd81d61)
2021-01-21 22:30:40 +01:00
Treeston
9f2de698c9 some more cleanup (cbd025f follow-up)
(cherry picked from commit 4f5ec886d0)
2021-01-13 22:04:52 +01:00
Treeston
b31816ff79 Scripts/MagistersTerrace: Fix some crashes in Selin Fireheart. His script is still a shitshow, though. Closes #20614.
(cherry picked from commit cbd025f146)
2021-01-13 22:04:52 +01:00
Andrew Letson
bc73b5f8a5 DB/Scripts: Greengill Slave
(cherry picked from commit c8a346a23c)
2021-01-13 22:04:52 +01:00
Wyreth
a3a91dadad Scripts/EasternKingdoms: move Alchemist Arbington and Apothecary Dithers core script to DB
(cherry picked from commit 23329790d2)
2021-01-08 21:12:11 +01:00
Andrew Letson
f79480bf9d DB/Scripts: Yenniku (move npc_yenniku to SAI)
(cherry picked from commit a7f3d5e59f)
2021-01-08 21:12:11 +01:00
sirikfoll
82764a71fc Core/Scripts: Minor fixes in boss Coren Direbrew
Update script register model
Fix number os Mole Machine spell targets
Fix Mole Machine timer
Fix minions summon

(cherry picked from commit 05a101881c)
2020-09-06 21:40:44 +02: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