Commit Graph

759 Commits

Author SHA1 Message Date
Peter Keresztes Schmidt
6c7837f947 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
2020-08-15 15:29:43 +02:00
Giacomo Pozzoni
07fd84b679 Core/Misc: Fix static analysis issues (#25194) 2020-08-04 11:36:47 +02:00
Trond B. Krokli
7f2874a7ac Scripts/Outland: Convert 'Captain Tyralius' to SAI (#25188)
Closes #24676
2020-08-03 21:06:20 +03:00
Giacomo Pozzoni
7cf122fc2a Core/Misc: Fix static analysis issues (#25178) 2020-07-31 22:53:13 +02:00
Trond B. Krokli
e0dae8feb6 Scripts/Quest: Force of Neltharaku quest credit (#24807)
* Scripts/Quest: Force of Neltharaku quest credit

**Description:**

Suggested solution to resolve the kill credit double cast issue
in the quest "The Force of Neltharaku" (10854).

by Rushor

**Changes proposed:**

- Remove duplicate spell casts in the zone quest script
- Remove commented-out script section
- Set a couple of unit flags (anim/stand/hover)
- Move return new creature script override to end of script
- Move PlayerGUID, FlyTimer, and Tapped to Private
- Add DB flight movement control to Enslaved Netherwing Drake
- Add SpellMgr MaxAffectedTargets = 1 for spell 38762
- Add movement enum POINT_MOVE_UP
- Add missing enum for quest ID

**Target branch(es):** 3.3.5/master

- [X] 3.3.5
- [X] master

**Issues addressed:** Closes #24796

**Tests performed:** (Does it build, tested in-game, etc.)

Pending for now.

**Known issues and TODO list:** (add/remove lines as needed)

- [X] Open PR in draft mode until testing is cleared
- [ ] Compile and create local server
- [ ] Test changes on local server

* Rename 9999_99_99_99_world.sql to 2020_07_29_00_world.sql

Co-authored-by: Rushor <Rushor@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-07-29 13:26:39 +02:00
Carbenium
1245833cdd Core/CreatureAI: std::chrono-ify DoSummon* methods 2020-07-28 17:25:51 +02:00
Carbenium
8642aaaf92 Core/WorldObject: Replace non-std::chrono SummonGameObject overloads
Also fix intended despawn time of GOs used by the "Engineering a Disaster" quest
2020-07-27 23:00:51 +02:00
Carbenium
a41f599be7 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);
2020-07-27 14:53:25 +02:00
Carbenium
480dee3125 Core/Creature: Remove non-std::chrono overload of DespawnOrUnsummon 2020-07-27 13:37:18 +02:00
Carbenium
92a02a5c87 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)
2020-07-27 13:36:25 +02:00
Carbenium
1131229ee9 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);
2020-07-26 23:30:32 +02:00
Carbenium
8cb35b0d5f EventMap: Change GetTimeUntilEvent to return std::chrono types 2020-07-26 23:20:11 +02:00
Carbenium
5832790428 Scripts/World+Outland+Spells: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:21:59 +02:00
Carbenium
f5076112cb Core/ScriptedAI: std::chrono-ify DoSpawnCreature 2020-07-25 23:16:04 +02:00
Carbenium
f1f251eb38 Core/Scripts: Fix timing issue of EVENT_FLY_TO_RANDOM_PILLAR during Illidan encounter
The intention here is to add additional 30 seconds of delay to the current delay of EVENT_FLY_TO_RANDOM_PILLAR.
Instead of EventMap::GetNextEventTime, EventMap::GetTimeUntilEvent has to be used which returns the currently
scheduled delay until the event occurs.
EventMap::GetNextEventTime instead exposes the timer value internal to EventMap at which the event should occur.
2020-07-22 01:19:59 +02:00
Peter Keresztes Schmidt
e6e5775be8 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
2020-07-18 20:43:16 +02:00
Peter Keresztes Schmidt
85b5b842ca Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006
2020-07-18 20:42:28 +02:00
Peter Keresztes Schmidt
2d9c5979a6 Scripts/Tempest Keep: Use std::chrono::duration overloads of EventMap (#25040)
Contributes to #25012
2020-07-14 20:50:37 +02:00
Peter Keresztes Schmidt
5ed6c6a5c3 Scripts/Coilfang Reservoir: Use std::chrono::duration overloads of EventMap (#25025)
Contributes to #25012
2020-07-14 19:49:47 +02:00
Peter Keresztes Schmidt
d00c95f26f Scripts/Hellfire Citadel: Use std::chrono::duration overloads of EventMap (#25024)
Contributes to #25012
2020-07-14 19:49:12 +02:00
Shauren
7e5cf40d4c Scripts/Mana Tombs: Fix Pandemonious Dark Shell event delay 2020-07-14 19:39:29 +02:00
Peter Keresztes Schmidt
4ad80434a2 Scripts/Auchindoun: Use std::chrono::duration overloads of EventMap (#25023)
Contributes to #25012
2020-07-14 19:37:51 +02:00
Peter Keresztes Schmidt
39fc17e284 Scripts/Outland: Use std::chrono::duration overloads of EventMap (#25022)
Contributes to #25012
2020-07-14 19:35:12 +02:00
Peter Keresztes Schmidt
10be49bdfe 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
2020-07-13 16:35:31 +02:00
offl
d526d5d176 DB/Quest: Convert & update support for 'Scratches' to SAI
Closes #24824
2020-06-26 22:40:13 +02:00
offl
f2c2210dbb DB/Quest: Convert & update support for 'City of Light' to SAI
Closes #24814
2020-06-26 15:49:39 +02:00
Rothend
3227ed94bc Script/Creature: script Terokk's encounter (#24871)
* Script/Creature: script Terokk's encounter.

Closes #2029

* Apply suggested changes.

* Fix nopch build.

* Rename 9999_99_99_99_world_terokk.sql to 2020_06_24_02_world.sql

* Update 2020_06_24_02_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com>
2020-06-24 22:02:44 +02:00
Killyana
75bc0f6771 Script: Remove npc_avatar_of_martyred converted to SAI
Ref 5924e038d6
2020-06-20 20:35:36 +02:00
Killyana
8b5549c0f1 Creature/Scripts: Remove deprecated scripts
Ref bd609caf09
2020-06-17 23:43:34 +02:00
Peter Keresztes Schmidt
418c3b1fd5 game/AI: Convert SelectAggroTarget to enum class (#24818)
* game/AI: Convert SelectAggroTarget to enum class

* game/AI: Rename SelectAggroTarget to SelectTargetMethod
2020-06-16 23:08:56 +02:00
ForesterDev
e3b232fe0e Core/AI: refactor SpellHit and SpellHitTarget. (#24691)
* Core/AI: refactor SpellHit and SpellHitTarget.

- now caster/target is WorldObject instead of Unit
- remove SpellHitByGameObject / SpellHitTargetGameObject (handled by SpellHit / SpellHitTarget)
- rename parameters in scripts according parent methods

* Restore logic in Algalon script

* Changed check for REMORSELESS_WINTER hit to avoid dublicate call, because it has TARGET_UNIT_CASTER for effects 0/1 and TARGET_GAMEOBJECT_SRC_AREA for effect 2

* Fix build after merge
2020-06-07 10:22:13 +02:00
Keader
00bc6e7d54 Scripts/BloodFurnace: Fixed Broggok stopping work after wipe
By: Rushor
2020-05-30 11:57:30 -03:00
offl
e48c415156 DB/Quest: Convert & update support for 'Mark V is Alive!' to SAI
Closes #24686
2020-05-26 00:01:54 +02:00
offl
1316ca482d DB/Quest: Convert & update support for 'When the Cows Come Home' to SAI
Closes #24685
2020-05-25 23:32:50 +02:00
Killyana
fd66e291b5 DB/Quest: Convert "HELP!" & "Corki's Gone Missing Again!" & "Cho'war the Pillager" to SAI
Closes #24649
2020-05-23 02:44:18 +02:00
jackpoz
013301088d Scripts/Misc: Fix issues reported by ASan 2020-05-21 22:17:13 +02:00
offl
cfe6b651bc DB/Quest: Convert Escape from Umbrafen to SAI
Closes #24648
2020-05-21 00:28:41 +02:00
offl
049cba3ace DB/Quest: Convert & update support for 'Shizz Work' to SAI
Closes #24638
2020-05-18 00:08:58 +02:00
offl
2815db52a6 DB/Quest: Convert & update support for 'Finding the Survivors' to SAI
Closes #24636
2020-05-17 23:36:34 +02:00
offl
a2068cade5 DB/Creature: Convert & update support for Ashyen & Keleth to SAI
Closes #24635
2020-05-17 21:53:02 +02:00
Keader
ee218a5642 Making travis happy 2020-04-24 13:58:26 -03:00
Keader
d8e726de58 Scripts/Black Temple: Fixed Reliquary of Souls after combat rewrite changes.
Closes #23879
* Fixed combat start/evade issue
* Fixed visual issue in Soul Release spell
* Fixed some timers issue
* Fixed some codestyle issues

PS: Please, stop break my black temple babys.
2020-04-24 13:52:28 -03:00
skipperheartbeat
8ac8374429 Boss/Script: Vazruden_Fix (#24197)
* Add files via upload

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: offl <suffle.o@gmail.com>

* Update src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

* Update boss_vazruden_the_herald.cpp

Co-authored-by: Aokromes <Aokromes@users.noreply.github.com>
Co-authored-by: Trond B. Krokli <38162891+illfated@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: offl <suffle.o@gmail.com>
2020-04-19 11:01:31 +02:00
Gildor
8a5b02be0a Scripts/Quest: The Exorcism of Colonel Jules (#24459)
* Remove Anchorite Barada gossip when event start
2020-04-15 13:12:28 +02:00
jackpoz
9d77b2be3b Scripts/GruulsLair: Fix indentation 2020-03-18 15:14:41 +01:00
Shauren
e660c8bc19 Scripts: Fix rbac permission for skipping default boss sequencing check 2020-01-14 23:53:08 +01:00
Keader
1bdc792559 Scripts/Blood Furnace: Fixed Broggok reset issues and some little improvements
Closes #23658
2020-01-07 23:09:59 -03:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Eridium
efcbfa5c24 Boss/Script: Fix Mechano-Lord Capacitus's Nether Charges (#23976)
* Boss/Script: Fix Mechano-Lord Capacitus's Nether Charges

Closes #23973

* Update boss_mechano_lord_capacitus.cpp

* Update boss_mechano_lord_capacitus.cpp

* Update boss_mechano_lord_capacitus.cpp

* Rename 2019_12_99_99_world.sql to 2019_12_19_00_world.sql
2019-12-19 07:57:26 +01:00
jackpoz
30823f9b79 Core/Misc: Fix C++17 build errors 2019-10-13 20:12:36 +02:00