Commit Graph

874 Commits

Author SHA1 Message Date
offl
08d8843e1a DB/Creature: Zaetar's Spirit
(cherry picked from commit 44a265685e)
2022-03-21 21:07:55 +01:00
offl
3fbc9d796d Scripts/Misc: Migrate Operation Gnomeregan & Zalazane's Fall scripts to own files (#27163)
(cherry picked from commit d42c89aa04)
2022-03-21 00:18:17 +01:00
offl
d013a8251f Scripts/Misc: Replace some of AddItem / CreateItem with spells (#27160)
(cherry picked from commit ed38206031)
2022-03-21 00:12:30 +01:00
offl
c4906ce60b Core/Misc: Rename UNIT_FLAG_NOT_SELECTABLE to UNIT_FLAG_UNINTERACTIBLE (#26913)
(cherry picked from commit c4741a131a)
2022-03-15 23:03:26 +01:00
Jinnaix
e7682d8e08 Core/Script: fix Silithus Wind Stone exploit (#26808)
* Core/Script: fix Silithus Wind Stone exploit

* corrections

Closes #23577

(cherry picked from commit 6bcda49e98)
2022-03-12 23:00:30 +01:00
Giacomo Pozzoni
71c2f0af46 Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken (#26787)
* Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken

* Update scripts

(cherry picked from commit 0800ab20a8)
2022-03-12 14:45:04 +01:00
offl
4830612953 Scripts/BM: Update scripts to new register model (#26792)
(cherry picked from commit 365a95bc94)
2022-03-12 14:31:43 +01:00
offl
cb645fd2f8 Scripts/BFD: Update scripts to new register model (#26791)
(cherry picked from commit 97140cd195)
2022-03-12 14:30:24 +01:00
Giacomo Pozzoni
c9e685bd9a Core/SAI: Warn when an unused parameter is set in the database (#26628)
* Core/SAI: Warn when an unused parameter is set in the database

* Warn when an unused parameter is set in the database as all unused parameters are supposed to be set to 0.

* Remove unused struct from union.

* Add a new struct simpleTalk for SMART_ACTION_SIMPLE_TALK instead of reusing only some fields of struct talk from SMART_ACTION_TALK

* Add addAura and flag structs to be used instead of generic ones to match the parameters used by actions

* Add randRangeTimedActionList struct to be used instead of generic ones to match the parameters used by actions.

* Remove unused action structs.

(cherry picked from commit aa7279df09)
2022-03-11 18:35:58 +01:00
offl
0a682fdd74 Scripts/OL: Update Onyxia to new register model (#26683)
(cherry picked from commit fc14d4f30a)
2022-03-11 16:15:14 +01:00
offl
012444ba80 Scripts/Spells: Add comments with id & name of spells part 4
(cherry picked from commit e7e4786606)
2022-03-10 23:53:31 +01:00
offl
0408693646 Scripts/Spells: Add comments with id & name of spells part 3
(cherry picked from commit 03c727326d)
2022-03-10 23:52:03 +01:00
offl
cec9718d22 Scripts/Spells: Add comments with id & name of spells part 2
(cherry picked from commit 0e804c95ac)
2022-03-10 23:13:25 +01:00
offl
f2777596a0 Scripts/Spells: Add comments with id & name of spells part 1
(cherry picked from commit 80a4b7f1e2)
2022-03-10 22:41:12 +01:00
offl
09551b663a Scripts/Quest: Rework cocooned creatures (#26554)
(cherry picked from commit 78bd609e8a)
2022-03-10 22:36:09 +01:00
offl
30cbb5bd5c Scripts/Zone: Update Dustwallow Marsh zone file (#26368)
* Scripts/Zone: Update Dustwallow Marsh zone file

* Do you want SpellInfo back?

Co-authored-by: offl <offl@users.noreply.github.com>
(cherry picked from commit 8fa6f95d4b)
2022-03-08 16:44:05 +01:00
Shauren
fc456f7512 Core/Units: Renamed unknown unit flag (UNIT_FLAG_UNK_29 -> UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT)
(cherry picked from commit a34519bded)
2022-03-06 23:58:00 +01:00
offl
ca76786faf Core/Scripts: Move some speed values & UNIT_FLAG_NOT_SELECTABLE to DB
(cherry picked from commit 3cb70ee62a)
2022-03-06 20:01:06 +01:00
offl
8e9e15629f Core/Scripts: Verify & migrate spell school immunities to DB
Some already are stored in DB. Looks like they all are still valid for master

(cherry picked from commit 1ed79d7a2e)
2022-03-06 16:30:51 +01:00
Jinnaix
53eebf39f3 Scripts/Diremaul - Dire Maul crystal and forcefield fix (#25332)
* Scripts/Diremaul
Diremaul Crystal and Forcefield fix

* Apply suggestions from code review

Apply suggestions

Co-authored-by: MaxtorCoder <warsongkiller.s8@gmail.com>

* Fix stuff

* _private member

* use std array instead of c-arrays and standartized guid container namings

* Process feedback

* finalize

* blubb

* small changes

* whoops

* Process feedback

* Missing include

* Process feedback

* Apply suggestions from code review

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>

* remove unused field

Co-authored-by: MaxtorCoder <warsongkiller.s8@gmail.com>
Co-authored-by: Ovah <dreadkiller@gmx.de>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 26002c530f)
2022-03-05 23:09:23 +01:00
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
offl
c6df84da70 Core/Scripts: Add missing spells to Black Morass
(cherry picked from commit f62306f52d)
2022-03-05 16:59:14 +01:00
offl
4316d65ebe DB/Instance/AQ40: Update gossips
Closes #25577

(cherry picked from commit 7fd12cc722)
2022-02-28 23:11:34 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
offl
196ff25a6b DB/Quest: Convert & update support for 'The Caverns of Time' to SAI
(cherry picked from commit d89c84263d)
2022-02-05 23:46:43 +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
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
Aokromes
af7c211230 Script/Azuremyst_isle: Remove useless log
(cherry picked from commit bf8b34946d)
2022-02-04 10:58:44 +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
Giacomo Pozzoni
61bf51874d Core/Misc: Fix static analysis issues (#25178)
(cherry picked from commit 7cf122fc2a)
2022-01-24 20:21:25 +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
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
a28bc7faaa Scripts/Kalimdor: Use std::chrono overload of Creature::DespawnOrUnsummon
(cherry picked from commit 40efda9726)
2022-01-23 23:59:11 +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
Peter Keresztes Schmidt
ad340466d0 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006
(cherry picked from commit 85b5b842ca)
2022-01-23 22:02:03 +01:00
Shauren
15d59640fa Scripts/World: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
f0a7bc5267 Scripts/Halls of Origination: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
d07425e620 Scripts/Firelands: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Peter Keresztes Schmidt
8fb60c4d19 Scripts/Kalimdor: Use std::chrono::duration overloads of EventMap (#25016)
Contributes to #25012

(cherry picked from commit 90d5e7e1e8)
2022-01-23 15:38:35 +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