aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
AgeCommit message (Collapse)Author
2025-06-13Core/Scripts: Mark script base class constructors noexceptShauren
2024-12-31Core/Misc: Include cleanup - remove MapUtils.h from Containers.hShauren
2024-12-29Core/Creature: Implement aggro grace period (#30362)ModoX
Ref: #26528 #30273 #23258
2024-11-05Core/Summons: Handle summons using SummonProperties.Control type 5 as ↵Meji
vehicles (#30391)
2024-02-27Core/Creatures: Implemented CREATURE_STATIC_FLAG_5_NO_LEAVECOMBAT_STATE_RESTOREShauren
2024-02-22Core/Creatures: Implemented CREATURE_STATIC_FLAG_4_NO_MELEE_APPROACH and ↵Shauren
fixed CREATURE_STATIC_FLAG_NO_MELEE_FLEE implementation (should cause fleeing from melee range)
2023-07-20Core/Units: Added helper functions to modify UNIT_FLAG_UNINTERACTIBLE (#29159)Teleqraph
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-06-08Core/Scripts: Added const to GetDialogStatus functionsHuangStomach
2023-03-15Core/Creatures: Allow flagging creatures to not clear their tap list when ↵Shauren
evading
2023-03-11Core/Scripts: Make CreatureAI::DoZoneInCombat overload accepting a different ↵Shauren
creature static
2023-01-19Core/Scripts: Move EvadeReason outside of CreatureAI classShauren
2023-01-08Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard ↵Shauren
compatible api)
2023-01-06Core/Misc: Add missing Containers.h include where neccessaryShauren
2022-10-17Core/Loot: Implemented personal loot and tag sharing for non-boss lootShauren
2022-03-27Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlagShauren
2022-03-15Core/Misc: Rename UNIT_FLAG_NOT_SELECTABLE to UNIT_FLAG_UNINTERACTIBLE (#26913)offl
(cherry picked from commit c4741a131a0a28b69c228d3637beab7090e5f1e3)
2022-02-28AI/CreatureAI: Properly update Victim even while spell focusingTreeston
(cherry picked from commit 684910a230b2e8e780ad24bc0c4eece835bc249a)
2022-02-13Core/Misc: Minor game include cleanupShauren
2022-01-24Core/CreatureAI: std::chrono-ify DoSummon* methodsCarbenium
(cherry picked from commit 1245833cdd9988a2ac9c3a9374b40e76a53d889a)
2022-01-24Core/WorldObject: Remove non-std::chrono SummonCreature overloadCarbenium
Remove TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0, uint32 vehId = 0, uint32 spellId = 0); (cherry picked from commit a41f599be72ccc88b13c1cf725f20cee4a5335d7)
2022-01-24Core/WorldObject: Partially std::chrono-ify SummonCreature overloadsCarbenium
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0); to TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime = 0s); (cherry picked from commit 1131229ee9c43704b11187f0b11c327db92018b6)
2021-12-22Core/AI: Fix remaining charming issuejackpoz
Make creatures evade when a charming expires and they cannot attack the charmer (i.e. charmer with .gm on) (cherry picked from commit 69809d12031d055d8d0cffb5a187d9af09dd0efe)
2021-12-22Core/AI: Allow creatures to evade (#24221)Giacomo Pozzoni
* Core/AI: Allow creatures to evade Revert changes that didn't allow creatures to evade anymore no matter how hard a script would try * PArtially revert 163f44c1b08cc043b114585922bd08664434bf92 (cherry picked from commit 817ae5bca6db14c9b3db7d5268511525e0cb4105)
2021-12-19Scripts/ICC: little bit of cleanup in Valithria after the "recent" changesccrs
(cherry picked from commit 7ffe0185711095b0f62a5edf1e1819935d02851c)
2021-12-19Core/Creature: Clear creature focus after an evadeKillyana
(cherry picked from commit a32aeceb0da5d691eb655e80eb9ea7b32fc44839)
2021-12-19Creature/AI: Reset CoolDowns on evadeKillyana
Closes #24008 (cherry picked from commit cb11ad97fb9eb6202b54913b0f522eda4935d533)
2021-12-18Scripts/Outland: Fix npc_ancestral_wolf not starting waypoint (#23763)Artamedes
* Scripts/Outlands: Fix npc_ancestral_wolf not starting waypoint, and also add a way to not follow owner automatically in CreatureAI::JustAppeared() for tempsummons * fix nopch (cherry picked from commit 0b3a9e2a2b2537e7224d103947ad6028c6d2e5fe)
2021-12-18Core/Unit: Spell focusing now no longer nonsensical. HasSpellFocus always ↵Treeston
const. Error logs for various stuff. (cherry picked from commit 4a219eda07c353139608065f7d0a016094ee4ce0)
2021-12-18Core/Unit: rename IsFocusing methodccrs
Workaround prework till actual facing system rework arrives (cherry picked from commit ec9f15a5fff7830bf2aebc517654784a6d54bb74)
2021-12-17Core/Combat: Properly unset engagement flag on death.Treeston
(cherry picked from commit 9c603ea87f09c47d52f093ccc73ee75c15eff6f5)
2021-12-17Core/AI: No longer do strange things when told to enter evade mode while ↵Treeston
there's no need to do so, typically by terrible legacy code. (cherry picked from commit 163f44c1b08cc043b114585922bd08664434bf92)
2021-12-17Core/AI: No longer override chase movement with follow movement if the ↵Treeston
creature engages before JustAppeared has had a chance to fire. (cherry picked from commit 49b04c0fdd03d060d10f91a597857ec9c3d9f4ed)
2021-12-17Core/AI: Finally move the "is creature engaged" flag to be a property of the ↵Treeston
creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time. (cherry picked from commit 0e7c66cb4c7ff7d44e232d0b50703a48605ffd24)
2021-12-13Entities/Player: Clean up client control handling behavior around ↵Treeston
possession. Mind Control should no longer cause various weirdness. Closes #23539. (cherry picked from commit f6f1c48aa592ea10c99fd23f46e94934b2f0cef2)
2021-12-13Misc: some corrections after recent mergesccrs
(cherry picked from commit 626a24822b3c6a5d5b9a4b29861ecf393fd9288b)
2021-12-13Core/AI: Actually accurately reproduce the logic from before 8499434 that ↵Treeston
determines what summons start following on appearance. Third time's the charm? Closes #23513. (cherry picked from commit 3cdf27494ffe18d674a37561a2c573517a2cb533) (cherry picked from commit 63383da36e27657734cba6ad23c1bd3d68039d90)
2021-12-12Core/Creatures: Fixed crash in CreatureAI::JustAppeared caused by scripted ↵Shauren
summons without SummonProperties Closes #23507 (cherry picked from commit c0b25c9a83126bfd26da8245a31ea684008d804d)
2021-12-12Core/AI: minimize further undesired behaviours (e3e4b97 followup)ccrs
Those Category checks come from checking all Spell::SummonGuardian uses (cherry picked from commit ebd438883e31de4482617631ff9939f2246fda69)
2021-12-12Combat/Threat: Split ThreatManager::NotifyDisengaged off from ↵Treeston
ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI. Fixes #23490. (cherry picked from commit 1158f267df22c0782fb5f20f7de31f5643ac0b58)
2021-12-12Core/AI: Remove EnterEvadeMode calls from Guardian/Summon spell handlers. ↵Treeston
Add follow logic to CreatureAI::JustAppeared. Closes #23270. (cherry picked from commit 8499434340919902b5aefe58f812c3f24d37310d)
2021-12-05Core/AI: logs, codestyle & cosmetics standarizationccrs
(cherry picked from commit fdb71ce19e02b44323fbb9dfa5f07dae2a35f8ba)
2021-12-05Core/AI: variable naming standarizationccrs
plus minimum codestyle changes (cherry picked from commit 179c7da1fc264b1444aa50632317e16dca02f78b)
2021-12-03Core/Vehicles: Fix accessories disappearing on resetjackpoz
(cherry picked from commit 6dae4a747da558ca46a777186d4519c32fc1bf04)
2021-10-22Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a ↵Treeston
crapton of booleans (cherry picked from commit 042f5515e4f3e52b0d2e23d9b9e147041849ce12)
2021-10-22Core/AI: Remove unnecessary parameter from DoZoneInCombat after eb1972fTreeston
(cherry picked from commit c00a2efb21356eb4105cb7db9112c708762d9191)
2021-10-22Core/Scripts: Implement script name reloadingSeyden
* Authored by Seyden * Co-authored by Naios * We thank Shauren for your helpful feedback
2021-10-22Core/AI: Some cleanup to DoZoneInCombat and Malygos' AI that I found while ↵Treeston
working out #22226. (cherry picked from commit eb1972f21d6e79da32a89cb58c5c28eb98b0a4fb)
2021-09-28Core/Movement: MotionMaster reimplementation (#21888)ccrs
Internal structure and handling changes, nothing behavioural (or thats the intention at least). (cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2)
2021-09-23Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is ↵Treeston
good. (cherry picked from commit 4692e10ca2ffed5ba2a0336e9c93962b0fad9eaa)
2021-08-23Core/CreatureAI: CheckBoundary -> IsInBoundary, better reflects what it ↵Treeston
does. Also moved to public so spellscript can use it. (cherry picked from commit df639d85e4e82add71432ea0a4cba91f238a30ba)