Commit Graph

208 Commits

Author SHA1 Message Date
daMaex
f922a7dff6 Fixed MariaDB build the easy way for the client version check (#28039)
depending on https://jira.mariadb.org/browse/CONC-509
2022-06-23 13:53:51 +02:00
daMaex
bceb5b6060 MariaDB support for Ubuntu 22.04 (#28031) 2022-06-14 14:10:25 +02:00
Shauren
ce4981b23f Core/DBUpdater: Apply each sql update file in a separate transaction
(cherry picked from commit b79a91039b)
2022-01-30 15:50:56 +01:00
Shauren
cd5fdc50ef Core/DBLayer: Fixed false positive msvc analysis warning
(cherry picked from commit 6ce56e8137)
2022-01-22 01:25:28 +01:00
kvolk2git
57617e215b Core/DBUpdater: Fixed db auto updater for mysql 8 when ssl connections are enabled (#27298) 2021-11-20 23:03:20 +01:00
Giacomo Pozzoni
d9a0db79a8 Core/DB: Improve MySQL version check messages (#26866)
* Core/DB: Improve MySQL version check messages

* Make it more clear that any version above the required one is supported

* Implement feedback
2021-08-27 18:40:20 +02:00
Kelno
e2f20aff8a Don't count character pending deletion towards character per account limit (#26837)
* Don't count character pending deletion towards character per account limit

* Never show more than 10 characters char enum

* Use constants
2021-08-19 16:07:54 +02:00
Aokromes
3c84972a36 Core/DB: Updated missing check (#26834)
* Core/DB: Updated missing check

TrinityCore does not support MySQL versions below 5.7, please update your MySQL server
2021-08-18 10:16:06 +02:00
Giacomo Pozzoni
96dc110f4a Core/DBLayer: Add QueueSize() method (#26733)
* Core/DBLayer: Add QueueSize() method

Add QueueSize() method to database objects (Login, Character and World) that returns how many tasks are queued.
Include the queue size of the 3 databases in ".server debug" command

* Make the code less threadsafe

* Send data to InfluxDB

* Update grafana dashboard
2021-07-24 14:50:30 +02:00
robinsch
d1e913162e [Exploit/Dupe] Container item (#26689)
* Core/Item: Fixed possible dupe with container items containing non unique non stackable items

* Fixed build

* Update sql script and related base structure

Co-authored-by: jackpoz <giacomopoz@gmail.com>
2021-07-18 14:29:02 +02:00
Shauren
9f852c27b9 Core/Players: Add PlayerExtraFlags for tracking race change, and raf level grant usage 2021-06-06 14:10:23 +02:00
Giacomo Pozzoni
a22bc236eb Core/Creature: Add new db field InteractionPauseTimer (#25880)
* Core/Creature: Add new db field InteractionPauseTimer

Add new db field InteractionPauseTimer to allow to define different interaction pause timers for each creature (the previous system was a global setting in worldserver.conf Creature.MovingStopTimeForPlayer)

* Set all columns in creature_template_movement as optional (can be NULL, default NULL). Fill only the columns that should override the default C++ value

* Use the InteractionPauseTimer value throughout the code instead of Creature.MovingStopTimeForPlayer

* Handle InteractionPauseTimer set to 0 as "don't stop at all"

* Implement InteractionPauseTimer in creature_movement_override

creature_movement_override allows NULL values, in which case the values from creature_template_movement will be used for those columns that are NULL, falling back to default C++ values if creature_template_movement has NULL values too (or no rows for the creature)

* Read default InteractionPauseTimer from worldserver.conf

* Rename 2021_99_99_99_world.sql to 2021_01_22_00_world.sql
2021-01-22 19:48:50 +01:00
Kargatum
a32b6b8ac4 Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf
2021-01-03 11:47:07 +01:00
Shauren
53482f7299 Core/DBLayer: Fixed memory leaks with existing SQLQueryHolder uses and eliminated the possibilty of adding more in future (replaced manual memory management with smart pointers) 2020-10-24 17:37:24 +02:00
Shauren
0a9e239c12 Core/Mail: Replaced blocking db query in mail sending with async version 2020-09-27 17:07:47 +02:00
Shauren
d0d0f51f32 Core/Auction House: Eliminate blocking db queries for account permissions when expiring auctions that have offline bidders 2020-09-27 00:51:52 +02:00
Treeston
991dc8e050 1eca51b follow-up, nuke command.permission from orbit; it was only duplicating data already stored in the core. 2020-09-20 03:31:54 +02:00
Giacomo Pozzoni
4b7d19c91b Core/SAI: Add orientation and delay columns to waypoints table (#25472)
* Core/SAI: Add orientation and delay columns to waypoints table

* Rename 2020_99_99_99_world.sql to 2020_09_19_00_world.sql
2020-09-19 23:33:29 +02:00
jackpoz
a33ff74d92 Core/Characters: Replace 2 database statements with 1
Replace DELETE + INSERT with REPLACE when updating realmcharacters table
2020-09-13 19:22:07 +02:00
Treeston
00dd337b5d Scripts/Commands: .character command conversion 2020-09-07 15:38:23 +02:00
Treeston
bcdbdd6f23 Core/Authserver: Removal of sha_pass_hash, compatibility fields, and everything that uses them (PR #25156) 2020-09-06 16:04:10 +02:00
jackpoz
cc64762f06 Core/Arena: Fix Arena.ArenaStartPersonalRating setting not having effect if the player didn't do any arena match before next server restart
Ref #16609
2020-09-05 22:03:26 +02:00
Treeston
534a2388b7 Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327) 2020-08-28 00:11:16 +02:00
Shauren
89fd7d4592 Core/Misc: Remove NULL 2020-08-20 16:04:44 +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
Carbenium
98b1b20d6b Core/Updater: Fix detection of the mysql binary when a directory is given as path
This ensures that we never pass a directory path StartProcess which results in a crash.

Closes #25216
2020-08-07 11:23:10 +02:00
Treeston
38de6d3307 Core/DB: Split accounts.session_key into session_key_auth (3.3.5) and session_key_bnet (master), so the branches will no longer break each other's realm switching. 2020-08-03 18:53:00 +02:00
Shauren
65e3b3cf0d Core/Authserver: Validate length of session key field after bfb041246f 2020-08-03 15:14:40 +02:00
Treeston
3164b58c7d Core/Authserver: Re-organize the accounts table (PR #25135)
- no longer use sha_pass_hash for anything else core-side (.account, SOAP, RA)
- salt/verifier/session_key are now binary
- old s/v/sha_pass_hash fields kept around for backwards compatibility
- sha_pass_hash is still updated (for now), s/v are not
- sha_pass_hash is only read if s/v have been manually changed
- SRP6 b now uses the full 32 bytes of randomness (instead of randomly only using 19)
2020-08-02 22:52:21 +02:00
Shauren
9b806c6b5d Core/DBLayer: Add nicer api for SQLQueryHolders 2020-07-31 23:27:26 +02:00
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
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
7f7fa8b23d Core/Authserver: Split SRP6 into its own file (PR #25131) 2020-07-29 00:07:41 +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
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
Shauren
524d167398 Dep: Switch to boost process instead of old standalone version 2020-07-15 19:33:12 +02:00
Shauren
dc71bd466f Core/DBLayer: Fix build with TRINITY_STRICT_DATABASE_TYPE_CHECKS 2020-07-11 10:58:25 +02:00
Shauren
c317f248bf Core/DBLayer: Optimize string based query results by eliminating unneeded buffer copies
(cherry picked from commit 59f1f60a83)

# Conflicts:
#	src/server/database/Database/Field.cpp
#	src/server/database/Database/Field.h
#	src/server/database/Database/QueryResult.cpp
2020-07-10 22:47:04 +02:00
jackpoz
f10b9d617a Core/Database: Apply 54b0b8f5ea to 141ada19b0 2020-07-09 22:37:23 +02:00
ipriver
a46d047f94 fixed indentation for cmake files 2020-06-24 14:42:02 +02:00
Peter Keresztes Schmidt
b210bb3713 Core/Misc: Replace Trinity::make_unique with std (#24869)
(cherry picked from commit bab5fd87a3)
2020-06-23 18:03:16 +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
Shauren
6a1cb348c7 Core/DBLayer: Fix build using TRINITY_DEBUG
(cherry picked from commit d6d67a9766)
2020-06-13 21:25:42 +02:00
Giacomo Pozzoni
141ada19b0 Cherry pick some db commits (#24713)
* Core/DBLayer: Implement async transaction completion callbacks

(cherry picked from commit 0f0ca3a919)

# Conflicts:
#	src/server/bnetserver/REST/LoginRESTService.cpp
#	src/server/bnetserver/Server/Session.cpp
#	src/server/bnetserver/Server/Session.h
#	src/server/database/Database/Transaction.cpp
#	src/server/game/Handlers/CharacterHandler.cpp
#	src/server/game/Handlers/SpellHandler.cpp
#	src/server/game/Server/WorldSession.cpp
#	src/server/game/Server/WorldSocket.cpp
#	src/server/game/Server/WorldSocket.h

* Core/Misc: Fixed char enum packet sometimes not showing newly created character when client latency is too low

(cherry picked from commit fc9d2e728e)

# Conflicts:
#	src/server/game/Handlers/CharacterHandler.cpp

* Fix no-pch build

* Core/Player: Wait for correct transaction on character creation

(cherry picked from commit 01c68b2aa2)

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp

* Fix warning

* Remove unused login transaction

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2020-05-30 17:43:54 +02:00
ForesterDev
48c700347c Core/Database: fix wrong password logging (#24487) 2020-04-23 10:54:45 +02:00
zartech22
56f20d69a6 Add realm ID for actions based ip logging (#24453)
* Update SQL queries to insert realm id

* Insert the realm id when logging actions based on IP

* Adding the SQL update file

* Update 9999_99_99_99_auth.sql

* Update auth structure

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-04-18 14:26:05 +02:00
Shauren
579d41acc5 Core/DBLayer: Fix compilation with mysql 8 2020-04-08 09:44:52 +02:00
myuzhobcplidtkieno
ae553f8966 Added the ability to use TLS when connecting to a database. (#24348)
* Added the ability to use TLS when connecting to a database.

* Trying to kickstart CI checks

* Revert the kickstart change

Co-authored-by: myuzhobcplidtkieno <myuzhobcplidtkieno@github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-04-07 22:08:28 +02:00