As a result, inheriting scripts calling Start in on-create hooks (like JustSummoned) will now work properly again.
Tagging #20310.
(cherry picked from commit e4e6e2209c)
- 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)
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)
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 7fff83d675)
- 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 184c45cfe0)
- True blizzlike creature spawn/respawn behavior - new creature = new object
- Toggleable spawn groups (with C++/SAI/command options to use them)
- Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone.
- Backward compatibility mode (set via group and for summons)
to support creatures/gos that currently don't work well with this
(this should be removed once the exceptions are fixed)
Fixes and closes#2858
Tags #8661 as fixable.
Fixes and closes#13787Fixes#15222.
(cherry picked from commit 59db2eeea0)
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 74af880217)
* 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)
* When iterating groups we have to either do it not in multithreaded context (map updates) or start with checking maps (they are guaranteed to change in single thread update).
* Properly clear ComboPoint references on player remove
* remove some possible references item may have when it is deleted during save.
* Also clear all hostile references when unit is removed from map.
(cherrypicked from 86da1a19bb)
* 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)
* Scripts/AzjolNerub: Complete rewrite.
- Gatewatcher:
- Trash now actually engages properly one by one
- Fix trash spell casting
- Add missing quotes
- Hadronox:
- Everything. Literally.
- Anub'arak:
- Fix add spawns
- Fix impale
- OK this might as well be "fix everything with every boss". Because that's pretty much what happened.
- General hack cleanup
* Update and rename 9999_99_99_99_AZJOLNERUB.sql to 2016_09_25_01_world.sql
* Update and rename 2016_09_25_01_world.sql to 2016_09_25_02_world.sql
* Rename 2016_09_25_02_world.sql to 2016_09_26_02_world.sql
(cherry picked from commit 4b990eb7d7)
# Conflicts:
# src/server/game/Spells/SpellMgr.cpp
# src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
# src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
Update boss_hadronox.cpp
(cherry picked from commit 04ec868768)
Update boss_hadronox.cpp
I hate travis, learn from buildbot
(cherry picked from commit aeb20951bb)
I think I got all of them this time
No idea how this one got past travis.
(cherry picked from commit ae163197a7)
Fix nonPCH.
(cherry picked from commit e121d66fbb)
...for real this time (seriously - what happened to test builds before merging, Aok?)
(cherry picked from commit dbe0789eba)
.....hail PCH
(cherry picked from commit 2528194cc1)
and you get a header, and everyone gets a header...
(cherry picked from commit 5e5fe37a7e)
(cherry picked from commit 6d00d3f283)
Merge remote-tracking branch 'Treeston/3.3.5-splinechains' into 3.3.5 (PR #17946)
(cherry picked from commit 20f483967f)
Core/Movement: Add a convenience default ctor to SplineChainResumeInfo, and fix PCH build in some configurations (zzz why do we even keep Appveyor and Travis around).
(cherry picked from commit 4fa646c0b2)
PCH build fix. Again.
(( Alright, you made me waste 20 minutes of my life on a full nonPCH rebuild of the core now. ))
(( I hope you're happy. ))
(cherry picked from commit 4a1a460241)
(cherry picked from commit b3d44d6c36)
Game/Scripting: Follow-up to b3d44d6. Fix script selection for creatures on difficulty > 0.
(cherry picked from commit 91c2b3162d)
Build fix.
(cherry picked from commit a9f1151f2c)
Fine, this time I actually built it. Promise.
(cherry picked from commit 0c2c88ed50)