Commit Graph

1233 Commits

Author SHA1 Message Date
Kargatum
373ed8f46b Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf

(cherry picked from commit a32b6b8ac4)
2022-03-05 20:07:57 +01:00
Keader
2e2f93b94f Scripts/ScarletMonastery: Decrease boss number
Headless Horseman do not use BossAI anymore (since it can be done multiple times)

(cherry picked from commit 3c201b7554)
2022-02-28 23:38:49 +01:00
Keader
8d841679fc Scripts/ScarletMonastery: Headless Horseman Rewrite (#25614)
(cherry picked from commit a93abcf803)
2022-02-28 23:38:36 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Shauren
8e2d1e328e Core/Spells: Pass cast item level to triggered spells
* Fixes value on trinkets like Ignition Mage's Fuse
2022-02-08 21:36:31 +01:00
offl
bb468708e6 DB/Quest: Convert & update Homing Robot chickens to SAI
Closes #25239

(cherry picked from commit 8c303e4f97)
2022-02-05 23:45:58 +01:00
Maks Szokalski
bc04acb726 Add "On" to some gossip methods in AI (#25415)
* Add "On" to some methods

* Update npc_innkeeper.cpp

* Update zone_borean_tundra.cpp

(cherry picked from commit 41188eb535)
2022-02-05 22:18:19 +01:00
NoName
ee620856ad Core/Movement: Corrected Animation Tier handling (PR #24875)
Co-authored-by: Warpten <vertozor@gmail.com>
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit dad187615d)
2022-02-05 15:40:31 +01:00
Shauren
0a1acb9c05 Scripts/Spells: Replace RegisterAuraScript with RegisterSpellScript and remove it
(cherry picked from commit 7d4fbf706a)
2022-02-04 00:27:10 +01:00
Peter Keresztes Schmidt
2e3c612c80 Core/Unit: Make HandleEmoteCommand typesafe (#25249)
* Scripts/ScarletMonastery: Fix wrong emote during Headless Horseman encounter

* Scripts/HoR: Fix wrong emote during escape event

* Core/Unit: Make improve type safety of HandleEmoteCommand

Change argument type to the expected enum type Emote

* Scripts/CoS: Use SetUInt32Value to set UNIT_NPC_EMOTESTATE

UNIT_NPC_EMOTESTATE is no flag field

(cherry picked from commit 6c7837f947)
2022-01-26 21:46:51 +01:00
Aokromes
e538d42f12 Script/Quest: The Light of Dawn (#25243)
remove incorrect check, source:
https://www.wowhead.com/spell=53606/the-light-of-dawn
Flags
Can be used while dead

https://www.wowhead.com/quest=12801/the-light-of-dawn#comments:id=1495830
https://www.wowhead.com/quest=12801/the-light-of-dawn#comments:id=374127
(cherry picked from commit 681c738c61)
2022-01-26 20:44:35 +01:00
Jinnaix
169b0296e1 Scripts/BlackwingLair: Suppression Device Room (PR #25199)
Co-authored-by: offl <11556157+offl@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Treeston <treeston.mmoc@gmail.com>
(cherry picked from commit de56ed8736)
2022-01-26 18:51:07 +01:00
Giacomo Pozzoni
864d775280 Core/Misc: Fix static analysis issues (#25194)
(cherry picked from commit 07fd84b679)
2022-01-26 14:06:40 +01:00
Peter Keresztes Schmidt
0c65abe7a0 Scripts/MoltenCore: Update Golemagg encounter to current coding standards (#25183)
* Scripts/MoltenCore: Update Golemagg to current coding standards

* no functional changes

* Scripts/MoltenCore: Update Core Ranger to current coding standards

* no functional changes

(cherry picked from commit c88234727b)
2022-01-24 21:54:10 +01:00
Carbenium
18e5e1ef43 Scripts/AV: Update Vanndar's script to use TaskScheduler
* No functional changes

(cherry picked from commit 799d5376d8)
2022-01-24 21:35:52 +01:00
Carbenium
8809d54ca2 Core/Common: Merge TimeTrackerSmall with TimeTracker
(cherry picked from commit 228696bf80)
2022-01-24 21:34:36 +01:00
Carbenium
35e0002df3 Core/Common: Add a std::chrono interface to TimeTrackerSmall
New methods:
TimeTrackerSmall(Milliseconds expiry);
void Update(Milliseconds diff);
void Reset(Milliseconds expiry)
Milliseconds GetExpiry() const

Removed methods:
int32 GetExpiry() const

Also add basic unit tests.

Core/Scripts: Use std::chrono interface of TimeTrackerSmall

(cherry picked from commit e55516348d)
2022-01-24 21:25:47 +01:00
Giacomo Pozzoni
61bf51874d Core/Misc: Fix static analysis issues (#25178)
(cherry picked from commit 7cf122fc2a)
2022-01-24 20:21:25 +01:00
Jinnaix
ab7680157b Scripts/BlackrockSpire: Fix encage event of Pyroguard encounter (#25177)
(cherry picked from commit e3aa87641f)
2022-01-24 15:05:20 +01:00
Carbenium
b3f2ff97ff Core/CreatureAI: std::chrono-ify DoSummon* methods
(cherry picked from commit 1245833cdd)
2022-01-24 13:11:13 +01:00
Carbenium
82fce41852 Core/WorldObject: Replace non-std::chrono SummonGameObject overloads
Also fix intended despawn time of GOs used by the "Engineering a Disaster" quest

(cherry picked from commit 8642aaaf92)
2022-01-24 12:55:43 +01:00
Carbenium
217c2d9ef3 Core/WorldObject: Replace non-std::chrono SummonTrigger overloads
(cherry picked from commit 3620b47c41)
2022-01-24 12:47:56 +01:00
Carbenium
3bba8d50b1 Core/WorldObject: Remove non-std::chrono SummonCreature overload
Remove
TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0, uint32 vehId = 0, uint32 spellId = 0);

(cherry picked from commit a41f599be7)
2022-01-24 12:39:59 +01:00
Carbenium
03e4c0d7bf Core/Creature: Remove non-std::chrono overload of DespawnOrUnsummon
(cherry picked from commit 480dee3125)
2022-01-24 12:21:26 +01:00
Carbenium
eeffb310de Core/EventProcessor: std::chrono-ify CalculateTime
uint64 CalculateTime(uint64 t_offset) has been replaced with Milliseconds CalculateTime(Milliseconds t_offset).
Also add the std::chrono-ified overload void AddEvent(BasicEvent*, Milliseconds, bool)

(cherry picked from commit 92a02a5c87)
2022-01-24 12:00:35 +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
58e1c091a2 Scripts/EasternKingdoms: Use std::chrono overload of Creature::DespawnOrUnsummon
(cherry picked from commit d1a39a2ebf)
2022-01-23 23:53:20 +01:00
Carbenium
e660b870e9 Core/ScriptedAI: std::chrono-ify DoSpawnCreature
(cherry picked from commit f5076112cb)
2022-01-23 23:33:04 +01:00
Carbenium
5f296fb7c7 Core/InstanceScript: std::chrono-ify DoRespawnGameObject
(cherry picked from commit d7ff8c272a)
2022-01-23 23:09:27 +01:00
Peter Keresztes Schmidt
44ea32ace4 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
2022-01-23 22:16:15 +01:00
Shauren
8417c7d815 Scripts/Zul'aman: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
5a53fa4b58 Scripts/Blackrock Spire: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
66641b6d22 Scripts/Blackrock Caverns: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
bb29fb406e Scripts/Baradin Hold: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Peter Keresztes Schmidt
8e7c368220 Scripts/Magisters Terrace: Use std::chrono::duration overloads of EventMap (#25038)
Contributes to #25012

(cherry picked from commit 88314660b6)
2022-01-23 16:00:43 +01:00
Peter Keresztes Schmidt
111521d3c9 Scripts/EasternKingdoms: Use std::chrono::duration overloads of EventMap (#25019)
Contributes to #25012

(cherry picked from commit 5ef576d223)
2022-01-23 15:41:30 +01:00
Peter Keresztes Schmidt
41dab047ed Scripts/Blackrock Mountain: Use std::chrono::duration overloads of EventMap (#25018)
Contributes to #25012

(cherry picked from commit ac27c922d1)
2022-01-23 15:39:28 +01:00
Giacomo Pozzoni
e9cf3828ba Core/Spells: Implement SPELL_EFFECT_ACTIVATE_OBJECT. (#23) (#24997)
* Core/Spells: Implement SPELL_EFFECT_ACTIVATE_OBJECT. (#23)

Original research by @xvwyh.

* Add missing sql update

* Fix some build errors

* Remove unused enum values

* Change artkits from 0-4 to 0-3

* Remove unused code

* Code review feedback

* Fix sql

* Remove artkit4 special case handling

* Default initialize artKits

* Code review feedback

* Split sql into structure and data files

Co-authored-by: Warpten <vertozor@gmail.com>
(cherry picked from commit 203573db83)
2022-01-23 15:17:54 +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
Shauren
b4952db464 Core/Units: Named unit flags linked to CreatureDifficulty flags 2022-01-22 13:21:15 +01:00
genion18
1ddfbf3ecc DB/Quest: Rumors for Kravel outro event
Closes #24835

(cherry picked from commit 32aebc14ab)
2022-01-19 23:06:57 +01:00
offl
fa0d4ceea1 DB/Quest: Convert & update support for 'Escorting Erland' to SAI
Closes #24834

(cherry picked from commit eea3cf1401)
2022-01-19 23:01:12 +01:00
offl
c5bc1cbeb6 DB/Quest: Convert Galen's Escape to SAI
Closes #23684

(cherry picked from commit f621173748)
2022-01-18 23:47:59 +01:00
Ovah
97fe56962a Scripts/Baradin Hold: fixed a crash in Occuthar's Focused Fire target selection and improved target filter scripts (#27604) 2022-01-12 22:23:58 +01:00
Carbenium
49523a74a4 Battlefields: Move BF scripts out of game
This commit introduces the usual script interface
for battlefields.

(cherry picked from commit f7faf20254)
2022-01-07 00:20:57 +01:00
NoName
959e84e715 Script/ScarletEnclave: Eye of acherus now rooted at spawn (#24725)
(cherry picked from commit 51b221c8f8)
2022-01-06 23:31:12 +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
offl
5662d71708 DB/Instance: Convert some Uldaman scripts to DB
Closes #24744

(cherry picked from commit a117450ce9)
2022-01-06 21:36:29 +01:00
offl
ca964a0b03 DB/Quest: Convert & update support for 'All Along the Watchtowers' to SAI
Closes #24732

(cherry picked from commit 8bccb258ba)
2022-01-06 21:32:12 +01:00
offl
5f94d0f4c8 DB/Quest: Convert & update support for WP Scourge cauldrons quests to SAI
Closes #24730

(cherry picked from commit d70eb96c85)
2022-01-06 21:31:43 +01:00