Commit Graph

32936 Commits

Author SHA1 Message Date
Giacomo Pozzoni
deceb11b5f Log sync db queries in World::Update() loop (#25174)
* Core/Misc: Log sync queries on critical path

* Fix build

* Rename

* Fix warning

* Fix no-pch

* Change WarnAboutSyncQueries() to be header-only
2020-07-30 21:42:27 +02:00
Shauren
0fc7b50c04 Core/Commands: Initialize commands on startup instead of first use 2020-07-30 20:52:46 +02:00
Shauren
57eaab80d9 Core/Mail: Load mails at login instead of on demand when queried by packets (logging in always sends one of the packets that cause mail loading anyway) 2020-07-30 20:38:04 +02:00
Shauren
e94350fcc3 Core/Mail: Refactor mail loading to execute 2 database queries instead of 1+mails.size() 2020-07-30 19:50:24 +02:00
Shauren
2f0893d279 Core/Misc: Replace database query in WorldSession::HandleAddFriendOpcode with async version 2020-07-30 17:41:20 +02:00
Treeston
2059c32744 Build fix for certain compiler configurations on Linux. 7f7fa8b follow-up. 2020-07-30 16:52:55 +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
Giacomo Pozzoni
420b21be98 Core/SAI: Ignore SAI while evading (#25108) 2020-07-29 23:43:19 +02:00
jackpoz
df23ae950f DB/World: Fix primary key in quest_greeting_locale
Close #25115
By @Cerveciento
2020-07-29 16:24:03 +02:00
Keader
713a0340b3 DB/Creature: Fixed level of Puddle Stalker (Rotface)
It also fix issues with Ooze Flood getting wrong resist values
2020-07-29 10:47:25 -03:00
Gildor
586c00fe2e Core/Loot: Prevent loot already looted item (#25084) 2020-07-29 13:29:39 +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
Treeston
7f7fa8b23d Core/Authserver: Split SRP6 into its own file (PR #25131) 2020-07-29 00:07:41 +02:00
Ovah
210f552ac5 Core/World: added startup log outputs for query cache initialization for detailed information.
* the console will now throw a log when the feature is disabled
* additionally the console will now print how long it took to initialize
2020-07-28 21:52:03 +02:00
Shauren
3ad05386c8 Core/Networking: Fixed authserver socket read handlers being called on incorrect thread 2020-07-28 19:44:38 +02:00
jackpoz
5cd93df9ee Core/Metric: Add new metric in World::UpdateSessions()
Add new metric about how long adding sessions took
2020-07-28 17:49:51 +02:00
Carbenium
1245833cdd Core/CreatureAI: std::chrono-ify DoSummon* methods 2020-07-28 17:25:51 +02:00
jackpoz
2ea511b9f4 Dep/Boost: Set boost msvc version on Windows to 14.2
14.2 is the only supported one (Visual Studio 2019)
2020-07-28 15:05:12 +02:00
Giacomo Pozzoni
8a2c79c850 Core/Metric: Log detailed metrics about each opcode handler (#25153)
* Core/Metric: Log detailed metrics about each opcode handler

* Add new panel to Performance profiling dashboard and use fill(0) instead of fill(none)

* Add new settings Metric.Threshold.* to be able to specify the minimum threshold for the specified metrics

* Update dashboard

* Change thresholds to be required to send the metrics. A TC_METRIC_DETAILED_TIMER metric with an expected threshold not configured will be ignored

* Use typedef Milliseconds

* Refresh realms on load
2020-07-28 14:27:54 +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
jackpoz
f9972f2473 Core/Metric: Fix setting in Performance profiling dashboard 2020-07-27 14:56:59 +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
Giacomo Pozzoni
36ef487a90 Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more metrics (#25136)
* Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more metrics

Add more detailed metrics in World::UpdateSessions().

* Attempt using C++17 features

* Fix cmake typo

Co-authored-by: NoName <322016+Faq@users.noreply.github.com>

* Fix build with WITHOUT_METRICS

* Update Performance profiling dashboard with Update sessions panel

* Add panel to show sessions with update time above 100 ms

* Move legends on the right and add max update time diff in the legend of sessions

Co-authored-by: NoName <322016+Faq@users.noreply.github.com>
2020-07-27 14:00:28 +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
e6f36f83b8 tests/EventMap: Add tests for Repeat 2020-07-26 23:20:11 +02:00
Carbenium
7865c1c197 Core/EventMap: Clarify documentation of ScheduleEvent 2020-07-26 23:20:11 +02:00
Carbenium
4470b91223 Core/EventMap: Unify semantics of DelayEvents
DelayEvents(Milliseconds delay) had different semantics than
DelayEvents(Milliseconds delay, uint32 group).
The first method delayed the events only in the case the internal timer
already ticked at least for the amount of delay. In contrast the latter method
delayed events regardless of the internal timer value.

Use the latter semantics for DelayEvents(Milliseconds delay) as well which makes
the outcome more predictable. Adapt tests accordingly.
2020-07-26 23:20:11 +02:00
Carbenium
e877f988d1 tests/EventMap: Test for event past it's execution time
With the switch to std::chrono return type of GetTimeUntilEvent
we don't run into an overflow condition which happend with the previous
uint32 return value if the events scheduled execution time is in the past.
Test for this case.
2020-07-26 23:20:11 +02:00
Carbenium
8cb35b0d5f EventMap: Change GetTimeUntilEvent to return std::chrono types 2020-07-26 23:20:11 +02:00
Carbenium
b9795e4482 EventMap: Switch internal timer over to std::chrono type
Adds the EventMap::Update(Milliseconds time) overload
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
c39eb9b504 Core/Misc: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:17:36 +02:00
Carbenium
d1a39a2ebf Scripts/EasternKingdoms: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:12:24 +02:00
Treeston
35411e5ed9 how does VC++ never catch these? 5e36bf7 follow-up
(No more witty one-liners. Let me go to bed please.)
2020-07-26 05:33:47 +02:00
Treeston
4f570e5d08 Core/Authserver: Auth cleanup phase 1b, the "I didn't hit Stage All" commit. Sorry. (5e36bf7 follow-up) 2020-07-26 05:20:41 +02:00
Treeston
5e36bf7c67 Core/Authserver: Auth cleanup phase 1a, the "stuff I ran across while making phase 2" commit.
- Did you know BigNumber quietly assumes every byte array it gets is little-endian, even though openssl bignums use big-endian? Now you do!
- In entirely unrelated news, make the above behavior explicit through a default-true boolean, same as existing GetBytes derivatives.
- Also, if you are in the enlightened openssl 1.1 crowd, there's no more endian wrangling involved, because openssl now does all of that for us. Progress!
2020-07-26 05:15:43 +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
Carbenium
4b9fdc5d3d Core/EscortAI: std::chrono-ify AddWaypoint 2020-07-25 23:45:01 +02:00
Carbenium
f5076112cb Core/ScriptedAI: std::chrono-ify DoSpawnCreature 2020-07-25 23:16:04 +02:00
Carbenium
27229c10cd Core/BossAI: Remove _DespawnAtEvade(uint32, Creature*) overload
Use _DespawnAtEvade(Seconds,  Creature*) instead
2020-07-25 23:11:10 +02:00
Carbenium
d7ff8c272a Core/InstanceScript: std::chrono-ify DoRespawnGameObject 2020-07-25 23:10:14 +02:00
Carbenium
d5de96e46b Core/Utilities: Add custom _days chrono literal 2020-07-25 20:34:55 +02:00
Carbenium
796e2b32e0 Build: Add WITH_LD_GOLD option to use gold linker on unix
gold is an ELF-only linker which has a better performance
than the default ld.
2020-07-25 18:00:20 +02:00