Commit Graph

227 Commits

Author SHA1 Message Date
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
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
Shauren
31fda79556 Core/PacketIO: Updated packet structures to 8.1.5 2019-06-08 17:03:15 +02:00
Aokromes
91409cc77e Core/SAI: Add a 5th parameter to SAI events
CP of 1c60af6328

By jackpoz
2019-04-30 13:03:49 +02:00
Gooyeth
8ed2e3602b Typo fix contry -> country (#22075)
(cherry picked from commit a3198cbddc)
2019-01-09 17:35:18 +01:00
Gooyeth
163c487be7 Common: Replace ip2nation by ip2location. (#21957)
Replace ip2nation by ip2location.

Download: https://lite.ip2location.com/database/ip-country
(cherry picked from commit 2fe4ab94c5)
2019-01-09 17:35:13 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
jackpoz
8488150dee Core/DBUpdater: Code cleanup 2018-12-30 18:10:11 +01:00
jackpoz
d2b77ca075 Core/DBUpdater: Fix error message
Fix error message when trying to populate the database showing free'd memory data instead of the sql file name
2018-12-30 18:10:06 +01:00
Shauren
f94deace76 Merge branch 'bfa' 2018-12-09 14:45:03 +01:00
ariel-
ea0cd93662 Core/Scripts: added command to move characters across accounts
(cherry-picked from f7f865f818)
2018-12-09 14:18:42 +01:00
Traesh
9d210476e5 Core/Creatures: Update creature model handling with new display scale (#22567) 2018-11-07 20:23:30 +01:00
Shauren
0a779bd791 Core/PacketIO: Updated packet structures to 8.0.1 2018-11-05 00:00:34 +01:00
Shauren
7512ffb058 Core/Entities: Update updatefields to 8.0.1.27980 2018-10-10 22:11:41 +02:00
Shauren
a6fb448b44 Core/DataStores: Updated hotfix database structure
* Updated handling for removed db2s
2018-09-26 23:08:22 +02:00
Shauren
e0309d94c8 Core/Players: Updated pvp talent implementation to bfa 2018-09-26 19:01:31 +02:00
Shauren
b994868c6a Fixed prepared statement field name 2018-09-15 19:07:26 +02:00
Traesh
55a0a2d3f6 Core/Artifact Handle Artifact tiers + Artifact unlock (3rd relic bonus) (#21593) 2018-07-31 23:31:44 +02:00
Shocker
43e6de3637 Core/Database: Use DELETE FROM queries instead of TRUNCATE to avoid deadlocks caused by possible concurrent operations on the table being emptied 2018-05-16 15:05:53 +03:00
Shauren
f05dbf814a Core/DataStores: Load Cfg_Regions and changed default realmlist region to US 2018-05-13 20:43:44 +02:00
Roc13x
11c3c456b7 Core/Bnet: Improve client ban messages (#21837)
* Don't hide banned game accounts from list.
* Display proper ban messages with suspension time remaining.
* More appropriate error codes for bans and locks
2018-04-18 20:27:45 +03:00
Roc13x
cd5a704fc1 Core/Items: Implemented ItemLimitCategoryCondition.db2 (#21835) 2018-04-18 18:41:23 +03:00
joschiwald
c1d865f09b Core/DataStores: Implemented RewardPackXCurrencyType.db2 2018-04-15 21:31:46 +02:00
Shauren
007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
Roc13x
a9f75558dc Core/Items: PvP item levels basic implementation (#20160) 2018-03-05 22:50:57 +01:00
Jeremy
f411b7a90e Core/Player: Implement PvP Talents (#19962)
* SPELL_AURA_119 -> SPELL_AURA_PVP_TALENTS
* Learn Honorable Medallion when pvp rules are enabled
2018-03-04 22:32:08 +01:00
Shauren
75603fe1a0 Core/DataStores: Updated db2 structures to 7.3.5.25996 2018-02-18 16:33:50 +01:00
Shauren
4af15915bc Core/PacketIO: Updated opcodes and packet structures to 7.3.5 2018-02-18 16:33:49 +01:00
Shauren
c9465979c6 Core/Entities: Update updatefields to 7.3.5.25928 2018-02-18 16:33:27 +01:00
joschiwald
5e3e4182c8 Core/Entities: Extended SpawnMask to 64 bit 2018-01-06 19:56:11 +01:00
joschiwald
0d1e251e32 Core/Creature: Added TitleAlt to creature_template 2018-01-05 16:46:51 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
7bb62cd23d Core/DataStores: Updated db2 structures to 7.3.2.25480 2017-12-30 00:26:37 +01:00
Naios
1285347518 Build: Inherit the features and warning flags privately 2017-12-20 04:04:28 +01:00