Commit Graph

104 Commits

Author SHA1 Message Date
Hondacrx 921b3deec4 Core/SAI: Replace sai specific object type checking functions with Object functions
Port From (https://github.com/TrinityCore/TrinityCore/commit/4887e0ea1da6fe32c76a899f03c4bf10ed21bc55)
2025-08-20 10:15:11 -04:00
Hondacrx 6a24e9ce29 Core/SAI: Allow update of disable gravity/root applied via static flags (using related action type)
Port From (https://github.com/TrinityCore/TrinityCore/commit/2cf2535cd637b5b8966f7990f6826bdac94d77ce)
2025-02-23 14:26:44 -05:00
Hondacrx 21eca77ad8 Core/SAI: Implemented new event type SMART_EVENT_AREATRIGGER_EXIT (88)
Port From (https://github.com/TrinityCore/TrinityCore/commit/0d5242daae3fab31ffc73faafa21ad65e5cd9670)
2024-11-11 10:46:00 -05:00
Hondacrx da8b685c14 Core/Movement: Implemented alternative method of smoothing waypoint paths (send new point 1.5 before arrival) and make that the default
Port From (https://github.com/TrinityCore/TrinityCore/commit/cf1ab7b4142f1d070d999c4141109a6c6c46d06d)
2024-08-18 18:22:59 -04:00
Hondacrx 2f71dbfda0 Core/SAI: Implement waiting for actions on action list to finish before continuing the action list
Port From (https://github.com/TrinityCore/TrinityCore/commit/5dfac0ef142c1b59e41c51ab2cca48083be4cb9e)
2024-08-08 17:28:27 -04:00
Hondacrx 44f1a733e7 Core/SAI: Allow gameobjects to be targeted by spell casts
Port From (https://github.com/TrinityCore/TrinityCore/commit/22e43917abef1eea31e86c01070afbee19c0cdbc)
2024-08-04 17:09:52 -04:00
hondacrx 9d1589afd4 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)
Port From (https://github.com/TrinityCore/TrinityCore/commit/a748fddfa47216e1f516303e3bca9b5a86823748)
2024-02-24 15:18:07 -05:00
hondacrx 437fe2d8fd Core/Creatures: Moved autoattack handling from scripts to game
Port From (https://github.com/TrinityCore/TrinityCore/commit/605e5f94c0d71cad8e83fa5a07eaec4e6bed9cc3)
2024-02-05 18:18:30 -05:00
hondacrx 771cbadc69 Core/Waypoints: Refactor to split data into path and node related info in db
Port From (https://github.com/TrinityCore/TrinityCore/commit/12186ef8573f60abeff4747da58767ee71092600)
2024-02-05 17:22:55 -05:00
hondacrx cda53c8e7f Some cleanups. (might break build for scripts as they are a WIP) 2023-10-08 10:35:31 -04:00
hondacrx a9544c4163 Core/SAI: Fixed event SMART_EVENT_WAYPOINT_ENDED
* also moved "any" pointid to 0xFFFFFFFF for waypoint sai events:
* SMART_EVENT_WAYPOINT_REACHED
* SMART_EVENT_WAYPOINT_RESUMED
* SMART_EVENT_WAYPOINT_PAUSED
* SMART_EVENT_WAYPOINT_STOPPED
* SMART_EVENT_WAYPOINT_ENDED
Port From (https://github.com/TrinityCore/TrinityCore/commit/76d2f29e4e4c0e14a014676aafff2f8836f96ea0)
2023-06-30 08:31:39 -04:00
hondacrx 068ccd990f Core/Creatures: Move creature difficulty specific data from creature_template table to creature_template_difficulty
Port From (https://github.com/TrinityCore/TrinityCore/commit/06d0b16f158e8793860d9edd11b990f20b1d0dac)
2023-05-30 08:16:40 -04:00
hondacrx 792a6ecd84 Core/SAI: Drop waypoints table and move existing rows to waypoint_data table
Port From (https://github.com/TrinityCore/TrinityCore/commit/356c98579babd1aef12e2b5ef28baba2403368d0)
2023-04-25 17:05:34 -04:00
hondacrx d0b7bcb2fe Core/Creatures: Allow disabling melee attacks for all creatures, not just the ones using SAI
Port From (https://github.com/TrinityCore/TrinityCore/commit/d26d38075cdb56dcef77f05276a360e717cc5032)
2023-03-14 04:34:51 -04:00
hondacrx f73e64396f Update license headers for all files. 2023-01-18 17:25:32 -05:00
hondacrx 0a28bd434a Core/SAI: Rename LeavingWorld to OnDespawn & use it in SAI
Port From (https://github.com/TrinityCore/TrinityCore/commit/b0164fb2b9cc35663e337d48660d5bca1e973d99)
2022-09-05 21:57:54 -04:00
hondacrx 63cbd18350 Fixed crashes and errors when loading into world. 2022-06-21 14:56:22 -04:00
hondacrx 04caa3e757 Misc fixes 2022-06-15 18:27:32 -04:00
hondacrx 5833be817a Fix build 2022-05-31 11:46:11 -04:00
hondacrx 6751370788 Misc fiixes 2022-05-30 16:21:09 -04:00
hondacrx f53c4cb009 Core/Misc: Rename SetXXXFlags updatefield functions to ReplaceAllXXXFlags
Port From (https://github.com/TrinityCore/TrinityCore/commit/4eba9786708dd3b22d9053c1a14eac7e6d03242e)
2022-05-30 15:57:56 -04:00
hondacrx 306b0cb227 Core/AI: OnSpellCast, OnSpellFailed, OnSpellStart hooks
Port From (https://github.com/TrinityCore/TrinityCore/commit/050f55b62fded4cc73b76e42d56d98ea950cc26a)
2022-05-30 15:44:21 -04:00
hondacrx f7686f696d Core/SAI: Remove deprecated events and actions
Port From (https://github.com/TrinityCore/TrinityCore/commit/e27724b3620ce245c8055d1cfa58b7caade7fb64)
2022-05-30 13:54:58 -04:00
hondacrx 0534356aff Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken
Port From (https://github.com/TrinityCore/TrinityCore/commit/71c2f0af46b3ccec8c3422534e4403f3650b757d)
2022-05-29 20:34:44 -04:00
hondacrx a59b3b8075 Core/SmartAI: AI change on charmed
Port From (https://github.com/TrinityCore/TrinityCore/commit/8a4d731d55af63210e660727dc0aea68c8ecce05)
2022-05-25 13:46:41 -04:00
hondacrx 1e80eb21f0 Core/SAI: Fix SMART_ACTION_WP_RESUME actually pausing next waypoint if the current path was not paused
Port From (https://github.com/TrinityCore/TrinityCore/commit/eb17e94b2e0059edeb747cb03e6828a746a2c0b8)
2022-05-24 12:57:10 -04:00
hondacrx a4d5b9eb6f Core/SAI: Fix SMART_ACTION_WP_PAUSE with 0 delay pausing the path only for 1 world loop update
Port From (https://github.com/TrinityCore/TrinityCore/commit/60519e947f634f12aa93a1871d53e012ed9e57d2)
2022-05-24 10:04:06 -04:00
hondacrx 52ce6b2700 Add "On" to some gossip methods in AI
Port From (https://github.com/TrinityCore/TrinityCore/commit/bc04acb72652882290cef49b2055d3cf1ab12f36)
2022-05-04 09:26:05 -04:00
hondacrx 7a7c3a3a1f Core/Scripts: Remove now-unused WaypointPathStarted hook. WaypointStarted does everything it used to do, anyway.
Port From (https://github.com/TrinityCore/TrinityCore/commit/fc094509e9df59e055840936ba3389504fba87df)
2022-04-28 10:37:51 -04:00
hondacrx ec88268d0f Core/SAI: Fix SMART_EVENT_WAYPOINT_START not being called at every waypoint checking wrong path id parameter
Port From (https://github.com/TrinityCore/TrinityCore/commit/c2d2df96dbe8e31e27283f73bad576ab42a3d579)
2022-04-28 10:36:37 -04:00
hondacrx 3f8c0f897a Core/SAI: Fix creatures casting spells while moving with flag SMARTCAST_COMBAT_MOVE
Port From (https://github.com/TrinityCore/TrinityCore/commit/b3545479bfbd2b743288bd32094ce8c4856a1e3d)
2022-03-02 18:02:58 -05:00
hondacrx bd040a1f17 Creature/AI: Remove SetVisible from SmartAI::InitializeAI
Port From (https://github.com/TrinityCore/TrinityCore/commit/77d76ecc1d13069fcff3fd1b609c924bca5ee965)
2022-02-27 23:47:00 -05:00
hondacrx 6df3ca3a3b Core/SAI: Add SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER
Port From (https://github.com/TrinityCore/TrinityCore/commit/f383c0ea214cc4da2d02b81e26297d77ff59c7ed)
2022-02-27 14:29:40 -05:00
hondacrx aff47f6501 Core/SAI: do not allow the waypoint pause timer to update while in combat.
Port From (https://github.com/TrinityCore/TrinityCore/commit/381333690b33c9148e994d9f68e7d12f1d5dc31d)
2022-02-27 13:58:30 -05:00
hondacrx 1b28a8260c Core/SAI: implement SMART_EVENT_SUMMONED_UNIT_DIES (82), useable by creatures and gameobjects
Port From (https://github.com/TrinityCore/TrinityCore/commit/d4a1a7a040be0ca0d6428669135bcc64d92be1c2)
2022-02-27 13:57:18 -05:00
hondacrx c41acd0bc8 Core/AI: refactor SpellHit and SpellHitTarget.
Port From (https://github.com/TrinityCore/TrinityCore/commit/3171cd3fa9dbcec43f5d70b74ab2f54a2aa44173)
2022-02-23 16:02:13 -05:00
hondacrx 6c0e21b4de Misc updates/fixes 2022-01-27 12:36:56 -05:00
hondacrx 56e6674001 Core/AI: Fix charmed Creatures with SAI scripts not starting waypoint paths
Port From (https://github.com/TrinityCore/TrinityCore/commit/c75d75b9fa53309467ec7fff810dd77d9f7fde09)
2022-01-07 11:36:15 -05:00
hondacrx b69a918d9f Core/AI: Fix remaining charming issue
Port From (https://github.com/TrinityCore/TrinityCore/commit/dab7e5688c55d4b785a9277d15ea55e075870849)
2022-01-07 11:20:03 -05:00
hondacrx b30ded6189 Core/AI: Make charmed creatures follow their owner
Port From (https://github.com/TrinityCore/TrinityCore/commit/144cfc2bcebbd0d2bbce5f97a06f634d17d62e79)
2022-01-07 11:12:23 -05:00
hondacrx acfe9946c6 Core/AI: Fix creatures not updating their target properly once engaged
Port From (https://github.com/TrinityCore/TrinityCore/commit/d946d74ff9f2d4bec8b78a6b7ea85fbb9daefeb5)
2022-01-05 23:46:16 -05:00
hondacrx e70e2d0088 Core/SmartAI: SmartAI creatures no longer process health-based hooks after death.
Port From (https://github.com/TrinityCore/TrinityCore/commit/3db58c4d96c446b736b84d4954f8fd9c9e309e33)
2022-01-02 19:15:03 -05:00
hondacrx a4c4897b4d Core/SmartAI: add missing movement generator type check on SmartAI::SetCombatMove
Port From (https://github.com/TrinityCore/TrinityCore/commit/e94dca132b4a505f3cc4583bd63879148ad51ca3)
2022-01-01 16:17:58 -05:00
hondacrx c0aad82cd1 Core/SmartAI: allow more Unit::ResumeMovement calls on JustReachedHome()
Port From (https://github.com/TrinityCore/TrinityCore/commit/f1ef2f73a4da4cf466728903207e9d623800d70e)
2022-01-01 16:11:41 -05:00
hondacrx 0f248e2faa Core/SAI: allow creatures to handle gameobject spellhit SAI events.
Port From (https://github.com/TrinityCore/TrinityCore/commit/83a9222c390110ae082512ed858a5580a958aa21)
2021-12-24 21:05:03 -05:00
hondacrx 925119c2ca AI/SmartAI: Properly forward to inherited CreatureAI::JustAppeared in SmartAI::JustAppeared.
Port From (https://github.com/TrinityCore/TrinityCore/commit/743d022cee936d47a60f23e72fda7fb72ee61907)
2021-12-24 20:16:01 -05:00
hondacrx 3c38758f09 AI/SmartAI: Move SMART_EVENT_RESPAWN invocation from ::InitializeAI() to ::JustAppeared().
Port From (https://github.com/TrinityCore/TrinityCore/commit/e398bb16648b483c97a68b2a29b25173b2a71261)
2021-12-23 20:24:47 -05:00
hondacrx 7a4882731d Core/SAI: allow to start waypoint movement for a creature that is in combat.
Port From (https://github.com/TrinityCore/TrinityCore/commit/5331656785a2b76c060c4e8d4cfb3938c8559efc)
2021-12-22 20:24:27 -05:00
hondacrx 2cbed03883 Core/SAI: don't allow to start a new SAI actionlist while the entity is already running one.
Port From (https://github.com/TrinityCore/TrinityCore/commit/e846d4c3ef04d75839325409df109156d8ccced0)
2021-12-22 20:09:35 -05:00
hondacrx 5081e1aa69 Core/SmartAI: Implement SMART_EVENT_SUMMONED_UNIT and SMART_EVENT_SUMMON_DESPAWNED for GameObject owners
Port From (https://github.com/TrinityCore/TrinityCore/commit/6034992dffbbd511f59e77c13285da282d9c737d)
2021-12-07 20:44:30 -05:00