Commit Graph

45 Commits

Author SHA1 Message Date
Shauren
1925778e44 Core/Players: Split playerBytes fields in characters table
(cherry picked from commit 2a6f65fddc)
2016-03-13 20:18:05 +01:00
Shauren
2a37266269 Core/Auth: Fixed login for accounts with accented characters
Closes #16770
2016-03-12 21:22:16 +01:00
Naios
3a4ec8bcbe Core/Database: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)
* Also instantiate the database worker pools in DatabaseEnv.cpp now.

(cherry picked from commit a8fe7f6eb7)
2016-03-11 19:51:07 +01:00
Naios
62815c6e1c Core/Database: Use RAII for resource management in MySQLConnection
* Prevents double deletion of MySQLConnection after errors
* The object stays valid after an error and will wait for a reconnect
* Also crash the server if 5 reconnects fail
* Corrects an issue where the server was crashed after one reconnect
  because mysql_thread_id was invoked with an invalid handle
2016-03-03 01:19:58 +01:00
Naios
09fa0ab46a Core/Database: Move DatabaseWorkerPool into it's own translation unit 2016-03-03 01:06:13 +01:00
Naios
5ed0180994 Core/Database: Use RAII instead of raw pointers for resource management
* Corrects dirty usage of vectors with array indexes
* Removes _connectionCount which is now handled through the vector size
* Rename magic identifier "t" to "connection"
2016-03-03 01:06:13 +01:00
Naios
7d3cffc297 Core/Database: Close the databases correctly when the DBUpdater fails
* Also fixes a memory leak spotted by Aokromes
2016-03-03 01:06:13 +01:00
Naios
b5369b7d87 Core/Common: Add a generic config helper to access built-in overwriteable paths.
* Adds CMAKE_COMMAND and CMAKE_BINARY_DIR to revision_data.h
* Move the source and mysql exe path handling out of the DBUpdater.
* Make some Config methods const for correctness.
* Remove C & CXX flags from revision_data.h
 (was unused and didn't capture all cxx vars)
* Reorder the link order to prevent `ld` from ignoring the file
* Ref #15671

(cherry picked from commit 719159e207)
2016-02-22 16:25:47 +01:00
Naios
f2233f5d14 Core/Updater: Convert an assertion into a fatal error
* The error is triggered when it fails to open an update for hashing
* See 'https://community.trinitycore.org/topic/12352-worldserver-crashes-on-database-update/'
  for details
* And a minor cleanup in the UpdateFetcher

(cherry picked from commit c43b808665)
2016-02-22 16:01:27 +01:00
Naios
ae1a5c6c2b Core/Updater: Use a different method for file reading
* Current method causes issues under CentOS 6 and could possibly
  lead to cutted buffer content when reading in textmode.
* Closes #16209
2016-02-20 20:18:42 +01:00
Shauren
dfbb3bec56 Core/Auth: Moved expiring bans to background task - no longer blocking queries during login by default running every minute (configurable) 2016-02-15 19:38:53 +01:00
Shauren
5bf90b3338 Core/Auth: Performance/security improvements
* Changed all db queries to async
* Added buffer length checks
* Only allow one challenge/proof packet per socket lifetime

Closes #13217
Closes #16602
2016-02-14 18:41:25 +01:00
treeston
6102a7937d Maps/Instances: Implement handling of CMSG_SET_SAVED_INSTANCE_EXTEND 2016-02-10 19:35:11 +01:00
Duarte Duarte
893c63f320 Core/DBUpdater: Fix help text download link
Change from forums to GH Releases
(cherry picked from commit 6b529fcd43)
2016-01-04 22:53:34 +00:00
Rushor
923a368ac7 Update copyright note for 2016 2016-01-01 12:02:33 +01:00
jackpoz
5b8b32dac7 Core/Quest: Fix issues reported by static analysis 2015-12-07 20:55:33 +01:00
Shauren
7631ec444e Core/DBLayer: Improve error message from 0a27f8bce2
(cherry picked from commit d31706b07e)
2015-11-14 13:54:36 +01:00
Shauren
536365a70f Fix build for mysql versions older than 5.7
(cherry picked from commit 5604aed5f1)
2015-11-13 09:28:14 +01:00
Shauren
9bc5088a81 Core/DBLayer: Ensure that MySQL version used when compiling is the same as libmysql.dll version used for running the server.
Ref #15848

(cherry picked from commit 0a27f8bce2)
2015-11-12 17:55:10 +01:00
Vincent-Michael
ff9001ce1d Updated url for tc wiki
(cherry picked from commit 6d01960448)
2015-11-07 19:35:24 +01:00
Shauren
a17c27aaeb Core/Accounts: Fixed ban check after 517a30d7c1 2015-11-05 21:25:51 +01:00
ShinDarth
7ab1d1b7d0 Core/Ticket improved ticket system
- Safely close ticket before character deletion
- Allow to keep trace of delete characters tickets (configurable)
- Closes #15655

Closes #15699
2015-11-03 16:07:30 +01:00
Shauren
e8909de8de Core/Accounts: Check active column when determining if account is banned or not 2015-11-01 13:16:29 +01:00
Shauren
b8e86b9b7a Core/DBLayer: Allowed using GetDouble for SUM results instead of requiring string conversions
(cherry picked from commit 3109ab2da0)
2015-10-31 18:25:40 +01:00
Shauren
517a30d7c1 Core/DBLayer: Sprinkle some async magic on worldserver auth/session load process
(cherry picked from commit 0e49eefe85)
2015-10-31 15:36:48 +01:00
Shauren
4a36850167 Core/World: Store account id in CharacterInfo to reduce the amount of database queries
(cherry picked from commit aaaa1c3441)
2015-10-29 21:08:00 +01:00
Shauren
7dcddd90be Core/Spells: Improved spell category cooldown handling
* Category cooldown is stored with the spell that started the cooldown (and only resetting cooldown on that spell will clear cooldowns on entire category - this fully mirrors client behavior)
* This significantly reduces the amount of data saved to database for cooldowns
* Spell casts from items that have a different category specified than on spell will now check for cooldown during the cast

(cherry picked from commit 1efb3f08e2)

Closes #15766
Closes #15137
Closes #14837
2015-10-29 17:56:18 +01:00
ShinDarth
d380c12c56 Core/Battleground: implement deserters tracker feature 2015-10-28 20:39:04 +01:00
ShinDarth
2ebf068fc7 Core/BG fix .character changefaction pvpstats victories amount 2015-10-12 19:25:43 +02:00
Duarte Duarte
22536641b2 Merge pull request #15654 from ShinDarth/resolvedBy
Core/Ticket keep always trace of GM who resolves the ticket
2015-10-06 06:35:45 -07:00
ShinDarth
e66db9e20c Core/Ticket keep always trace of GM who resolves the ticket 2015-10-06 15:31:54 +02:00
joschiwald
3db4c64287 Core/Updater: fixed host parameter is being ignored
(cherry picked from commit e51b660177)
2015-10-05 17:15:54 +02:00
Naios
45a60c2d22 CMake: Fix bad generation of "revision_data.h" not including MYSQL_EXECUTABLE.
* was caused through invoking "FindMySQL" after using ${MYSQL_EXECUTABLE}.
* better re-run CMake if you are affected by the mysql exe wasn't found issue.
2015-10-05 17:12:00 +02:00
Naios
a561edefb9 Core/Updater: Fix mysql in path check/search. 2015-10-05 17:11:59 +02:00
Shauren
0cf04cc166 Core/Updater: Pipe mysql process output into worldserver log
(cherry picked from commit 2d109b63e2)
2015-10-05 17:11:57 +02:00
Shauren
402a3c45ff Core/Maps: Moved corpse management to map level
(cherry picked from commit cd27fd38b9)

# Conflicts:
#	src/server/database/Database/Implementation/CharacterDatabase.cpp
#	src/server/database/Database/Implementation/CharacterDatabase.h
#	src/server/game/Entities/Corpse/Corpse.cpp
#	src/server/game/Entities/Creature/GossipDef.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Player/Player.h
#	src/server/game/Globals/ObjectAccessor.cpp
#	src/server/game/Globals/ObjectAccessor.h
#	src/server/game/Globals/ObjectMgr.cpp
#	src/server/game/Globals/ObjectMgr.h
#	src/server/game/Grids/ObjectGridLoader.cpp
#	src/server/game/Handlers/AuctionHouseHandler.cpp
#	src/server/game/Handlers/CharacterHandler.cpp
#	src/server/game/Handlers/ChatHandler.cpp
#	src/server/game/Handlers/QueryHandler.cpp
#	src/server/game/Maps/Map.cpp
#	src/server/game/Server/Packets/CharacterPackets.cpp
#	src/server/game/World/World.cpp
#	src/server/scripts/Commands/cs_reload.cpp
2015-09-29 18:45:01 +02:00
pete318
01ae5c4bf6 Auction house changes:
- Stop storing guid for auctioneer.
 - Store instead house ID
 - No separate ID for various houses. Only Horde, Alliance and Neutral.
 - Removed non-needed faction checks.
 - Use enum for auction house IDs

NOTE: This will expire all current auctions and return item to player (or
award to high bidder) in order to prepare database for the changes.
2015-09-28 22:26:23 +02:00
Shauren
5c3ba60d54 Core/DBLayer: Allocate a single buffer for entire prepared result set instead of separate ones for each field
(cherry picked from commit 8652f4b4de)
2015-09-27 17:11:35 +02:00
Shauren
25c0303976 Core/DBLayer: Added compile time validation for prepared statement indexes passed to DatabaseWorkerPool::GetPreparedStatement turning mistakes like the one fixed in 0327927fa6 into compiler errors.
(cherry picked from commit 7c75160f59)

Conflicts:
	src/server/database/Database/Implementation/HotfixDatabase.h
	src/server/shared/DataStores/DB2StorageLoader.cpp
	src/server/shared/DataStores/DB2StorageLoader.h
	src/server/shared/DataStores/DB2Store.h
2015-09-27 17:08:50 +02:00
Shauren
d2076ef8b0 Core/DBLayer: Optimized prepared statement query results by eliminating unneeded buffer copies
* Improved error logs for using incorrect Field getters to also include table name, field name and field index.

(cherry picked from commit 65dbc7082a)

Conflicts:
	src/server/database/Database/Field.h
	src/server/game/Globals/ObjectMgr.cpp
2015-09-27 16:28:04 +02:00
pete318
dcb7082277 Map local guids 6.x -> 3.3.35:
Implemented:
  ca83e14f8b
  ee1c1b97be
  18e4ab6911
  bf37446b3c
  cb854a2b7b

* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396e
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
* Added new function to return but not increment guid
* Adjusted .debug loadcells to show low guid in map before/after load
* Added debug messages for creature spawn/destroy, for map guid debugging
* Store all Gameobjects and Creatures added to OutdoorPvP, so the callback script can be removed when OutdoorPvP instance is destroyed.
2015-09-22 21:33:57 +02:00
StormBytePP
7b245a0b6b Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert 2015-09-21 15:11:06 +02:00
StormBytePP
405f823f68 Core/BuildSystem: Merged crypto and gitrevision into common, cleaned include directory lists (to mimic 6.x buildsystem) 2015-08-24 03:38:54 +02:00
StormBytePP
0cc3d883e1 Core/Build: Renamed Revision.h to GitRevision.h to avoid compile failure when old revision.h file is present 2015-08-16 23:08:01 +02:00
StormBytePP
1f66d719f2 Core/BuildSystem: Merge collision, debugging, threading, utilities and configuration into "common" which does not depend on shared anymore and moved database out of shared library
These changes enables to build tools only without even having MySQL installed
2015-08-16 21:23:15 +02:00