- When a creature cannot find a path to its victim, it begins evading all attacks and regenerating health.
- If this persists for 5 seconds, it evades back to spawn position with new EvadeReason value EVADE_REASON_NO_PATH.
- Also some SmartAI cleanup (why oh why does it have so much duplicated code) and getting rid of #defines in favor of type-checked compile-time constants.
(cherry picked from commit 7b1560fccba77ecbdfecd7b33af740aea41b7087)
- Clean up of Unit::SetSpeed (mostly cherry picks from the 6.x branch):
- the opcode sent depends on the unit. until now, MSG_MOVE_SET_* were sent for every units which isn't like retail behavior.
- Removed the unused method parameter "forced" from Unit::SetSpeed
- Renamed Unit::SetSpeed to SetSpeedRate
- Removed the unused method parameter "forced" from Unit::UpdateSpeed
- Added utility method Unit::SetSpeed which take the new flat value.
(cherry picked from commit dc3327f9c5f80c36000356829159c060d916f62b)
# Conflicts:
# src/server/game/Entities/Unit/Unit.cpp
# src/server/game/Handlers/MovementHandler.cpp
# src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
# src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
# src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
# src/server/scripts/Kalimdor/zone_azshara.cpp
# src/server/scripts/Kalimdor/zone_durotar.cpp
# src/server/scripts/Outland/zone_hellfire_peninsula.cpp
* 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
- Clean up Creature.cpp. NULL -> nullptr, gotta love it.
- Renamed some recently added members of Creature to match code style.
(cherry picked from commit 1cf1d4a1eafb3a31bf87a615d9d947eed6eb0f62)
Fix dead flying creatures ignoring being spawned below the floor in instances on server restart because of not taking into account vmap height.
Fix#16777
(cherry picked from commit 912514c198bd0f59bd22c4a189692aff5244f697)
If there is an alive instance of the creature upon creature spawn, skip
spawn entirely. If there are only dead instances, despawn them. A new dead
corpse in the creatures home position will be respawned.
Closes: #16462
(cherry picked from commit fe2a0fda4464effeb2fb655da84a0460328b1aeb)
Scripts/BossAI: Set the BossAI parent class to make use of this in its _EnterCombat and _Reset methods. Combat pulses happen every 5 seconds.
(cherry picked from commit d57193df444b719757ae1da4a5f19e204074f6ae)
# Conflicts:
# src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
# src/server/game/Entities/Creature/Creature.cpp
Fix race conditions in CreatureTextMgr repeat group happening with MapThreads > 1 reported by helgrind by moving Creature-GUID-base data from CreatureTextMgr to Creature.
Issues added in bbf86641a1
(cherry picked from commit d123c811623fcedcf125f56101b6aea773f460e0)
Conflicts:
src/server/game/Texts/CreatureTextMgr.cpp
* Added ObjectGuid traits to easily access whether guid type can be generated globally (ObjectMgr) or not
* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396eb0b
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update