Commit Graph

5497 Commits

Author SHA1 Message Date
Peter Keresztes Schmidt
76f309b4e8 Scripts/Commands: Convert argument parsing of most debug commands to new system (PR #25260) 2020-08-17 22:45:09 +02:00
Treeston
e18f7aaa4d Scripts/Commands: Remove .debug asan outofbounds, because having reachable code that essentially says __builtin_unreachable in the core is making me twitchy. 2020-08-17 22:25:11 +02:00
Peter Keresztes Schmidt
426513ec8e Scripts/Commands: Convert argument parsing of ahbot commands (PR #25264) 2020-08-17 22:04:44 +02:00
Carbenium
fa6a8e8f64 Scripts/Commands: Convert argument parsing of bf commands to new system 2020-08-17 15:51:46 +02:00
Shauren
5c1fc5e387 Core/Pets: Pet management refactoring (#25191)
* Core/Pets: Pet management refactoring

* Preload basic pet data on character login with async query
* Load additional pet data (declined names/auras/spells/cooldowns) using async query after we are sure pet loading will succeed
* Remove all select queries related to pet stable/unstable
* Remove all silent pet deletions except explicit UI-triggered abandons
* Fixed displaying stable master content when current pet is not summoned
* Allow to stable/swap unsummoned current pet

Closes #3610
Closes #21266
2020-08-16 21:39:25 +02:00
Peter Keresztes Schmidt
86dc58974a Scripts/Commands: Use enum type arg for HandleDebugAnimCommand (PR #25256)
* Core/Shared: Make Emote enum smart
* Scripts/Commands: Use enum type arg for HandleDebugAnimCommand
2020-08-16 16:26:47 +02:00
Peter Keresztes Schmidt
5e40eb20e2 Core/ChatCommands: Add support for enum type arguments (PR #25242) 2020-08-16 14:11:21 +02:00
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
Aokromes
681c738c61 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
2020-08-15 11:10:47 +02:00
Gildor
7035a9caf1 Scripts/Naxxramas: Adjust Frogger event timer (#25214)
* Scripts/Naxxramas: Adjust Frogger event timer

Co-authored-by: Carbenium <carbenium@outlook.com>
2020-08-12 17:24:41 +02:00
Rothend
a375f15ae2 Script/Quest: fix (More) Torch Catching (#24907)
* Script/Quest: fix (More) Torch Catching.

Closes #24893

Co-authored-by: Carbenium <carbenium@outlook.com>
2020-08-12 13:40:28 +02:00
Treeston
6116e5b385 Core/Warden: Warden refactors (PR #25235) 2020-08-11 18:04:36 +02:00
jackpoz
dd28cecda3 Core/Misc: Code cleanup 2020-08-09 13:00:31 +02:00
jackpoz
0eb49a3cc9 Scripts/Command: Fix .mmap loc always printing command usage 2020-08-08 21:38:44 +02:00
Jinnaix
de56ed8736 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>
2020-08-08 00:27:16 +02:00
Giacomo Pozzoni
bd5e832a64 Scripts/Comamnds: Improve ".debug objectcount" command (#25208)
* Scripts/Comamnds: Improve ".debug objectcount" command

Include the top 5 most common creatures in the map

* Use C++ features to copy data

* Fix build warnings

* Update src/server/scripts/Commands/cs_debug.cpp

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Update src/server/scripts/Commands/cs_debug.cpp

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Update src/server/scripts/Commands/cs_debug.cpp

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Move CreatureCountWorker out of function and use template for unhandled cases

* Code cleanup

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2020-08-06 14:58:39 +02:00
jackpoz
6ad6d9e670 Scripts/Kologarn: Apply CREATURE_FLAG_EXTRA_NO_COMBAT on NPC_ARM_SWEEP_STALKER and NPC_RUBBLE_STALKER 2020-08-05 18:46:02 +02:00
Gildor
174ac95800 Scripts/Naxxramas: Frogger event improvements (#25202)
* Scripts/Naxxramas: Frogger event improvements
* Prevent Living Poison accumulation
* Now Living Poison cast Explode

* check for a nearby player

* move event to the frogger trigger's AI

* Initialize and removing unnecessary things

* applying suggestions

* remove unnecessary header

* Rename 9999_99_99_99_world.sql to 2020_08_05_00_world.sql
2020-08-05 14:16:19 +02:00
Ovahlord
9bf57958e3 Scripts/World: updated Training Dummy script to modern model and removed pointless GameTime shenanigans 2020-08-05 01:19:56 +02:00
Carbenium
0dd4b685df Scripts/AzjolNerub: Fix potential error in pound spell script
Cast damage spell in AfterEffectApply instead OnEffectHitTarget. This avoids the scenario where we try to apply an aura to a potential dead target.

Ref #21856
2020-08-04 17:22:18 +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
Peter Keresztes Schmidt
dab8768c18 Scripts/AzjolNerub: Update Anub'Arak encounter to current coding standards (#25192)
* Scripts/AzjolNerub: Update Anub'Arak to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Darter to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Assassin to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Guardian to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Venomancer to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Impale Target to current coding standards

* Scripts/AzjolNerub: Update Anub'Arak Pound spell to current coding standards

* Scripts/AzjolNerub: Update Anub'Arak carrion beetles aura script to current coding standards
2020-08-01 23:32:10 +02:00
Peter Keresztes Schmidt
7abe9d66d0 Scripts/Gundrak: Update Slad'ran encounter to current coding standards (#25180)
* Scripts/Gundrak: Update Slad'Ran's script to use TaskScheduler

* No functional changes

* Scripts/Gundrak: Update Slad'Ran's adds to use TaskScheduler

* No functional changes
2020-08-01 23:15:25 +02:00
Peter Keresztes Schmidt
dd8666f38d Scripts/Gundrak: Update Drakkari Colossus encounter to current coding standards (#25182)
* Scripts/Gundrak: Update Drakkari Colossus to current coding standards

* no functional changes

* Scripts/Gundrak: Update Drakkari Elemental to current coding standards

* no functional changes

* Scripts/Gundrak: Update Living Mojo to current coding standards

* no functional changes
2020-08-01 23:14:26 +02:00
Peter Keresztes Schmidt
c88234727b 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
2020-08-01 23:12:54 +02:00
Carbenium
90543fd41d Scripts/AhnKahet: Update Herald Volazj to current coding standards
* convert to BossAI
* no functional changes
2020-08-01 23:11:08 +02:00
Carbenium
799d5376d8 Scripts/AV: Update Vanndar's script to use TaskScheduler
* No functional changes
2020-08-01 21:13:30 +02:00
Carbenium
228696bf80 Core/Common: Merge TimeTrackerSmall with TimeTracker 2020-08-01 12:43:55 +02:00
Carbenium
e55516348d 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
2020-08-01 12:43:55 +02:00
Giacomo Pozzoni
7cf122fc2a Core/Misc: Fix static analysis issues (#25178) 2020-07-31 22:53:13 +02:00
Shauren
06f59caf3d Core/DataStores: Rename TalentTabEntry::CategoryEnumID back to PetTalentMask 2020-07-31 20:02:08 +02:00
Jinnaix
e3aa87641f Scripts/BlackrockSpire: Fix encage event of Pyroguard encounter (#25177) 2020-07-31 13:58:26 +02:00
Somebody
81f3ed1d0c Scripts/Deadmines: Doors after Rhahk'Zor, Sneed and Gilnid (#25107)
* Fix doors opening after killing Sneed and Gilnid in the Deadmines dungeon

* Add SQL file

* Update 2020_99_99_00_world.sql

SQL conventions

* Change SAI door opening into C++ door opening and make it use SetBossState.

* Delete 2020_99_99_00_world.sql

Replaced by different sql file

* Make CircleCI happy

* Change const to constexpr for EncounterCount variable

* Update src/server/scripts/EasternKingdoms/Deadmines/deadmines.h

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

* Update src/server/scripts/EasternKingdoms/Deadmines/deadmines.h

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

* Rename 9999_99_99_00_world.sql to 2020_07_30_00_world.sql

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-07-30 14:14:08 +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
3620b47c41 Core/WorldObject: Replace non-std::chrono SummonTrigger overloads 2020-07-27 14:58:18 +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
1d8782e356 Core/EventProcessor: std::chrono-ify the remaining public API 2020-07-27 13:36:25 +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
40efda9726 Scripts/Kalimdor: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:23:51 +02:00
Carbenium
5832790428 Scripts/World+Outland+Spells: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:21:59 +02:00
Carbenium
fc9e7226c0 Scripts/Northrend: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:21:09 +02:00
Carbenium
d1a39a2ebf Scripts/EasternKingdoms: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:12:24 +02:00
Treeston
210176fd91 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above
2020-07-26 01:53:34 +02:00
Carbenium
cdaf890af4 Core/EscortAI: std::chrono-ify SetPauseTimer 2020-07-25 23:45:01 +02:00