Commit Graph
1090 Commits
Author SHA1 Message Date
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
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 56874b44f0625f80442ea906f487e3253bdd16eb)
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 0c1aaac219545b3dacf930ce0dd956bd5d7c4b40)
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 a4fc32dd867aa4e3eba762a890cc845604e82043)
2021-06-19 23:33:37 +02:00
Keader 9b7f3bff9f Core/Scripts: Fixed tabs issues introduced in 5bef3e426aea37b0e7555f146037c58e7be6352d
(cherry picked from commit 31ad6358fb9088583142d108d2649d0c94b43358)
2021-06-19 23:33:24 +02:00
Keader ad5b0fa9cd Core/Scripts: Fixed possible crashs related with JustDied
(cherry picked from commit 5bef3e426aea37b0e7555f146037c58e7be6352d)
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 cfaa4e6caf8f26eb850a714994b533a77e92a92f)
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 14b6e3bbb36e4b5ec5212ed2a3bf5eb0012e095f)
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 7c9722a4ae08b5f283f6a085a411e37604a7da9f)
2021-06-16 21:03:06 +02:00
ariel- 861cf261c5 Core/Formations: update codestyle and fix crash
Closes #21288

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

(cherry picked from commit 0db5c2df3fe56f42293865e87ec781cd4d41598b)
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 72ff2e30c30d4d1b9bf22695b6a097eb82e3c76a)
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 3b01cccd7eafaff9f3b8236a544e4fa46818926c)
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 a9c853ee3fc13d1aa59bde14df8f1f0a5b035ff3)
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 cb9e72e521d3cc415dd15bf6912c87f89e41b92a)
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 532ab1c7f8653d1a2e48aa1f1f8a9ba1041d4bb7)
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 6113b9dec2e0081c36c36c2974a28ed0693bc601)
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 d507a7e3388382960108b24143da48e5f912b4a7)
2021-04-16 15:22:42 +02:00
Keader a7883380ce Core/AI: Making guid const& in SetGUID method (#21128)
(cherry picked from commit 465b43fabef1727432ddda27f04b882b29fd2c7f)
2021-04-15 05:53:27 +02:00
Killyana eba8916ca2 Typo
(cherry picked from commit b08280fcfee500acf8b951ec2c05e0760d4b9955)
2021-04-15 05:53:27 +02:00
Killyana 2e828b4026 Scripts/Stratholme: Fix a DB error
Ref #20749

(cherry picked from commit be56a4669e6f1b1d34a9a1e2ed19b627e1263cfb)
2021-04-15 05:53:27 +02:00
jackpoz bddd58d469 Scripts/Stratholme: Add missing header for no-pch build
(cherry picked from commit 9a515c29bab2dadec011f40e4f824bd9409528d4)
2021-04-15 05:53:27 +02:00
jackpoz cf04609c9a Scripts/Stratholme: Fix build
(cherry picked from commit 828c5d08e758385519955201b909a0d9a578715d)
2021-04-15 05:53:27 +02:00
jackpoz b99654924c Scripts/Stratholme: Fix build
(cherry picked from commit a98b2aa8c8cfe9e06cf00b7d37abf06f06aee67b)
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 2a25d9d9a7a7d4aa8b06f9cd0bb26b123adf7789)
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 5f2c5f2ed376bc2ab9107a4a8da7df04f8aef85a)
2021-02-15 19:13:25 +01:00
jackpoz 852c9e9108 Core/Misc: Fix static analysis issues
(cherry picked from commit a80c95a1c788932696fb43e69b9012a751431bac)
2021-02-06 21:41:51 +01:00
jackpoz 388034498f Core/Misc: Fix static analysis issues
(cherry picked from commit 9b7c73a19df66849ec829fc5a94875aa9593934d)
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 c69825d96d6c7ff847c196c908e1040cb7a8d5db)
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 48ecd81d614559c6f023aa8910a99901d9d794b5)
2021-01-21 22:30:40 +01:00
Treeston 9f2de698c9 some more cleanup (cbd025f follow-up)
(cherry picked from commit 4f5ec886d086261dccde4592e7670723c9b0c7f4)
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 cbd025f14698a8392fac6e7d2ad418ff57bfb195)
2021-01-13 22:04:52 +01:00
Andrew Letson bc73b5f8a5 DB/Scripts: Greengill Slave
(cherry picked from commit c8a346a23c6cb377f02bd960f578a886b65d6561)
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 23329790d21de649ef5fc5b9e60bf089b879f1b9)
2021-01-08 21:12:11 +01:00
Andrew Letson f79480bf9d DB/Scripts: Yenniku (move npc_yenniku to SAI)
(cherry picked from commit a7f3d5e59fd05d1f015ea0ad7426292d36b3dee8)
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 05a101881cc58cd10483002f8ba0576c4b09f57d)
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
ccrs 9a5e2b80b3 Core/Creature: regenerate health
There are three possible scenarios regarding regenerating health
- db lock and curhealth set to > 0
- db lock and curhealth set to 0
- dynamic lock (set in scripts and such) overriding db lock

(cherry picked from commit 91c0d49c188977c3d797f5749b1204612ce50195)
2020-08-23 15:56:21 +02:00
ccrs 97585597f0 Core/Movement: waypoint movement (#20121)
Following the work done in #19361 this is the cleanup and improvement of the related logic of waypoint management.

Ref 28050f3 #18020
(taking the good parts and ignoring the incomplete work)

(cherry picked from commit 7fff83d67526efff63867d41b9e036a19a9287b3)
2020-08-23 00:45:46 +02:00
Gustavo 6135ee20a9 Core/Scripts: Rewrite Boss Kalecgos (Sunwell Plateau) (#19897)
* Core/Scripts: Rewrite Boss Kalecgos (Sunwell Plateau)

Scripted all spells
Corrected behavior of Spectral Blast and Curse of Boundless Agony
Removed wrong wipe behavior
Fix problem where bosses would be stuck with banish
Added Boundaries
Corrected texts
Removed old hacks
Other minor fixes

(cherry picked from commit e9cd7af2dfcb7948f27e83e73398da0086190aab)
2020-08-22 21:13:01 +02:00
Treeston 129dd7c909 Core/Scripts: dynamic_spawning follow-up, I had forgotten JustRespawned existed.
- Rename JustRespawned to JustAppeared, which better matches its behavior anyway.
- Properly invoke JustAppeared for new (re-)spawns - fixes #20111.
- Fix Thaddius script to work with dynamic_spawning (mostly unrelated to the above) - Feugen/Stalagg should really be a summon group, but I don't have time to fix that right now.
- Fix default value for DynamicEscortNPC to match worldserver.conf.dist.

(cherry picked from commit 184c45cfe0fbe4f3e4fb701f0f99994df98bdc8a)
2020-08-22 20:10:42 +02:00
treeston 2dfafa69eb Hi, I'm Treeston, and welcome to Combat PR Prep Refactors.
Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it.
New methods on Unit:
- void SetImmuneTo<All/PC/NPC>(apply, keepCombat = false);
- bool IsImmuneTo<All/PC/NPC>() const;

(cherry picked from commit 74af880217fc567c9949d7557408718af889402f)
2020-08-18 18:53:13 +02:00
Nyeriah 5b8d3ede7d Scripts/Karazhan: Fix Attumen and Midnight not moving towards each other on phase transition after latest changes
(cherry picked from commit 746fce30d9a56ed59b53f1e1a93c9c8c3417e16b)
2020-08-18 18:53:13 +02:00
treeston 2c88d9f162 Some more refactoring prep for combat/threat (#19930).
(cherry picked from commit 2739a5c5f5d5a359eee4eef1a6486ddcaf24faaf)
2020-08-18 18:53:13 +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 e2a1ccd118d129b96e09ff1a15ed0adb1d4a3897)
2020-08-13 22:46:44 +02:00
ArtamedesandCarbenium e85bd8fd39 Scripts/Stockades: Cleanup the scripts (#23524)
* Scripts/Stockades: Cleanup the scripts

Scripts looked ugly before, now they are less ugly
Move Mortimer Moloch and Warden Thelwater to use TaskScheduler rather than EventMap
Use new script registers
Cleanup some other code

Co-authored-by: Carbenium <[email protected]>
2020-08-10 20:50:25 +02:00