Commit Graph
811 Commits
Author SHA1 Message Date
Ovahlord 5d22ddd499 Core/Misc: rename Powers to PowerType 2026-06-09 08:19:48 +02:00
Ovahlord 0927c5af40 Core/Misc: backported most boost changes from master branch 2025-02-27 23:47:52 +01:00
Shauren 8acfadc779 Core/Objects: Treat areas that have ParentAreaID filled but dont have IsSubzone flag as zones instead of areas 2023-10-09 21:05:00 +02:00
funjoker df32b341a5 DB/Creatures: Port master model system
Fixes incorrect displayid for creatures, due to probability
2023-09-15 23:52:51 +02:00
Ovahlord 0840143137 Core/Movement: reworked chase movement
* the destination prediction is now much more reliable
* the movement generator will now more frequently check for valid positions to match retail behavior
* the catch-up mechanic will now adapt its speed to the target's one when being close enough to hit it
* temporarily disabled backwards movement when being too close to a target to avoid some edge cases that need additional research
* fixed the pathfinding reaching behavior so that they no longer follow you to unreachable obstacles and return home when they can't reach you anymore

closes #345
closes #260
2023-08-24 20:16:41 +02:00
Ovahlord a3dd0d75cf Core/Quests: ported quest flag and visbility update changes from master branch 2023-07-11 15:21:09 +02:00
Ovahlord c6711adf8b Core/AI: ported SpellHit and SpellHitTarget refactor from 335 branch 2022-09-22 10:33:13 +02:00
ariel- b6fac86b71 Core/Spells: rework part 5: GameObject casting 2022-09-12 09:15:14 +02:00
Ovahlord 949f92e0a1 Core/AI: ported charm updates from 335 2021-09-16 16:48:07 +02:00
Ovahlord b236bd39df Core/Movement: updated smartAI waypoint support to use the new smooth transition field as well 2021-07-16 16:56:47 +02:00
Ovahlord 4f23fb3d29 Core/Quests: make the player questgiver handling a bit more flexible to allow popup quest accepting at more places in the future 2021-03-28 14:44:16 +02:00
Ovahlord b875d77dc8 Core/SAI: refactored SMART_EVENT_FRIENDLY_HEALTH_PCT to reflect the behavior of SMART_EVENT_FRIENDLY_HEALTH
* added radius event parameter to limit the search range of the executing creature
* moved the pct check to a macro and corrected the selection logic to support all target types
2021-02-25 15:40:05 +01:00
Ovahlord 3cb0a99019 Core/Movement: expose orientation, velocity and delay members to SmartAI waypoints as well
superceeds #200
2021-02-24 16:22:36 +01:00
Ovahlord 961f82988d Core/Movement: allow MotionMaster::MovePoint to use velocity arguments and implement speed paramemters for SMART_ACTION_MOVE_OFFSET and SMART_ACTION_MOVE_TO_POS 2020-10-30 18:57:09 +01:00
Ovahlord 9320382d90 Core/SAI: implement SMART_ACTION_SET_AI_ANIM_KIT and SMART_ACTION_SET_HOVER 2020-10-30 18:19:10 +01:00
Ovahlord 361ac2292b Core/Movement: add velocity field to waypoint_data to allow specifying custom speed value for waypoints and cyclic splines
* standartized member naming in WaypointNode and WaypointPath struct
2020-09-24 14:30:48 +02:00
Ovahlord 27c1fd6aee Core/Movement: implement cyclic spline database support 2020-09-21 00:32:55 +02:00
Ovahlord 1507ca0179 Fixed build 2020-08-22 18:46:57 +02:00
Ovahlord 52287e1f07 Core/SAI: ported set speed, weather and override light smart actions from 335 2020-08-22 18:16:03 +02:00
Treeston f41cfa9185 Core/SmartAI: SmartAI creatures no longer process health-based hooks after death. 2020-07-22 19:21:21 +02:00
Treeston 6867b3b201 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.
# Conflicts:
#	sql/old/4.3.4/world/27_2018_03_16/2018_08_22_11_world.sql
#	src/server/game/AI/SmartScripts/SmartScript.cpp
2020-07-22 17:41:25 +02:00
Treeston 18bcdbfd7d AI/SmartAI: Remove a silly incorrect piece of code that was breaking react state swaps on SAI creatures. Fixes #21353. 2020-07-22 17:18:52 +02:00
Treeston 942c3a77da 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.
2020-07-22 16:49:37 +02:00
Treeston 2cc36c5eec Core/AI: UnitAI.h trimming part two. WaypointX methods kicked upstairs to CreatureAI.h. 2020-07-22 15:11:26 +02:00
Treeston e4ced70a31 Core/Misc: random refactors 2020-07-22 14:55:48 +02:00
treeston 618e604141 Two more refactors I missed for #19930. Last ones for now, I promise. 2020-07-22 13:48:36 +02:00
Treeston ec04d3b2cd [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2020-07-22 13:43:23 +02:00
Ovahlord e1d74d4dc6 Core/Misc: added more fallthrough attributes and added some missing breaks reported by CI 2020-07-19 12:24:58 +02:00
Peter Keresztes Schmidt a06e5d7d40 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs 2020-07-18 22:43:24 +02:00
Ovah b09d6e2330 Core/Movement: reimplement follow movement (#124) 2020-06-26 21:22:21 +02:00
Ovahlord 3f6455d9bb Core/SAI: implement SMART_ACTION_ATTACK_STOP
Unlike SMART_ACTION_AUTO_ATTACK, this action is actually stopping the entire attack procedure, rather than just hack-disabling auto-attacks. Keep in mind that this action requires a passive react state to prevent a immediate AttackStart ai reaction
2020-06-15 04:46:10 +02:00
Warpten 0af44ccc01 Core/Spells: implement DoT clipping
* Core/Spells: Implementation of DoT clipping.
* Core/Utilities: Backport "EnumFlags v3.0" from master.
* Core/Spells: Switch AURA_REMOVE_MODE to a flag set.
2020-06-04 18:16:03 +02:00
Shauren d003ebd8e4 Core/DBLayer: Prevent using prepared statements on wrong database 2020-04-15 19:18:58 +02:00
Ovahlord f1f00c3ec3 Core/Datastores: refactor DBC storage helpers to use a class and fixed no pch build 2020-03-18 15:24:25 +01:00
Ovahlord ae657b2c31 Core/AI: fixed smartAI validation 2020-02-18 22:39:40 +01:00
Ovahlord 6dce62f0fd Core/AI: replaced SMART_ACTION_STOP_MOTION with new functionality called SMART_ACTION_PAUSE_MOVEMENT 2020-02-18 22:13:33 +01:00
jackpoz 183789053e Core/Misc: Fix GCC 8 warnings 2020-01-31 21:19:25 +01:00
Ovahlord f2713834c7 Core/AI: cleaned up SAI initialization in order to fix some unexpected behaivior when summoning creatures with sai assigned 2020-01-31 11:27:58 +01:00
Wyrserth e410c3498b Core/SAI: add param3 to SMART_ACTION_CALL_TIMED_ACTIONLIST to allow it to override a currently running actionlist. 2020-01-27 03:23:38 +01:00
Ovahlord fcb79fee07 Core/Datastores: updated DBC structure names to generated member format 2020-01-25 12:36:32 +01:00
Aokromes d6d3f06f06 New year 2020-01-04 18:32:38 +01:00
funjoker 6c56916b29 Misc: Update copyright information
Happy new year
2020-01-01 18:47:28 +01:00
Ovahlord 15f09fb82b Core/Misc: fixed warnings and building connection patcher with boost versions below 1.61 2019-11-06 00:51:04 +01:00
ccrs 94980ab362 Core/Movement: move MoveSplineInit (#21857)
The number of edge cases in which weirdness is seen on "effect movements" will be kinda reduced, plus consistency, plus movementInform on custom movement spline initalizations.

Core/Movement: use helpers for validation

Core/Movement: crashfix workaround
2019-10-06 04:55:46 +02:00
Treeston 90540d684b Core/Misc: Various dynspawn cleanup and refactors split off from pooling rewrite:
- Map::RemoveRespawnTime(SpawnObjectType, LowType, doRespawn) split into Map::Respawn and Map::RemoveRespawnTime, without the extra boolean
- Map::RemoveRespawnTime(RespawnInfo*) merged into Map::DeleteRespawnInfo(RespawnInfo*) and is now private
- Map::DeleteRespawnInfo(void) renamed to Map::UnloadAllRespawnInfos to properly describe what it does
- Map::ProcessRespawns now actually saves the delayed respawn time to DB if the respawn was delayed
- Map::AddRespawnInfo now takes const reference, and returns success as a boolean
- Map::AddRespawnInfo no longer offers an unused "replace" parameter
- Map::DeleteRespawnInfo no longer offers a variety of unused private overloads
- Map::SaveRespawnTime no longer offers a tantalizing writeDB parameter. Parameter is now called "startup" to properly describe what it does.
- Map::SaveRespawnInfoDB now takes RespawnInfo reference instead of all the various fields. Still public because compatibility mode. QQ.
- Map::GetWorldObjectBySpawnId sanitized
- Map::GetXRespawnTime methods sanitized to all go through Map::GetRespawnTime

----------

Core/DB: Unify `creature_respawn` and `gameobject_respawn` into a single `respawn` table
2019-08-18 12:47:10 +02:00
Wyrserth e3cb264262 Core/SAI: allow to start waypoint movement for a creature that is in combat. (#23426)
# Conflicts:
#	src/server/game/AI/SmartScripts/SmartAI.cpp
2019-06-18 20:42:30 +02:00
Wyrserth 4d3e7e2600 Core/SAI: add cooldownMin (event_param2) and cooldownMax (event_param3) to SMART_EVENT_ACCEPTED_QUEST and SMART_EVENT_REWARD_QUEST. (#23422) 2019-06-18 20:24:09 +02:00
Wyrserth d339fdc354 Core/SAI: don't allow to start a new SAI actionlist while the entity is already running one. (#23421) 2019-06-17 00:36:06 +02:00
Aokromes d6e6750b67 Core/SmartScripts: Implement SMART_ACTION_PLAY_CINEMATIC
By Malcrom
2019-05-27 16:07:55 +02:00
Ovahlord 1c7a520095 Revert "Core/SmartAI: Remove duplicate OnReset() call"
This reverts commit 73345b0d7f.
2019-04-27 17:38:06 +02:00