342 Commits

Author SHA1 Message Date
Shauren
ef97fb4ea7 Core/Movement: Restore overriding walk/run mode on individual waypoint level for legacy escort scripts 2026-01-01 00:13:40 +01:00
Shauren
a8f01e07d1 Core/Entities: Merge duplicate functions calculating relative positions - remove CalculatePassengerPosition/CalculatePassengerOffset from TransportBase class 2025-10-14 13:11:41 +02:00
Shauren
cbb532e4be Core/Groups: Use iterators instead of raw LinkedListElement to interact with group members 2025-07-11 17:40:34 +02:00
Shauren
f94d87b00f Core/Scripts: Mark script base class constructors noexcept 2025-06-13 19:31:03 +02:00
Shauren
36332d2463 Core/Misc: Remove a bunch of code from headers 2025-06-13 16:36:03 +02:00
Shauren
23624ed75a Core: Updated to 11.1.0 2025-03-02 15:43:34 +01:00
Ovahlord
11f32a2427 Core/Creatures: moved combat pulse into heartbeat handling and implemented CREATURE_STATIC_FLAG_2_FORCE_PARTY_MEMBERS_INTO_COMBAT (#29946) 2024-04-28 16:09:43 +02:00
Shauren
e1f43900d1 Core/Movement: Store delay in WaypointNode as Milliseconds instead of raw integer and revert c5097114d1 2024-04-19 15:16:17 +02:00
Shauren
a748fddfa4 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) 2024-02-22 15:47:11 +01:00
Shauren
605e5f94c0 Core/Creatures: Moved autoattack handling from scripts to game 2024-01-08 22:23:12 +01:00
ModoX
12186ef857 Core/Waypoints: Refactor to split data into path and node related info in db (#29506) 2024-01-05 17:56:19 +01:00
ModoX
3f6f683ce4 Core/Waypoints: Drop waypoint_scripts table (#29437) 2023-11-24 21:08:00 +01:00
Teleqraph
9eceff2bc2 Core/Map: Implement several difficulty getters (#29370)
Co-authored-by: ModoX <moardox@gmail.com>
2023-10-22 11:24:48 +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
ModoX
89e09dc44e Core/AI: Drop script_waypoints and move data to waypoint_data (#28879) 2023-04-10 04:04:33 +02:00
Shauren
f18c0644f3 Core/Scripts: Fixed crash in SummonList::DoZoneInCombat
Closes #28864
2023-03-21 12:20:17 +01:00
Shauren
6e309ed17f Core/Creatures: Allow flagging creatures to not clear their tap list when evading 2023-03-15 19:42:58 +01:00
Shauren
3400c5a52c Core/Spells: Updated silence flags for 9.0 and rename unit flag to its new meaning 2023-02-26 00:58:48 +01:00
Shauren
3df16c12b7 Core/Scripts: Move EvadeReason outside of CreatureAI class 2023-01-19 21:23:06 +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
e8e330addd Core/Misc: Remove boost::heap::fibonacci_heap from header files 2023-01-06 16:54:16 +01:00
Shauren
d8a4668c77 Core/Misc: Add missing Containers.h include where neccessary 2023-01-06 16:44:11 +01:00
Shauren
c7e89d3576 Core/Gossip: Move setting ActionMenuID and ActionPoiID directly into GossipMenu::AddMenuItem and remove GossipMenu::AddGossipMenuItemData 2022-12-28 15:17:21 +01:00
Seyden
61c51b76c0 Core/Creatures: Implement StringId for Creatures, a custom identifier to make finding specific creatures in script easier (#28500)
Allows targeting specific spawns without hardcoding guids or find a bunch of different creatures with a single search

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-12-27 16:39:05 +01:00
Shauren
e98e1283ea Core: Updated to 10.0.2 2022-12-04 15:13:20 +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
e65fae7bcd Scripts/Gossips: Set gossip menu id for scripts that load menu items from database
(cherry picked from commit 900a2f6d88)
2022-10-13 12:41:34 +02:00
Shauren
5f1a4cf904 Core/Loot: Set loot dungeon encounter id before generating 2022-10-05 20:04:15 +02:00
Shauren
5a516fb654 Core/Loot: Send DungeonEncounter id in SMSG_ITEM_PUSH_RESULT 2022-10-04 00:19:38 +02:00
Meji
69e0249807 Core/Gossip: Drop OptionType for gossip_menu_option and rename OptionIcon to OptionNpc as it also determines functionality on client side (#28220)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-09-08 14:49:03 +02:00
Shauren
4eba978670 Core/Misc: Rename SetXXXFlags updatefield functions to ReplaceAllXXXFlags 2022-03-26 18:59:44 +01:00
ccrs
5b6bcbff1a Core/Game: include addtional parameter in Object::GetPlayerListInGrid
(cherry picked from commit d49b6af71f)
2022-03-12 14:48:32 +01:00
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
jackpoz
d561a69122 Scripts/Obsidian Sanctum: Fix portals not being visible
Change NearestGameObjectEntryInObjectRangeCheck to allow returning GameObject not spawned.
Fixes other occurrences where a similar issue exists.

(cherry picked from commit ca2159bf40)
2022-02-05 12:04:35 +01:00
Maks Szokalski
b5d0a94ead Core/Gossip: Add new helper method to ScriptedGossip for resolving menuId -> sender (PR #25293)
(cherry picked from commit db8bdaa08f)
2022-02-04 00:27:11 +01:00
Carbenium
310f996b1d Core/WorldObject: Partially std::chrono-ify SummonCreature overloads
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0);
to
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime = 0s);

(cherry picked from commit 1131229ee9)
2022-01-24 11:55:32 +01:00
Carbenium
b8a3ab880f Core/Misc: Use std::chrono overload of Creature::DespawnOrUnsummon
(cherry picked from commit c39eb9b504)
2022-01-23 23:56:25 +01:00
Carbenium
5f5d32888a Core/EscortAI: std::chrono-ify SetPauseTimer
(cherry picked from commit cdaf890af4)
2022-01-23 23:34:52 +01:00
Carbenium
14e9513cea Core/EscortAI: std::chrono-ify AddWaypoint
(cherry picked from commit 4b9fdc5d3d)
2022-01-23 23:34:40 +01:00
Carbenium
e660b870e9 Core/ScriptedAI: std::chrono-ify DoSpawnCreature
(cherry picked from commit f5076112cb)
2022-01-23 23:33:04 +01:00
Carbenium
da438c73e2 Core/BossAI: Remove _DespawnAtEvade(uint32, Creature*) overload
Use _DespawnAtEvade(Seconds,  Creature*) instead

(cherry picked from commit 27229c10cd)
2022-01-23 23:28:47 +01:00
Peter Keresztes Schmidt
365ae6ff25 Fix some compiler warnings reported by GCC (#25007)
* Core/AI: Remove unneeded null checks

GetMap() can never return NULL.

Fixes additionally -Wunused-variable warnings
reported by GCC.

* Core/GameObject: Fix a -Wunused-variable warning reported by GCC

* Core/Player: Fix a -Wunused-variable warning reported by GCC

* Scritps/CavernsOfTime: Fix -Wimplicit-fallthrough warnings reported by GCC

* Scritps/CavernsOfTime: Fix a -Wmaybe-uninitialized warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp: In member function ‘virtual void npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp:1119:58: warning: ‘emote’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1119 |                                 (*it)->HandleEmoteCommand(emote);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

* Scritps/PitOfSaron: Fix -Wunused-variable warnings reported by GCC

* Scritps/EyeOfEternity: Fix a -Wclass-memaccess warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp: In member function ‘virtual void boss_malygos::boss_malygosAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp:950:81: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
  950 |                             memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID));
      |

* Scritps/CoilfangReservoir: Fix a -Wclass-memaccess warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp: In member function ‘void boss_leotheras_the_blind::boss_leotheras_the_blindAI::Initialize()’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp:220:55: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
  220 |             memset(InnderDemon, 0, sizeof(InnderDemon));
      |                                                       ^

* Scritps/Naxx: Fix a -Wimplicit-fallthrough warning reported by GCC

For discussion see https://github.com/TrinityCore/TrinityCore/pull/25007

(cherry picked from commit 10be49bdfe)
2022-01-23 00:16:31 +01:00
Rothend
962a2ac703 Core/EscortAI: set maximum distance allowed between player and escortee to default vision range. (#24865)
(cherry picked from commit 4caa218641)
2022-01-06 23:34:02 +01:00
Peter Keresztes Schmidt
c4098897a8 game/AI: Convert SelectAggroTarget to enum class (#24818)
* game/AI: Convert SelectAggroTarget to enum class

* game/AI: Rename SelectAggroTarget to SelectTargetMethod

(cherry picked from commit 418c3b1fd5)
2022-01-06 21:53:27 +01:00
jackpoz
ecdc387df2 Core/Misc: Remove whitespace at the end of lines
(cherry picked from commit caae3886d2)
2022-01-01 01:00:26 +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
Shauren
5d02739b98 Scripts: Fix rbac permission for skipping default boss sequencing check
(cherry picked from commit e660c8bc19)
2021-12-20 21:40:47 +01:00
Shauren
68a25f5e9b Core/Scripts: Add missing implementation for samePhase argument of ScriptedAI::ForceCombatStopForCreatureEntry 2021-12-19 18:12:12 +01:00
ccrs
d967d03151 Core/AI: add another helper for "ScriptedAI::ForceCombatStop"
(cherry picked from commit 3842ab2781)
2021-12-19 01:05:59 +01:00
ccrs
50c90728b2 Core/AI: 06443e3 followup
(cherry picked from commit bb9af06cd4)
2021-12-18 23:13:20 +01:00