130 Commits

Author SHA1 Message Date
Shauren
f94d87b00f Core/Scripts: Mark script base class constructors noexcept 2025-06-13 19:31:03 +02:00
Shauren
d778d5ec7c Core/Misc: Include cleanup - remove MapUtils.h from Containers.h 2024-12-31 18:12:36 +01:00
ModoX
26d1337461 Core/Creature: Implement aggro grace period (#30362)
Ref: #26528 #30273 #23258
2024-12-29 09:04:40 +01:00
Meji
23bb1a56b7 Core/Summons: Handle summons using SummonProperties.Control type 5 as vehicles (#30391) 2024-11-05 14:42:35 +01:00
Shauren
be3dc89c32 Core/Creatures: Implemented CREATURE_STATIC_FLAG_5_NO_LEAVECOMBAT_STATE_RESTORE 2024-02-27 00:13:11 +01:00
Shauren
a748fddfa4 Core/Creatures: Implemented CREATURE_STATIC_FLAG_4_NO_MELEE_APPROACH and fixed CREATURE_STATIC_FLAG_NO_MELEE_FLEE implementation (should cause fleeing from melee range) 2024-02-22 15:47:11 +01:00
Teleqraph
88ff97c1f9 Core/Units: Added helper functions to modify UNIT_FLAG_UNINTERACTIBLE (#29159)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-07-20 19:09:27 +02:00
HuangStomach
9805b133c9 Core/Scripts: Added const to GetDialogStatus functions 2023-06-08 16:31:24 +02:00
Shauren
6e309ed17f Core/Creatures: Allow flagging creatures to not clear their tap list when evading 2023-03-15 19:42:58 +01:00
Shauren
080bf4c565 Core/Scripts: Make CreatureAI::DoZoneInCombat overload accepting a different creature static 2023-03-11 13:37:03 +01:00
Shauren
3df16c12b7 Core/Scripts: Move EvadeReason outside of CreatureAI class 2023-01-19 21:23:06 +01:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
d8a4668c77 Core/Misc: Add missing Containers.h include where neccessary 2023-01-06 16:44:11 +01:00
Shauren
133334a902 Core/Loot: Implemented personal loot and tag sharing for non-boss loot 2022-10-17 23:11:46 +02:00
Shauren
b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
offl
c4906ce60b Core/Misc: Rename UNIT_FLAG_NOT_SELECTABLE to UNIT_FLAG_UNINTERACTIBLE (#26913)
(cherry picked from commit c4741a131a)
2022-03-15 23:03:26 +01:00
Treeston
1bbf61ef02 AI/CreatureAI: Properly update Victim even while spell focusing
(cherry picked from commit 684910a230)
2022-02-28 21:36:50 +01:00
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
Carbenium
b3f2ff97ff Core/CreatureAI: std::chrono-ify DoSummon* methods
(cherry picked from commit 1245833cdd)
2022-01-24 13:11:13 +01:00
Carbenium
3bba8d50b1 Core/WorldObject: Remove non-std::chrono SummonCreature overload
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 a41f599be7)
2022-01-24 12:39:59 +01:00
Carbenium
310f996b1d Core/WorldObject: Partially std::chrono-ify SummonCreature overloads
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 1131229ee9)
2022-01-24 11:55:32 +01:00
jackpoz
dab7e5688c Core/AI: Fix remaining charming issue
Make creatures evade when a charming expires and they cannot attack the charmer (i.e. charmer with .gm on)

(cherry picked from commit 69809d1203)
2021-12-22 21:00:14 +01:00
Giacomo Pozzoni
93e66f3f3e Core/AI: Allow creatures to evade (#24221)
* 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 163f44c1b0

(cherry picked from commit 817ae5bca6)
2021-12-22 21:00:05 +01:00
ccrs
d7571e5d1f Scripts/ICC: little bit of cleanup in Valithria after the "recent" changes
(cherry picked from commit 7ffe018571)
2021-12-19 18:05:23 +01:00
Killyana
a7cf209428 Core/Creature: Clear creature focus after an evade
(cherry picked from commit a32aeceb0d)
2021-12-19 17:44:00 +01:00
Killyana
a09d5d4854 Creature/AI: Reset CoolDowns on evade
Closes  #24008

(cherry picked from commit cb11ad97fb)
2021-12-19 15:46:40 +01:00
Artamedes
913f0903a3 Scripts/Outland: Fix npc_ancestral_wolf not starting waypoint (#23763)
* 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 0b3a9e2a2b)
2021-12-18 21:37:02 +01:00
Treeston
14c38a1c52 Core/Unit: Spell focusing now no longer nonsensical. HasSpellFocus always const. Error logs for various stuff.
(cherry picked from commit 4a219eda07)
2021-12-18 11:36:50 +01:00
ccrs
be4ed9152c Core/Unit: rename IsFocusing method
Workaround prework till actual facing system rework arrives

(cherry picked from commit ec9f15a5ff)
2021-12-18 00:25:14 +01:00
Treeston
6b1ca0ca12 Core/Combat: Properly unset engagement flag on death.
(cherry picked from commit 9c603ea87f)
2021-12-17 22:45:55 +01:00
Treeston
3269c42789 Core/AI: No longer do strange things when told to enter evade mode while there's no need to do so, typically by terrible legacy code.
(cherry picked from commit 163f44c1b0)
2021-12-17 21:50:47 +01:00
Treeston
a4c2c0fb1d Core/AI: No longer override chase movement with follow movement if the creature engages before JustAppeared has had a chance to fire.
(cherry picked from commit 49b04c0fdd)
2021-12-17 00:25:59 +01:00
Treeston
c13d83796f Core/AI: Finally move the "is creature engaged" flag to be a property of the creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time.
(cherry picked from commit 0e7c66cb4c)
2021-12-17 00:23:33 +01:00
Treeston
bba4696de7 Entities/Player: Clean up client control handling behavior around possession. Mind Control should no longer cause various weirdness. Closes #23539.
(cherry picked from commit f6f1c48aa5)
2021-12-13 23:44:13 +01:00
ccrs
cadbf42ea4 Misc: some corrections after recent merges
(cherry picked from commit 626a24822b)
2021-12-13 00:42:18 +01:00
Treeston
c9d52c9547 Core/AI: Actually accurately reproduce the logic from before 8499434 that determines what summons start following on appearance. Third time's the charm?
Closes #23513.

(cherry picked from commit 3cdf27494f)
(cherry picked from commit 63383da36e)
2021-12-13 00:42:16 +01:00
Shauren
1c00109756 Core/Creatures: Fixed crash in CreatureAI::JustAppeared caused by scripted summons without SummonProperties
Closes #23507

(cherry picked from commit c0b25c9a83)
2021-12-12 02:20:42 +01:00
ccrs
d7e544e816 Core/AI: minimize further undesired behaviours (e3e4b97 followup)
Those Category checks come from checking all Spell::SummonGuardian uses

(cherry picked from commit ebd438883e)
2021-12-12 02:15:00 +01:00
Treeston
38d7c1530a Combat/Threat: Split ThreatManager::NotifyDisengaged off from ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI. Fixes #23490.
(cherry picked from commit 1158f267df)
2021-12-12 02:09:15 +01:00
Treeston
9f7d3ebd6a Core/AI: Remove EnterEvadeMode calls from Guardian/Summon spell handlers. Add follow logic to CreatureAI::JustAppeared. Closes #23270.
(cherry picked from commit 8499434340)
2021-12-12 01:27:04 +01:00
ccrs
844f969ed7 Core/AI: logs, codestyle & cosmetics standarization
(cherry picked from commit fdb71ce19e)
2021-12-05 16:48:58 +01:00
ccrs
dd11603150 Core/AI: variable naming standarization
plus minimum codestyle changes

(cherry picked from commit 179c7da1fc)
2021-12-05 16:17:02 +01:00
jackpoz
a855e6221d Core/Vehicles: Fix accessories disappearing on reset
(cherry picked from commit 6dae4a747d)
2021-12-03 22:02:13 +01:00
Treeston
e4e8c1c59c Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans
(cherry picked from commit 042f5515e4)
2021-10-22 23:47:51 +02:00
Treeston
5d48e8db7d Core/AI: Remove unnecessary parameter from DoZoneInCombat after eb1972f
(cherry picked from commit c00a2efb21)
2021-10-22 13:29:34 +02:00
Seyden
8f097e4425 Core/Scripts: Implement script name reloading
* Authored by Seyden
* Co-authored by Naios
* We thank Shauren for your helpful feedback
2021-10-22 12:52:37 +02:00
Treeston
6a5edf0472 Core/AI: Some cleanup to DoZoneInCombat and Malygos' AI that I found while working out #22226.
(cherry picked from commit eb1972f21d)
2021-10-22 00:48:20 +02:00
ccrs
426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96)
2021-09-28 00:15:13 +02:00
Treeston
bc89e1cdb0 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2)
2021-09-23 22:21:29 +02:00
Treeston
994121e671 Core/CreatureAI: CheckBoundary -> IsInBoundary, better reflects what it does. Also moved to public so spellscript can use it.
(cherry picked from commit df639d85e4)
2021-08-23 23:28:48 +02:00