Commit Graph

5415 Commits

Author SHA1 Message Date
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
29779db58b Scripts/Northrend: Use std::chrono::duration overloads of EventMap (#25021)
Contributes to #25012
2020-07-14 19:32:28 +02:00
Peter Keresztes Schmidt
a2b2dc7ad0 Scripts/Trial of the Crusader: Use std::chrono::duration overloads of EventMap (#25020)
Contributes to #25012
2020-07-14 19:13:27 +02:00
Peter Keresztes Schmidt
5ef576d223 Scripts/EasternKingdoms: Use std::chrono::duration overloads of EventMap (#25019)
Contributes to #25012
2020-07-14 19:10:30 +02:00
Peter Keresztes Schmidt
ac27c922d1 Scripts/Blackrock Mountain: Use std::chrono::duration overloads of EventMap (#25018)
Contributes to #25012
2020-07-14 19:05:24 +02:00
Peter Keresztes Schmidt
90d5e7e1e8 Scripts/Kalimdor: Use std::chrono::duration overloads of EventMap (#25016)
Contributes to #25012
2020-07-14 18:17:23 +02:00
Giacomo Pozzoni
ee34a1f19e Scripts/Kologarn: Fix another "stuck in combat" issue (#24998) 2020-07-14 09:44:17 +02:00
Giacomo Pozzoni
203573db83 Core/Spells: Implement SPELL_EFFECT_ACTIVATE_OBJECT. (#23) (#24997)
* Core/Spells: Implement SPELL_EFFECT_ACTIVATE_OBJECT. (#23)

Original research by @xvwyh.

# Conflicts:
#	src/server/game/DataStores/DBCStores.cpp
#	src/server/game/DataStores/DBCStructure.h
#	src/server/game/DataStores/DBCfmt.h
#	src/server/game/Entities/GameObject/GameObject.h
#	src/server/game/Entities/GameObject/GameObjectData.h
#	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
#	src/server/scripts/Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp

* 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>
2020-07-14 09:34:03 +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
Peter Keresztes Schmidt
c92950b3e1 Core/DataStores: Update DBC field names to generated ones (#24999) 2020-07-12 15:36:55 +02:00
Eridium
98c37b15e0 Creature/Script: npc_blackfathom_deeps_event (#24969)
* Creature/Script: npc_blackfathom_deeps_event

* Update blackfathom_deeps.cpp

* Update blackfathom_deeps.h

* codestyle

* Update blackfathom_deeps.cpp

Co-authored-by: Killyana <Killyana@users.noreply.github.com>
Co-authored-by: Ovah <dreadkiller@gmx.de>
2020-07-09 22:39:44 +02:00
Shauren
14db2215d3 Core/Spells: Don't select corpses for spell targets that expect to hit units
Closes #24980
2020-07-09 18:44:21 +02:00
Ovah
232628f0a6 Scripts/ICC: fixed a crash in the Lich King encounter caused by invalid corpse targets 2020-07-09 14:22:00 +02:00
offl
c6811d3e4e DB/Quest: Convert & update support for 'Khu'nok Will Know' to SAI
Closes #24933
2020-07-08 17:37:05 +02:00
offl
46ad9fa0d9 DB/Quest: Convert & update support for 'Chasing A-Me 01' to SAI
Closes #24925
2020-07-07 00:28:25 +02:00
offl
18864aeddb DB/Quest: Convert & update scripts from Thousand Needles to SAI
Closes #24924
2020-07-06 23:46:19 +02:00
offl
c29e3b46af DB/Quest: Convert & update support for 'Protect Kaya' to SAI
Closes #24923
2020-07-06 23:34:41 +02:00
offl
2ebef0c51c DB/Creature: Convert & update support for 'Messenger Torvus' to SAI
Closes #24852
2020-07-02 23:20:19 +02:00
Keader
4418450804 Scripts/Warrior: Fixed a typo on intervene script 2020-07-01 07:31:51 -03:00
genion18
32aebc14ab DB/Quest: Rumors for Kravel outro event
Closes #24835
2020-06-29 01:32:49 +02:00
offl
eea3cf1401 DB/Quest: Convert & update support for 'Escorting Erland' to SAI
Closes #24834
2020-06-29 01:24:45 +02:00
offl
fb58ca0bf5 DB/Quest: Convert & update support for 'Pyrewood Ambush' to SAI
Closes #24833
2020-06-29 01:11:10 +02:00
Keader
6d16c39e76 Scripts/Warrior: Implemented threat effect of Intervene 2020-06-28 13:14:25 -03:00
Shauren
0468c70dfe Core/Maps: Implemented getting area id from gameobject spawns
Yes, you can now spawn LK platform anywhere and it will treat you as inside Icecrown Citadel

(cherry picked from commit 42f9deb21e)
2020-06-27 20:23:30 +02:00
offl
d526d5d176 DB/Quest: Convert & update support for 'Scratches' to SAI
Closes #24824
2020-06-26 22:40:13 +02:00
offl
f621173748 DB/Quest: Convert Galen's Escape to SAI
Closes #23684
2020-06-26 16:05:08 +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
Rothend
5f35bf9e79 Script/Spell: fix Midsummer's Juggling Torch (#24885)
* Script/Spell: fix Midsummer's Juggling Torch.

Closes #17446

* Remove unneeded GetPosition() call, thanks jackpoz for noticing!

* Rename 9999_99_99_99_world_midsummer_torch_juggling.sql to 2020_06_24_01_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-06-24 21:26:01 +02:00
Carbenium
488b91ab83 Core/Battlefield: Move SendInitWorldStatesTo to Battlefield class 2020-06-24 15:09:57 +02:00
Carbenium
c40b897d36 Scripts/Battlefield: Move npc_wg_give_promotion_credit script to BattlefieldWG
The script references BattlefieldWG, which is not exported in dynamic builds.
Move the script, so it is in the same library.
2020-06-24 15:09:57 +02:00
Carbenium
f7faf20254 Battlefields: Move BF scripts out of game
This commit introduces the usual script interface
for battlefields.
2020-06-24 15:09:57 +02:00
Carbenium
6a8c12587e Core/Misc: Create new enum for AreaIds
Move Wintergrasp BF related values there
2020-06-24 15:09:57 +02:00
ipriver
a46d047f94 fixed indentation for cmake files 2020-06-24 14:42:02 +02:00
NoName
51b221c8f8 Script/ScarletEnclave: Eye of acherus now rooted at spawn (#24725) 2020-06-21 12:56:41 +02:00
ForesterDev
8e0365d8a6 DB/Account: update account_access table (#24788)
* DB/Account: update account_access table:

- rename fields id -> AccountID, gmlevel -> SecurityLevel
- add Comment field
- rename command .acc set gmlevel to .acc set seclevel

* Update auth database

* Fix primary key

* Temporary restore old command account set gmlevel with same handler as account set seclevel

Use Optional  for realmID - if not set, use -1 (for all realms)

* Rename 2020_XX_XX_00_auth.sql to 2020_06_20_00_auth.sql

* Update auth_database.sql

* Rename 2020_XX_XX_00_world.sql to 2020_06_20_06_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-06-20 21:49:18 +02:00
Killyana
75bc0f6771 Script: Remove npc_avatar_of_martyred converted to SAI
Ref 5924e038d6
2020-06-20 20:35:36 +02:00
jackpoz
54e30d4eba Scripts/VioletHold: Limit the number of current summons before the waves start 2020-06-20 14:12:47 +02:00
Killyana
8b5549c0f1 Creature/Scripts: Remove deprecated scripts
Ref bd609caf09
2020-06-17 23:43:34 +02:00
Rothend
c4caae9b6d Script/Spell: properly round damage of Seal of Righteousness (on-hit proc). (#24821) 2020-06-17 19:28:05 +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
offl
a117450ce9 DB/Instance: Convert some Uldaman scripts to DB
Closes #24744
2020-06-14 19:16:55 +02:00
offl
8bccb258ba DB/Quest: Convert & update support for 'All Along the Watchtowers' to SAI
Closes #24732
2020-06-14 18:26:35 +02:00
offl
d70eb96c85 DB/Quest: Convert & update support for WP Scourge cauldrons quests to SAI
Closes #24730
2020-06-14 18:12:17 +02:00
offl
e47f302fc9 DB/Quest: Convert & update support for 'Escape from the Catacombs' to SAI
Closes #24728
2020-06-14 17:52:12 +02:00
jackpoz
cd37a17103 Scripts/Commands: Add .debug objectcount <optional map id> chat command
Add .debug objectcount <optional map id> chat command to show the number of Creatures and GameObjects
2020-06-14 15:41:01 +02:00
Keader
f2f4fc921e kill white space in last commit 2020-06-09 09:57:47 -03:00
Keader
be48fbc32a Scripts/ShadowfangKeep: Fixed a crash in spellscript 2020-06-09 09:52:44 -03:00
Gildor
aeb41e67a9 Scripts/Naxxramas: Fix Kel'thuzad evade mode when he dies (#24763) 2020-06-07 12:55:38 +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