- Replace NULL uses in new code with nullptr
- Fix wrong (accumulated) load time log when loading calendar invites
- Make Creature::CanRegenerateHealth const as its just a getter
- Mark OnlyOnceAreaTriggerScript::OnTrigger as final in case someone wants to override that (you are supposed to use protected _OnTrigger hook)
(cherry picked from commit 78a1c687a2)
- Spawn GridLoader to spawn area triggers correctly now
- Removed SAI completely
- Removed remnants of smart scripts. Created different issue for it
- Calling InitDbPhaseShift and not InDbPhaseShift
- changed SpawnId to uint64 rather than uint32
- not using CellGuidSet typedef as to not include ObjectMgr.h in the header
- 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)
- 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 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)
* 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.