Shauren
b13e9f9d61
Core/Misc: Fixed clang 13 warnings, gcc 11 build errors and nopch build
2021-10-25 00:05:05 +02: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
ModoX
437fb2aaba
Core/CreatureTexts: Added new field SoundPlayType to enable usage of ObjectSounds within creature_text ( #27136 )
...
* Also adjusted Vigilant Quoram texts to use ObjectSounds
2021-10-23 13:10:32 +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
Treeston
f6ceb4bf0c
Scripts/SmartScripts: _SET_IN_COMBAT_WITH_ZONE and _CALL_FOR_HELP no longer use a target. Because that feature made no sense and was unused.
...
(cherry picked from commit 5706d49e49 )
2021-10-22 23:20:36 +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
Treeston
45766c3d6e
DBError follow-ups:
...
* broadcast_text mismatch (6eb7f06 ) is now a _INFO since Aok isn't nearly as fast as fixing as he claimed.
* SmartAI invoker misuse (482328b and a3c85c8 ) are now blocking errors
(cherry picked from commit 38d3b35561 )
2021-10-22 00:41:07 +02:00
Treeston
0aee79dfb8
AI/SmartScripts: Replace SMART_ACTION_INVOKER_CAST with SMART_ACTION_SELF_CAST in action 85. SMART_ACTION_INVOKER_CAST moves to 134.
...
(cherry picked from commit 0df3cb5bcc )
2021-10-17 22:07:54 +02:00
Treeston
a2d266edf3
AI/SmartScripts: Warn on startup for ACTION_INVOKER_CAST without invoker (same as invoker targets)
...
(cherry picked from commit a3c85c8a2b )
2021-10-17 20:14:45 +02:00
Shauren
d2dcce09d7
Core/SAI: Fixed SMART_ACTION_EQUIP to properly set values in all slots (cherry-pick error)
2021-10-10 14:22:18 +02:00
Shauren
3fe9b0a296
Core/Conversations: Replace _participants with generic personal object implementation
2021-10-09 13:30:47 +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
ccrs
0b6049fe0b
Core/Movement: use helpers for validation
...
(cherry picked from commit 7118806231 )
2021-09-26 14:21:14 +02:00
Shauren
334b02e1da
Core/SAI: Fixed crashes when SAI targets pets that use sai if not tamed
...
Closes #21870
(cherry picked from commit beb333738d )
2021-09-26 12:43:18 +02:00
Shauren
e598cfe28d
Core/SAI: Fixed silence logic in 1e8227eda7
...
(cherry picked from commit 668df7fd01 )
2021-09-25 20:46:13 +02:00
Killyana
c0cb8fc1fe
Core/SAI: Allow movements for creature using castflag 64 when silenced
...
Closes #20222
(cherry picked from commit 1e8227eda7 )
2021-09-25 20:45:27 +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
Shauren
8a4e1119ac
Core/Spells: Unify spell effect access api in both branches
2021-09-04 15:13:15 +02:00
Shauren
8cc418460f
Core/Misc: Fix gcc warnings
2021-08-28 16:08:33 +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
32997a5989
Core/SmartScripts: Rename SMART_ACTION_RESPAWN_TARGET -> SMART_ACTION_ENABLE_TEMP_GOBJ, since that's the only thing it still does in the dynspawn model. Adjust body accordingly to warn on misuse.
...
(cherry picked from commit 0850b5ff39 )
2021-08-08 21:21:34 +02:00
Treeston
61baf6704c
AI/SmartAI: New SMART_ACTION_RESPAWN_BY_SPAWNID (hi kilyana)
...
(cherry picked from commit 691c67f0be )
2021-08-08 21:21:34 +02:00
Killyana
4b6e76a5ef
Core/SAI: Add an action_param3 to "summon gob" to control when the object will despawn
...
0 - For despawn when creature dies or time runs out
1 - For despawn after time
Closes #11601
(cherry picked from commit ca4f1e334a )
2021-06-22 12:51:28 +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
bccd81e12a
Entities/GO: GameObjects now support (delayed) despawning in a reasonable manner. Closes #21406 .
...
(cherry picked from commit f071fa9e93 )
2021-06-20 21:49:11 +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-
d0f4310c44
Core/Entities: don't allow client control if player is still affected by any lose of control state
...
(cherry picked from commit e315e41d36 )
2021-06-16 21:26:57 +02:00
ariel-
c77925da4a
Core/Entities: killed Creature::SetInCombatWithZone and replaced with AI version
...
Closes #12108 (again)
(cherry picked from commit 7c9722a4ae )
2021-06-16 21:03:06 +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
Moein
172df39350
Core/SAI: Extended SMART_TARGET_VEHICLE_PASSENGER to allow specifying seat mask instead of single seat index (can now target all passengers) ( #21245 )
...
(cherry picked from commit 891bca934e )
2021-06-15 23:37:25 +02:00
Shauren
b9d63c2009
Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument
2021-05-16 21:56:06 +02:00
Treeston
34c7810fe5
Core: Combat/threat system rewrite (PR #19930 )
...
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
- They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
- ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
- ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542 ).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.
Closes #7951 and #19998 .
(cherry picked from commit 532ab1c7f8 )
2021-05-16 21:56:01 +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
Shauren
33b3ebcae6
Core/Objects: Pass privateObjectOwner guid directly to SummonCreature functions
2021-03-28 20:22:05 +02:00
Matan Shukry
c019d4f10c
Core/SAI: Don't require BaseObject when creating conversation from smart scripts ( #26209 )
2021-03-07 11:17:04 +01:00
Matan Shukry
1b4c4d2164
Core/SAI: Implement quest source for SAI ( #26170 )
2021-03-06 14:20:39 +01:00
jackpoz
55931b0d92
Core/SmartScripts: Code cleanup
...
(cherry picked from commit f555a67bf8 )
2021-03-04 18:17:08 +01:00
Killyana
77ee6dca45
Core/SAI: Add event_parm5 "player only" for EVENT_OOC_LOS and EVENT_IC_LOS
...
Closes #21497
(cherry picked from commit 5ad38c31b0 )
2021-03-04 18:15:55 +01:00
Shauren
afae75841b
Core/SAI: Rename SMART_ACTION_TALK_CONVERSATION to SMART_ACTION_CREATE_CONVERSATION
2021-02-27 11:42:44 +01:00