* Janalai (#13)
* wip
* nullcreature
* wipppp
* first attempt at working state
* hatcherai
* test
* conditions for hatching
* some potential fixes
* some debuggo
* some small fixes
* general fixes
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* more debug
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* fixed?
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* remove dumb bomb count
it is not needed
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* other debug
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* remove script for egg
* F
* Revert "F"
This reverts commit 246c66ccdac52e38c95c63f0ee59f1add97f4d64.
* Revert "remove script for egg"
This reverts commit b85933583fd480f941b839623c7291b6d5887246.
* different spell ids
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* Update boss_janalai.cpp
* restore data sets
changing this in a different PR, but data is still being set here
* Fix nalorakk sometimes not move when player close
* init _phase
* Revert "Fix nalorakk sometimes not move when player close"
This reverts commit b42cd4634bb4ffd225eaa7480428c6ba6b4817c6.
* init
* update movement
* updates and debug
* stuck :/
scheduler doesn't seem to update when at the end of wp movement???
* fix wps and implement fight
* finalise
* unused
* Update boss_nalorakk.cpp
* keep oprientation
* ran_intro
* Class Comparison Logic Encapsulation - Parity
* Add Context to IsClass
* Add Unit IsClass script hook
* Replace additional getClass with IsClass
* Update CanUseItem to replace getClass with IsClass
* Add separate context for pet vs ability
* Change Create to Init since not all referenced contexts are creation
* Align spacing in ClassContext
* Drop context on LFGManager max power
* Update IsClass context that wraps around Missle Barrage
* Rename context for swapping weapons
* Be more specific than CLASS_CONTEXT_TALENT
* Remove duplicate context
* Moved IsClass Hook to Player
* Removed unused parameter in virtual base function
* Added maybe_unused to IsClass virtual in order to compile
To match the override signature, the virtual base needs to include the parameter in question, so using [maybe_unused] to signal to the compiler to allow it
* Remove extra blank line
* Add ABILITY_REACTIVE context
* Add context for PET_CHARM
* Remove explicit nullopt check per review
* Code Readability - Change if to if else in pet
Due to the return pattern, this doesn't change functionality in any way
* Add OnPlayer to disambiguate
---------
Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
Npc positioning
Implemented slope check to avoid unwanted climbing for some kind of movements (backwards, repositioning etc.)
Implemented backwards movement
Re-implemented circle repositioning algorithm (smartest than retail, but with the same feeling)
Fixed random position of summoned minions
Improved pet following movement. Also, they attack NPC from behind now. Thanks to @Footman
Swimming creatures
Fixed max_z coordinate for swimming creatures. Now only part of their body is allowed to be out of the water level
Fixed pathfinder for swimming creatures creating shortcuts for specific segments, now they swim underwater to reach the seashore instead of flying above the water level.
Creatures with water InhabitType but no swimming flag now, when not in combat, will walk on water depth instead of swimming. Thanks @jackpoz for the original code
UNIT_FLAG_SWIMMING in UpdateEnvironmentIfNeeded to show the swimming animation correctly when underwater
Implemented HasEnoughWater check to avoid swimming creatures to go where the water level is too low but also to properly enable swimming animation only when a creature has enough water to swim.
Walking creatures
Extended the DetourNavMeshQuery adding area cost based on walkability (slope angle + source height) to find better paths at runtime instead of completely remove them from mmaps
improve Z height in certain conditions (see #4205, #4203, #4247 )
Flying creatures
Rewriting of the hover system
Removed hacks and improved the UpdateEnvironmentIfNeeded. Now creatures can properly switch from flying to walk etc.
Spells
LOS on spell effect must be calculated on CollisionHeight and HitSpherePoint instead of position coords.
Improved position for object/creature spawned via spells
Improved checks for Fleeing movements (fear spells)
Other improvements
Implemented method to calculate the CollisionWidth from dbc (used by repositioning algorithm etc.)
Improved raycast and collision checks
Co-authored-by: Footman <p.alexej@freenet.de>
Co-authored-by: Helias <stefanoborzi32@gmail.com>
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>