Commit Graph

260 Commits

Author SHA1 Message Date
Treeston
e9392ad287 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

(cherry picked from commit 210176fd91)
2020-08-03 19:39:00 +02:00
Shauren
2ff1fd0e95 Core/DataStores: Replace harcoded prepared statement offsets with named constants 2020-07-13 21:30:33 +02:00
Shauren
59f1f60a83 Core/DBLayer: Optimize string based query results by eliminating unneeded buffer copies 2020-07-05 12:17:47 +02:00
Peter Keresztes Schmidt
bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
ForesterDev
01d098830a 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>
(cherry picked from commit 8e0365d8a6)
2020-06-22 11:03:31 +02:00
Shauren
6533de3100 Core/Items: Implemented corruption and corruption resistance stats 2020-06-13 00:30:32 +02:00
Shauren
c7306439e7 Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower 2020-06-12 01:29:18 +02:00
Shauren
b47c19d506 Core/DataStores: Allow custom hotfixes (VerifiedBuild <= 0, has loading priority) to coexist with sniffed data (VerifiedBuild > 0) 2020-06-06 23:40:53 +02:00
Shauren
df0a027444 Core/Misc: Ensure that query used for .reload creature_template command always matches the one used for loading during startup 2020-06-04 00:13:05 +02:00
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
Shauren
82b4ca3b7c Core/Creatures: Fixed level 240 guards and updated scaling level calculation 2020-05-02 22:37:32 +02:00
ariel-
7dcc185a15 Core/Instance: stop updating the instance resettimes based on creature respawns
- Rather update normal instance reset time to 2 hours after last creature kill
- This fixes yet another integer overflow due to the possibility of having time_t max showing up
- Also change respawntime and resettime fields to bigint on respawn/instance related tables
- Start using prepared statements on the InstanceSaveMgr

(cherry picked from commit 4c593f12ca)
2020-04-27 12:25:52 +02:00
xinef1
090fd8304a Core/Loot: implement Loot Item Storage (#19018)
* Created Item Loot Storage, no more synchronous DB selects
* Fixed buyback case, where stored loot was not removed from db
* Added Primary key, and changed field types to be unsigned for table item_loot_money

(cherry picked from commit 9dc3de10f0)
2020-04-27 12:25:52 +02:00
Shauren
af76dc6b88 Core/DataStores: Speedup loading hotfix database and change hotfix database character set to utf8mb4 2020-04-25 17:01:26 +02:00
Shauren
d6d67a9766 Core/DBLayer: Fix build using TRINITY_DEBUG 2020-04-25 00:15:26 +02:00
Shauren
aced88b09b Core/AuctionHouse: After taking a break at the start of patch 8.3 auction house is now back in business. 2020-04-20 20:36:24 +02:00
Shauren
0f0ca3a919 Core/DBLayer: Implement async transaction completion callbacks 2020-04-14 16:23:44 +02:00
Shauren
0969e93d15 Core/DataStore: Load ItemNameDescription 2020-03-26 20:09:40 +01:00
Shauren
90628b7d29 Core/DataStores: Updated db2 structures to 8.3.0 2020-02-17 23:58:47 +01:00
Shauren
302f7b6c79 Core/Misc: Fix build using WITH_COREDEBUG 2020-01-08 18:09:08 +01:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
d934824421 Core/Items: Implement azerite empowered items 2019-12-05 00:12:35 +01:00
Shauren
1238583312 Core/Spells: Fixed value of aura effects for stat mod auras applied by items 2019-11-30 12:11:29 +01:00
Shauren
599722eba0 Core/Mail: Mark mail item loading prepared statements as synchronous, not async queries
Closes #23935
2019-11-23 17:58:29 +01:00
Shauren
edc440c109 Core/Mail: Fix copypaste mistake in prepared statements
Closes #23934
2019-11-23 14:45:44 +01:00
Shauren
ec9d624aec Core/Items: Implement azerite essences
* Implement inspecting heart of azeroth data
* Fixed heart of azeroth item level - bonuses now apply
2019-11-22 11:02:04 +01:00
Shauren
ef3485e6fc Core/Items: Refactor loading additional item data (artifacts/azerite) 2019-11-19 14:37:05 +01:00
Shauren
f48b87054e Core/Players: Fixed crash when deleting from db
Closes #23921
2019-11-16 13:06:34 +01:00
Shauren
ab6ae44b63 Core/Items: Implemented AzeriteItem 2019-11-12 00:28:59 +01:00
Shauren
d1af9d9cf4 Code/DataStores: Fixed spell_misc hotfix query 2019-11-11 14:08:56 +01:00
Shauren
7c168fb6eb Build fix 2019-11-04 22:37:12 +01:00
Shauren
a6635436ce Fix dynamic linking builds for msvc 2019-11-04 13:15:15 +01:00
Shauren
9ea577da13 Core/RaF: Remove level granting (new RaF doesn't support this) 2019-11-03 14:25:39 +01:00
Shauren
f689f6e9bd Core/DBUpdater: Fixed db updater for mysql 8 on windows using named pipe connections 2019-11-03 14:14:32 +01:00
Shauren
c3a9d56b56 Core/DBLayer: Support using mysql 8 2019-11-01 16:21:14 +01:00
Shauren
2072258ef4 Core/DBLayer: Escape mysql 8 keywords 2019-11-01 16:20:15 +01:00
Shauren
3ac790287a Core/DataStores: Updated db2 structures to 8.2.5 2019-10-27 00:12:45 +02:00
Lopfest
7d999b70a1 Core/SmartScripts: implement SMART_ACTION_PLAY_SPELL_VISUAL_KIT (#23737) 2019-09-01 15:51:01 +02:00
Traesh
548d79bb06 Core/DataStores: Implemented WorldStateExpression 2019-08-24 17:13:17 +02:00
ariel-
d131bd1da0 Core/Database: Prepared statement parameter preallocation (#18999)
- Pass prepared statement size to the helper class to prevent runtime resizing.
- Rename CheckValidIndex -> AssertValidIndex
- Cached prepared size on the worker pool as it's shared among all connections
- Cached query data only for each connection, done lookup in map instead of possibly creating a new element
- Kill the prepared statement map, and store raw sql string on the MySQLPreparedStatement class
(This info is only used for logging, and there is no need of keeping a second container just for it)

(cherrypicked from affee140c6)
2019-08-17 20:04:14 +02:00
Shauren
13440434c3 Core/DBLayer: Prevent mixing databases with query holders 2019-07-27 11:45:56 +02:00
Shauren
f6e2b8cdc1 Core/DBLayer: Prevent committing transactions started on a different database 2019-07-27 10:52:33 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
ariel-
26fe949619 Core/Server: fix duplicated inserts into tutorials table for newly created characters
(cherrypicked from 60dd803bbe)
2019-07-21 21:06:54 +02:00
xinef1
b485f3e673 Few small optimizations here and there (#18684)
Changes list:
- Added CharacterGuidByNameContainer which contains name -> guid unordered map (updated along CharacterInfo)
- Extended CharacterInfo structure with GuildId
- Extended CharacterInfo structure with ArenaTeamId[3], for all possible teams (2v2, 3v3, 5v5)
- Removed CHAR_SEL_GUID_BY_NAME and CHAR_SEL_CHAR_GUID_BY_NAME synchronous queries, name -> guid can be now retrieved in World::GetCharacterGuidByName
- Removed CHAR_SEL_GUID_RACE_ACC_BY_NAME synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_CHAR_LEVEL synchronous query, level can be retrieved by guid
- Changed CHAR_SEL_CHARACTER_ACTIONS_SPEC to asynchronous query, action bars are now loaded asynchronously
- Removed CHAR_SEL_CHARACTER_NAME_CLASS synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_PLAYER_ARENA_TEAMS and CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID synchronous queries, arena teams are now stored in CharacterInfo
- Replaced synchronous db calls with CharacterInfo lookups
- Removed ObjectMgr::GetPlayerGUIDByName, as it used db query
- Replaced some unnecessary UpdateObjectVisibility() calls because they were either duplicated (called few lines above in other function) or it is enough to call DestroyForNearbyPlayers because object is being removed or should be invisible and DestroyForNearbyPlayers is faster
- Corrected typo in Player::DestroyForPlayer, only items in slots 0 to EQUIPMENT_SLOT_END are sent to other players
- Renamed Player::GetGuildIdFromDB to Player::GetGuildIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetArenaTeamIdFromDB to Player::GetArenaTeamIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetLevelFromDB to Player::GetLevelFromCharacterInfo and changed the function to use CharacterInfo structure
- Removed GameEventMgr::_questToEventLinks and associated functions, eventId is now stored in Quest class under _eventIdForQuest variable
- Changed some functions checking quest status to use other functions for quest status check instead of duplicating code
- Removed callback from add friend, because we can get the guid from appropriate storage, no need to make db query
- Removed callback from add ignore, because we can get the guid from appropriate storage, no need to make db query
- Added callback to unwrap wrapped items asynchronously
- Removed synchronous select in tutorials to check if we have any entries in db, if any entry exists in db, m_TutorialsChanged variable will have TUTORIALS_FLAG_LOADED_FROM_DB flag added and it is no longer necessary to query database

(cherrypicked from b955456008)
2019-07-21 21:06:54 +02:00
r00ty-tc
75efb5d431 Core/Database: Correction for later MariaDB version
- Removed unused define CR_INVALID_CONN_HANDLE which was removed entirely in more modern MariaDB versions

(cherry picked from commit 2a7a1b27d5)
2019-07-15 15:08:19 +02:00
Shauren
3262bc827d Core/DataStores: Updated db2 structures to 8.2 2019-07-14 19:20:45 +02:00
funjoker
d11b9a6992 Core/DataStores: Fix field order for some DB2s (#23439) 2019-06-18 19:33:29 +02:00
Shauren
bcaaa3d6f6 Core/DataStores: Updated db2 structures to 8.1.5 2019-06-08 17:10:00 +02:00
Shauren
82c7b6c568 Core/Items: Drop item random property and suffix - all random stats must be given using bonus lists 2019-06-08 17:09:20 +02:00