Unit::IsControlledByPlayer is a expected value for TempSummons (like some triggers used in quests, summoned by spells).
Previous logic broke a lot of quests which use triggers to do stuff.
Allow JustSummoned and events linked from other events with flag set also in charmed (prevents breaking event chains)
Allow vehicles (needed for vehicles with SmartAI, eg Iron Rune Constructs and You: Rocket Jumping)
(cherry picked from commit 3e596376a7fae9fd585fac12e5122fd8f1b7ce14)
* 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)
This allows us to fix quest 12261 (No Place to Run). Closes#16291.
(cherry picked from commit e69a483aa942c1c6c4bd9b5fa47139f89643b8d5)
Derp. Build fix.
(cherry picked from commit 9180bcd404ff0a89144bbe834a2efe189bd0eb86)
- NULL -> nullptr
- Rename "AssistPlayerInCombat(who)" to "AssistPlayerInCombatAgainst(who)" to reflect what the method actually does
- Code style
No functionality was changed.
(cherry picked from commit 152b3ad5b997f4be06c5bb55ddb15c57a8e28c3b)
# Conflicts:
# src/server/game/AI/SmartScripts/SmartAI.cpp
# src/server/game/AI/SmartScripts/SmartScript.cpp
- 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)
Move the removal of the 'distracted' state from SmartAI to UnitAI.cpp.
Fixes and closes#7197 and #15482.
(cherry picked from commit f446538cb16dad3dcd04e79aebc944feefc16275)
* Fix some codestyle, fix some typos
* Change CMakeLists for: Custom (can be uncommented), Events, World
** Custom is theoretically unchanged. You can, however, uncomment the glob_recurse that initializes every file within. This might be easier for beginners.
* Introducing the IP Based Action Log System:
** On several different actions, e.g. Login, Character Login, etc., a new entry is added
** Can be logged on and off in worldserver config
*** Disabled by default to prevent increased log db size for unknowing users.
* Add a new row to account table called 'last_attempt_ip'
** Lists the last ip trying to connect to the account
* Add a new type of HookScripts: AccountScript
** Includes: OnAccountLogin, OnFailedAccountLogin, OnEmailChange, OnFailedChange, OnPasswordChange, OnFailedPasswordChange
* Added new Hook to PlayerScripts: OnFailedPlayerDelete
* Added new variables to PlayerScripts: OnPlayerDelete
Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bcaf9 changes by return a Position object instead of accepting a Position parameter by reference.
Add a new method EnsureVictim() which asserts a valid not NULL reference will be returned to the caller. Use this whenever the GetVictim() would be dereferenced .