- Changed self-accessor on GameObjectAI to "me", like UnitAI
- Moved all related functions to AI, now Unit and GameObject have the same function names with identical behaviour
- Remove "OnUpdate" from CreatureScript/GameObjectScript, was never used and we already have AI Update method
- Quest methods no longer return a bool, the return value was used to call the AI version if the ScriptMgr one returned false
- Implemented GameObjectAI::Destroyed hook (was never called), implemented Damaged method
- Rename OnStateChanged to OnLootStateChanged to reflect when it's really called, and created a new hook OnStateChanged that only gets called on GOState change
- Since the functions are now only getting called from AI, made GetAI methods full virtual. (CanSpawn method is anyways going to be used on creatures with AI)
(cherry picked from commit f913f3bb89)
- Duplicated logic never used, sometimes only ScriptMgr version was called, sometimes only AI
- They only encourage bad scripting practices
- You can still use OnSpellHit or a SpellScript
(cherry picked from commit b6b59f6c23)
* 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)
(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)
* Delay unloading of shared libraries to the next update tick
to prevent crashes in the destructor of the last referenced
script instance.
* Closes#17557
(cherry picked from commit 445746c402)
* Broken since 9cc97f226d
* There is still a crash when using lazy unloading which I
will fix in a later commit (this commit should fix at least
the static build and normal usage of the dynamic build).
* Closes#16948
(cherry picked from commit 410cf0dd05)
* Finally this commit enables dynamic script hotswapping
and finished the PR #15671.
* Split the storage layout to use optimized storages
for database bound and unbound scripts.
* Add several unload workers to reload scripts correctly
-> Requires further investigation.
* Fixes memory leaks in ScriptMgr when dropping invalid scripts.
* Fixes VehicleScripts
* Makes OutdoorPvP scripts reloadable
* Makes InstanceMapScripts reloadable
* Makes CommandScripts reloadable
* is responsible for registering plain modules.
* requires compilation with the `WITH_DYNAMIC_LINKING` flag.
* requires further support of the ScriptMgr.