Rothend
d4a1a7a040
Core/SAI: implement SMART_EVENT_SUMMONED_UNIT_DIES (82), useable by creatures and gameobjects ( #24874 )
...
* Core/SAI: implement SMART_EVENT_SUMMONED_UNIT_DIES (82), useable by creatures and gameobjects.
Closes #24831
* Update SmartScriptMgr.h
(cherry picked from commit 5339d1d3b8 )
2022-01-18 00:17:28 +01:00
Rothend
1ddde5ca3c
Core/SmartAI: allow AreaTrigger SAI scripts to use the player triggering it as base object for actions and targeting ( #24817 )
...
* Core/SmartAI: allow AreaTrigger SAI scripts to use the player triggering it as base object for actions and targeting.
Closes #23669
Closes #24791
Closes #24792
Closes #24793
* Apply suggested changes.
* Initialize atPlayer in the constructor
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com >
(cherry picked from commit e7a714f66c )
2022-01-06 22:05:03 +01:00
ForesterDev
3171cd3fa9
Core/AI: refactor SpellHit and SpellHitTarget. ( #24691 )
...
* Core/AI: refactor SpellHit and SpellHitTarget.
- now caster/target is WorldObject instead of Unit
- remove SpellHitByGameObject / SpellHitTargetGameObject (handled by SpellHit / SpellHitTarget)
- rename parameters in scripts according parent methods
* Restore logic in Algalon script
* Changed check for REMORSELESS_WINTER hit to avoid dublicate call, because it has TARGET_UNIT_CASTER for effects 0/1 and TARGET_GAMEOBJECT_SRC_AREA for effect 2
* Fix build after merge
(cherry picked from commit e3b232fe0e )
2022-01-06 20:46:25 +01:00
jackpoz
c75d75b9fa
Core/AI: Fix charmed Creatures with SAI scripts not starting waypoint paths
...
(cherry picked from commit 49e77d7c9e )
2021-12-22 22:36:39 +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
144cfc2bce
Core/AI: Make charmed creatures follow their owner ( #24195 )
...
* Core/AI: Make charmed creatures follow their owner
* Follow the charmer only when applying the charm
* Make SmartAI follow the charmer
(cherry picked from commit ddf2f60c13 )
2021-12-22 20:46:17 +01:00
Ujp8LfXBJ6wCPR
ee5384a15d
Modernize codebase with Clang-Tidy range based loops ( #24165 )
...
Manual expansion of auto types into "typed types"
(cherry picked from commit a933ba6015 )
2021-12-22 16:42:54 +01:00
Killyana
d946d74ff9
Core/AI: Fix creatures not updating their target properly once engaged
...
Closes #21562
(cherry picked from commit 7fb7432620 )
2021-12-19 15:54:20 +01:00
Treeston
3db58c4d96
Core/SmartAI: SmartAI creatures no longer process health-based hooks after death.
...
(cherry picked from commit 1faa54fe8b )
2021-12-18 00:03:55 +01:00
ccrs
e94dca132b
Core/SmartAI: add missing movement generator type check on SmartAI::SetCombatMove
...
ref #21562
(cherry picked from commit 0e3e4353a1 )
2021-12-16 22:10:54 +01:00
ccrs
f1ef2f73a4
Core/SmartAI: allow more Unit::ResumeMovement calls on JustReachedHome()
...
Since ResumeMovement also works on other MOTION_SLOT_DEFAULT generators (like RandomMG)
(cherry picked from commit c8cb866db0 )
2021-12-16 22:08:01 +01:00
Wyrserth
83a9222c39
Core/SAI: allow creatures to handle gameobject spellhit SAI events. ( #23492 )
...
(cherry picked from commit 7a71127da9 )
2021-12-13 00:42:17 +01:00
ccrs
f4a71ea9aa
Core/AI: remove extra empty line
...
(cherry picked from commit 3c77c04b05 )
2021-12-12 02:15:10 +01:00
Treeston
743d022cee
AI/SmartAI: Properly forward to inherited CreatureAI::JustAppeared in SmartAI::JustAppeared. Fixes #23491 .
...
(cherry picked from commit 854a113fc7 )
2021-12-12 02:11:15 +01:00
Treeston
e398bb1664
AI/SmartAI: Move SMART_EVENT_RESPAWN invocation from ::InitializeAI() to ::JustAppeared(). Closes #23313 .
...
(cherry picked from commit 37fc38b917 )
2021-12-12 01:27:04 +01:00
Wyrserth
5331656785
Core/SAI: allow to start waypoint movement for a creature that is in combat. ( #23426 )
...
(cherry picked from commit d6e3660115 )
2021-12-11 15:29:32 +01:00
jackpoz
6034992dff
Core/SmartAI: Implement SMART_EVENT_SUMMONED_UNIT and SMART_EVENT_SUMMON_DESPAWNED for GameObject owners
...
(cherry picked from commit 507a56d627 )
2021-12-07 00:31:26 +01:00
Giacomo Pozzoni
5f545f5402
3.3.5 gameobject summoner ( #23289 )
...
* Scripts/Misc: Change IsSummonedBy(Unit*) to IsSummonedBy(WorldObject*)
* Scripts/Misc: Fix build
* Core/TempSummons: Rename GetSummoner() to GetSummonerUnit()
* Core/TempSummons: Add support to TempSummons::GetSummoner() to return GameObject too
* Fix build
* Core/TempSummons: Allow GameObject to be owner of TempSummon
* Core/TempSummons: Add support to SAI for GameObject owner of TempSummon
* Scripts/Misc: Fix no-pch build
* Core/TempSummons: Implement PR comments
(cherry picked from commit 797fba98e9 )
2021-12-07 00:02:03 +01:00
jackpoz
54044bda82
Core/SmartAI: Fix SMART_EVENT_SUMMON_DESPAWNED
...
Fix SMART_EVENT_SUMMON_DESPAWNED not working when event_param1 was set to any value other than 0
(cherry picked from commit 457fc22473 )
2021-12-06 23:27:45 +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
ccrs
356358ee15
Core/Misc: standarize a couple logs
...
(cherry picked from commit aee26eb467 )
2021-12-02 00:39:28 +01:00
Killyana
e5eff88282
Core/SAI: Fix Move to position and Set run if used after a waypoint
...
Closes #22976
(cherry picked from commit 9ab05e2b6d )
2021-11-24 22:16:02 +01:00
Killyana
da1166db98
Core/SAI: Fix the respawn event for GameObjects ( #23112 )
...
Closes #22612
(cherry picked from commit 75a8639242 )
2021-11-24 22:15:52 +01:00
Aokromes
2682bf0fca
Core/Misc: Add categories to 3 logs
...
(cherry picked from commit 2d22c027fe )
2021-11-23 22:29:21 +01:00
Shauren
f2456ff319
Scripts/Areatriggers: Fixed all areatrigger scripts triggering both on enter and exit instead of only on enter
2021-11-10 00:01:50 +01:00
Treeston
34f9666f20
Core/Unit: Some charm fixes:
...
* Properly restore react state after possession expires. Closes #20769 .
* Possessed creatures now don't override player control with random/waypoint motion
* SmartAI creatures now properly re-aggress charmer after charm expires
(cherry picked from commit da21ca80fc )
2021-10-23 14:44:05 +02: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
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
0c3690db91
Core/SmartAI: SetRun fix for SAI, because for some reason it has like 95% of escortai code duplicated??? shitshow zz
...
closes #21463
(cherry picked from commit f95a383293 )
2021-10-22 00:41:41 +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
Killyana
e7f93ca96d
Core/SmartAI: Remove PauseMovement on AttackStart
...
Closes #21144
(cherry picked from commit e27a745c58 )
2021-09-25 20:43:39 +02:00
ariel-
962f6d7988
Core/Spells: rework part 5: GameObject casting
...
Closes #21330
Closes #18885
Ref #18752
(cherry picked from commit 45c5e1b9d6 )
2021-08-28 15:59:11 +02:00
ariel-
a1a00f823e
Core/Entities: kill unused return value from Unit::HandleSpellClick
...
- AI hook will now receive the result by copy, as modifying it had no effect
- Some renaming: result->spellClickHandled, clickPair is actually clickBounds, the clickPair is the pair <creatureID, SpellClickInfo>
(cherry picked from commit 98d6258efd )
2021-08-08 21:21:34 +02:00
Treeston
37298ca99c
Scripts/SmartAI: SetData now has an invoker (if the setting is done by something using SmartAI).
...
Also, some refactors. SMARTAI IS SUCH A FUCKING CLUSTERFUCK I SWEAR.
(cherry picked from commit cfc77fd843 )
2021-06-21 00:06:41 +02:00
Treeston
168be492f5
Entities/GO: Add forceRespawnTimer support to DespawnOrUnsummon. Use it in SAI.
...
(cherry picked from commit 264d4e1d30 )
2021-06-20 22:10:08 +02:00
Treeston
bd158f6c29
oops, now it builds (and a bonus refactor that annoyed me)
...
(cherry picked from commit 2cd5992f37 )
2021-06-20 21:42:35 +02:00
Treeston
1f26122528
Scripts/SmartAI: Forward invoker to invoked action list actions. Also JustAppeared -> InitializeAI.
...
(cherry picked from commit 6fb0bc1038 )
2021-06-20 21:42:35 +02:00
Treeston
06b5b8d8b7
Scripts/SmartAI: SMART_TARGET_INVOKER cleanup step 1. The core will now log errors on start-up if SMART_TARGET_INVOKER abuse is found, but will continue to load the scripts as deprecated for now.
...
Note that a lot of these scripts may either not currently work, not work reliably, or may be prone to breaking unexpectedly when core internals change. SMART_TARGET_INVOKER is undefined behavior on any event that doesn't directly specify its invoker.
(We are considering options for allowing INVOKER to make sense in timed action lists in a reliable fashion, so they are exempted at this time.)
(cherry picked from commit 482328bddf )
2021-06-20 21:42:33 +02:00
Treeston
7695784fd2
AI/SmartAI: Remove a silly incorrect piece of code that was breaking react state swaps on SAI creatures. Fixes #21353 .
...
(cherry picked from commit 6e0df9fce1 )
2021-06-19 01:55:18 +02:00
ariel-
861cf261c5
Core/Formations: update codestyle and fix crash
...
Closes #21288
(cherry picked from commit 73cc613dc8 )
2021-06-16 19:26:32 +02:00
Shauren
b9d63c2009
Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument
2021-05-16 21:56:06 +02:00
Shauren
91b91b502f
Core/Quests: Quest improvements
...
* Add quest log slot argument to functions dealing with objective progress
* Implemented QUEST_OBJECTIVE_FLAG_SEQUENCED (prevent progressing hidden objectives)
2021-05-09 20:21:32 +02:00
Shauren
dd8aed421a
Core/Quests: Drop unneeded QuestSpecialFlags
2021-05-09 16:01:34 +02:00
Treeston
e0afca513a
Core/AI: UnitAI.h trimming part two. WaypointX methods kicked upstairs to CreatureAI.h.
...
(cherry picked from commit 9c1e675590 )
2021-04-27 23:51:40 +02:00
Matan Shukry
8b0de23d0e
Core/SAI: Don't clear stored pathid if it changed after processing waypoint events ( #26334 )
2021-04-26 21:39:22 +02:00
Treeston
bce43de7f3
Core/AI: Some more refactoring prep for #19930 . CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now.
...
(cherry picked from commit 6113b9dec2 )
2021-04-16 20:22:13 +02:00
Keader
a7883380ce
Core/AI: Making guid const& in SetGUID method ( #21128 )
...
(cherry picked from commit 465b43fabe )
2021-04-15 05:53:27 +02:00
Matan Shukry
1b4c4d2164
Core/SAI: Implement quest source for SAI ( #26170 )
2021-03-06 14:20:39 +01:00
Shauren
875fd4107f
Core/SAI: Added SAI support for new areatriggers
2021-02-05 18:12:55 +01:00