Commit Graph

965 Commits

Author SHA1 Message Date
Shauren
4d4c7e6893 Core/Quests: Quest flag fixups
* Update flag names
* Implemented QUEST_FLAGS_COMPLETION_NO_DEATH and QUEST_FLAGS_FAIL_ON_LOGOUT
* Started using QUEST_FLAGS_COMPLETION_EVENT and QUEST_FLAGS_COMPLETION_AREA_TRIGGER instead of a custom SpeclalFlag
* Renamed Quest::IsAutoComplete to Quest::IsTurnIn to better describe what it means (a quest that can be turned in without accepting it to quest log)
* Implemented QUEST_FLAGS_UPDATE_PHASESHIFT and removed forced phaseshift updates on every quest status change
* Implemented QUEST_FLAGS_LAUNCH_GOSSIP_ACCEPT - reopens gossip menu with questgiver
2023-06-10 20:31:33 +02:00
Meji
06d0b16f15 Core/Creatures: Move creature difficulty specific data from creature_template table to creature_template_difficulty (#28931) 2023-05-29 00:01:23 +02:00
Shauren
083b8d6c84 Core/Misc: Fix build with libc++
Closes #28909
2023-04-10 00:08:32 +02:00
ModoX
356c98579b Core/SAI: Drop waypoints table and move existing rows to waypoint_data table (#28834) 2023-04-08 01:33:05 +02:00
Shauren
7b31080258 Core/Misc: Modernize code a bit by replacing std::tie with either structured bindings or operator<=> 2023-04-06 17:46:58 +02:00
Meji
81ea6f54d9 Core/Creatures: Compute CombatReach and BoundingRadius using DisplayScale (#28863) 2023-03-30 18:54:27 +02:00
Shauren
d26d38075c Core/Creatures: Allow disabling melee attacks for all creatures, not just the ones using SAI 2023-03-13 20:22:47 +01:00
Meji
7b14b9ef22 Core/SAI: Set the trigger player as baseobject when the source type isn't a WorldObject (#28767) 2023-01-31 19:38:34 +01:00
Shauren
3df16c12b7 Core/Scripts: Move EvadeReason outside of CreatureAI class 2023-01-19 21:23:06 +01:00
Meji
fc65154fd3 Core/SAI: Added missing target guid validations (#28745) 2023-01-14 23:04:46 +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
Meji
f291ca9796 Core/SAI: Improved SMART_ACTION_JUMP_TO_POS to mirror behavior similar to SMART_ACTION_MOVE_TO_POS (#28547)
*  Support for targets other than positions
*  Added param3 Gravity, to use MoveJumpWithGravity (priority over SpeedZ)
*  Added param4 UseDefaultGravity (priority over Gravity): 19.29110527038574
*  Added param5 PointId, useful for linking the jump to the event SMART_EVENT_MOVEMENTINFORM (Type: 16)
*  Added param6 ContactDistance
*  If the target is different from a position, target params for coords allow to add offsets
2022-12-30 17:48:33 +01:00
Aqua Deus
09591fbdb0 Core/SAI: Add action param 7 (#28519)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-12-30 16:32:37 +01:00
Shauren
abe84b9acf Core/SAI: Fixed unused param validation for SMART_ACTION_MOVE_OFFSET 2022-12-23 13:45:10 +01:00
Meji
e218f27602 Core/SAI: Added param PointId to SMART_ACTION_MOVE_OFFSET (#28555) 2022-12-22 23:51:49 +01:00
ModoX
204cf030cc Core/SAI: Move (any) value for SMART_EVENT_MOVEMENTINFORM point to 0xFFFFFFFF (#28417) 2022-10-31 21:33:57 +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
3ef5079fee Core/Loot: Move loot rolls from Group to Loot
* Partial port of cmangos/mangos-wotlk@ffdf9a05d6
2022-09-16 16:58:03 +02:00
offl
b0164fb2b9 Core/SAI: Rename LeavingWorld to OnDespawn & use it in SAI (#28059)
(cherry picked from commit b9450bcdd0)
2022-09-05 19:43:09 +02:00
Meji
9ca8cf66e6 Core/SAI: Allow using default npc_text from gossip_menu with SMART_ACTION_SEND_GOSSIP_MENU (#28097) 2022-07-07 16:08:04 +02:00
offl
04b0596021 Scripts/Quest: Rework 'The Way to His Heart...' & make SAI's StopFollow work again (#28001)
(cherry picked from commit 861ec6a5b9)
2022-06-10 19:22:08 +02:00
Ovah
8501fb572a Core/Movement: Allow waypoints to use 0 as valid facing value (#26655)
(cherry picked from commit 4747515872)
2022-06-10 16:50:17 +02:00
Antonio Martín Berti
a4eafbd3f6 Core/SAI: Added Action SMART_ACTION_DO_ACTION for calling DoAction on target AI (#27964) 2022-06-08 15:50:44 +02:00
Antonio Martín Berti
c6802e272b Core/SAI: Removed invalid eventId restriction on SMART_EVENT_ACTION_DONE (#27972) 2022-05-26 11:54:24 +02:00
Shauren
51299ab886 Core/SAI: Corrected wrong useSaiTargetAsGameEventSource logic in previous commit 2022-04-24 16:21:29 +02:00
Shauren
9d0187dd56 Core/SAI: Implemented new action SMART_ACTION_TRIGGER_GAME_EVENT 2022-04-24 15:02:40 +02:00
Shauren
b8246d1ba7 Core/SAI: Support gameobject targets for SMART_ACTION_PLAY_ANIMKIT 2022-04-24 14:35:38 +02:00
Shauren
98e848436d Core/Misc: Apply various cosmetic changes that were made to 3.3.5 branch when porting master branch code there 2022-04-01 20:36:30 +02:00
Shauren
b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
Shauren
4eba978670 Core/Misc: Rename SetXXXFlags updatefield functions to ReplaceAllXXXFlags 2022-03-26 18:59:44 +01:00
offl
050f55b62f Core/AI: OnSpellCast, OnSpellFailed, OnSpellStart hooks (#27704)
(cherry picked from commit 3dca705acc)
2022-03-26 15:15:46 +01:00
offl
8b7effa4cf Core/SAI: Remove SMART_ACTION_ADD_AURA & actions to change object flags (#27571)
(cherry picked from commit 5ba93a95de)
2022-03-24 23:52:32 +01:00
offl
52bb230e4c Core/SAI: Use GetBaseObject as second param of SMART_ACTION_ACTIVATE_GAMEOBJECT & reorder GameObjectActions (#27461)
(cherry picked from commit 87cb0a4212)
2022-03-24 21:55:46 +01:00
offl
9ea8cdb457 Core/SAI: Remove SMART_ACTION_SEND_GO_CUSTOM_ANIM, make SMART_ACTION_ADD_AURA & SMART_ACTION_SET_GO_FLAG deprecated (#27452)
(cherry picked from commit 7709837539)
2022-03-24 21:48:47 +01:00
offl
3cfca16359 DB/SAI: Replace SMART_ACTION_SEND_GO_CUSTOM_ANIM with GameObjectActions
(cherry picked from commit 8516984ffe)
2022-03-24 00:08:45 +01:00
jackpoz
ccf8cf3bbf Core/SAI: Fix error message
Fix the error message about valid range values for SMART_ACTION_ACTIVATE_GAMEOBJECT

(cherry picked from commit 5b9acbded1)
2022-03-22 00:16:03 +01:00
offl
e27724b362 Core/SAI: Remove deprecated events and actions (#27258)
(cherry picked from commit c508203895)
2022-03-21 23:26:47 +01:00
offl
ebcd45b7e1 Core/SAI: Remove reactState param from SMART_ACTION_WP_START (#27255)
Ref #26728

(cherry picked from commit 04909bada8)
2022-03-21 23:02:31 +01:00
Giacomo Pozzoni
791b759332 Core/SAI: Add SMART_ACTION_ACTIVATE_GAMEOBJECT action (#27216)
Closes #27196

(cherry picked from commit 0817be8f76)
2022-03-21 22:59:21 +01:00
offl
6ac4e9dd4a Core/SAI: Make 'no, thanks' actions deprecated
Deprecated events and actions will be removed after 2 weeks

(cherry picked from commit ab3bb36a46)
2022-03-20 16:39:53 +01:00
offl
0ad6258d4b Core/SAI: Make SMART_EVENT_WAYPOINT_START & SMART_EVENT_CHARMED_TARGET deprecated
Deprecated events and actions will be removed after 2 weeks

(cherry picked from commit 9e78329c8b)
2022-03-20 00:47:12 +01:00
offl
2beb606cdf DB/SAI: Make SMART_EVENT_EVENT_PHASE_CHANGE deprecated; avoid AddAura, re-handle equipment in few scripts
Deprecated events and actions will be removed after 2 weeks

Ref 1d1e090fe9 0e1835ee78

(cherry picked from commit 1053345692)
2022-03-20 00:45:30 +01:00
offl
29190e5642 Core/SAI: Remove deprecated events and actions (#27039)
(cherry picked from commit 887605d945)
2022-03-20 00:13:00 +01:00
offl
e80777cb39 Core/SAI: Split set/remove unit_flags actions (#26954)
(cherry picked from commit 0a2fca1aed)
2022-03-18 00:04:03 +01:00
offl
f55e86d907 Core/SAI: Remove possibility to set/remove unit_flags2
So far I see that only Cannot Turn flag can be changed by scripts and action to change it didn't existed in 3xx. If someone will need to change that flag, it should be implemented by action which will change only that flag and not any flag of that type.

(cherry picked from commit c8061d8ba6)
2022-03-15 23:59:35 +01:00
Giacomo Pozzoni
318e0e2406 Handle deprecated SAI actions and events (#26846)
* Core/SAI: Show a clear error for no longer supported SAI actions

* Core/SAI: Show a warning for deprecated SAI events, still loading them.

Disable log "sql.sql.deprecation" in config if you want to ignore the warning

(cherry picked from commit 3af4d17188)
2022-03-14 00:09:26 +01:00
Giacomo Pozzoni
a19c71a770 Core/SAI: Change error to warning for unused parameters (#26848)
Change error to warning for unused parameters and load the scripts instead of skipping them

(cherry picked from commit cb764a932d)
2022-03-13 23:43:28 +01:00
offl
7d9088e9cf Core/SAI: Remove SMART_ACTION_INSTALL_AI_TEMPLATE (#26797)
(cherry picked from commit ff8663ca15)
2022-03-12 16:19:47 +01:00
Giacomo Pozzoni
71c2f0af46 Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken (#26787)
* Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken

* Update scripts

(cherry picked from commit 0800ab20a8)
2022-03-12 14:45:04 +01:00