Commit Graph
62 Commits
Author SHA1 Message Date
Naios 51ec8d3b8c Core/Scripting: Use the path of the worldserver executable to search for the scripts dir
* Fixes issues when starting the worldserver not in the bin directory
  or the CMAKE_INSTALL_PREFIX directory using the -c option.

(cherry picked from commit 86b0fcf67aadc0d313253befb0590d00efd085bc)
2016-04-18 23:03:24 +02:00
Naios a679829050 Core/Cryptography: Move the SHA1 calculate helper to the SHA1 header
(cherry picked from commit 3271f328de35f940f682a0dbe1d9466e29190182)
2016-04-18 22:11:16 +02:00
Naios 5fa7127927 Core/Proto: Convert the proto project to a standalone shared library
* Fixes issues with dynamic linking on linux
* Closes #16981
2016-04-16 22:07:07 +02:00
Naios 3497b4960b Core/Common: Capsule boost process into helper functions
* For easier usage, the processes output it routed
  correctly to the TC logger line by line now.
* Add support for asynchronous process execution
  and process termination.
2016-04-11 20:07:24 +02:00
Shauren a82f6aa4cc Core/Misc: Build fix for dynamic linking 2016-04-10 17:58:05 +02:00
Shauren 2a7a2a1b65 Core/Misc: gcc 5.3 nopch build fix
Closes #16878
2016-04-09 12:42:57 +02:00
treeston cf7436b644 Util/Random: Add randtime(Milliseconds const&, Milliseconds const&) to supersede urandms(uint32,uint32) for scripts being ported to std::chrono.
(cherry picked from commit 224b42c53a6ae212f2d1d550903e019ab8a741d6)
2016-04-08 22:57:01 +02:00
Shauren 08c27d3205 Core/Misc: MSVC /W4 warning fixes 2016-04-06 18:40:41 +02:00
Shauren 4a3a178d7f Buildsystem: Initial changes to support building with vs clang toolset 2016-04-05 22:43:41 +02:00
Shauren 70412e7e25 Core/Misc: MSVC warning fixes 2016-04-05 00:15:56 +02:00
Carbenium 2e3686b7e7 Core/Util: Add a missing include
(cherry picked from commit 1038df8d5b522e1e959528c3b7c17c01a88e7759)
2016-04-02 14:33:25 +02:00
DDuarte 0afcefea27 Core/Config: Fix 3 more missing config warnings
Closes #16861

Thanks tkrokli
2016-03-31 03:31:21 +01:00
DDuarte 9431b94bff Core/Config: Error logging for ptree_bad_data
Ref https://github.com/TrinityCore/TrinityCore/commit/6487e2f2d6a1ddbeff77362219658376b8a3f9f0#commitcomment-16888976
2016-03-31 03:19:27 +01:00
DDuarte 06b3bca0d2 Core/Startup: Warn when a config key isn't found in the config files
Example: "Missing name Guild.SaveInterval in config file worldserver.conf, add "Guild.SaveInterval = 15" to this file"
2016-03-27 23:48:17 +01:00
Shauren a81a204678 Core/Common: Moved MessageBuffer to common 2016-03-26 17:15:20 +01:00
Naios 501fd9b502 Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.
2016-03-24 01:28:58 +01:00
Naios f4e0945b13 Core/Build: Add the possibility to link libraries dynamically.
* makes it possible to access exported singletons from other shared lib's.
* reduces binary size
2016-03-24 01:28:55 +01:00
Shauren e3af42e05c Core/Util: Extracted GetPID to separate function 2016-03-21 17:25:34 +01:00
Naios 0db4f018e8 CMake: Use inherited dependencies in common and tools
(cherry picked from commit abda7a910a760687f9c1b9e0893314e04982c0f1)
2016-03-19 23:19:52 +01:00
Shauren 680c12a4bf Core/Crypto: Renamed SHA1Randx/WardenKeyGeneration and made it a template class 2016-03-19 23:15:54 +01:00
Naios 37dbbe22eb Dep/CppFormat: Update cppformat to cppformat/cppformat@5174b8c
(cherry picked from commit f52495c66b1b219f82729221e8023a86b28d54bf)
2016-03-16 16:12:04 +01:00
Naios 30517cb1d3 Core/Common: Generalize platform specific includes in common/Platform 2016-03-11 18:25:55 +01:00
Naios 5c91586797 Core/Common: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)
2016-03-11 18:22:39 +01:00
MitchesD ce5def332f Core/Misc: fix build 2016-03-03 19:58:28 +01:00
Shauren dea7d429ab Core/Debugging: Make abort() less bad on windows by forcing crash log generation 2016-03-03 17:29:48 +01:00
joschiwald 44ad10f884 Core/Logging: fixed default logger (partial reverts 0904858624)
(cherry picked from commit 9beeca79ac0ece4fd07ccd83921a7ec93cb85efa)
2016-02-27 18:00:02 +01:00
Shauren a0b2be6c1d Core/Logging: Force synchronous logging after io_service shutdown - fixes logging on worldserver shutdown 2016-02-23 23:41:18 +01:00
Shauren 8086a39210 Core/PacketIO: Requeue packets handled with STATUS_LOGGEDIN received before player is fully loaded in one step after packet processing loop - reduces used locks from 3 per packet to 1 per packet 2016-02-22 20:02:26 +01:00
Naios 719159e207 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
2016-02-21 15:52:42 +01:00
Shauren 97a79af470 Core/Networking: Rewrite networking threading model
Each network thread has its own io_service - this means that all operations on a given socket except queueing packets run from a single thread, removing the need for locking
Sending packets now writes to a lockfree intermediate queue directly, encryption is applied in network thread if it was required at the time of sending the packet
2016-02-19 19:23:04 +01:00
Carbenium 32e8b6506f Collision/MMap: Fix a memleak reported by valgrind
Tiles which are owned by the mesh should have the DT_TILE_FREE_DATA flag to ensure
deallocation on removal from the mesh.

Log:
==23516== 6,181,976 bytes in 6 blocks are definitely lost in loss record 15 of 15
==23516==    at 0x4C298A0: operator new[](unsigned long) (vg_replace_malloc.c:389)
==23516==    by 0x2052660: dtCustomAlloc(int, dtAllocHint) (Memory.h:11)
==23516==    by 0x29D7FDA: dtAlloc(int, dtAllocHint) (DetourAlloc.cpp:43)
==23516==    by 0x230AA70: MMAP::MMapManager::loadMap(std::string const&, unsigned int, int, int) (MMapManager.cpp:166)
==23516==    by 0x1DD585B: Map::LoadMMap(int, int) (Map.cpp:125)
==23516==    by 0x1DD7266: Map::LoadMapAndVMap(int, int) (Map.cpp:200)
==23516==    by 0x1DD93C6: Map::EnsureGridCreated_i(CoordPair<64u> const&) (Map.cpp:453)
==23516==    by 0x1DD9129: Map::EnsureGridCreated(CoordPair<64u> const&) (Map.cpp:429)
==23516==    by 0x1DED100: Map::GetGrid(float, float) (Map.cpp:2200)
==23516==    by 0x1DE0F4C: Map::GetAreaFlag(float, float, float, bool*) const (Map.cpp:2349)
==23516==    by 0x198521B: Map::GetZoneId(float, float, float) const (Map.h:353)
==23516==    by 0x197CFF0: WorldObject::GetZoneId() const (Object.cpp:1277)

Phase tiles aren't managed by detour so they shouldn't be free'd automatically on removal.
See MMapManager::UnloadPhaseTile
2016-01-30 20:40:54 +01:00
Shauren d5b0ffbe9b Core/Misc: Added safeguard against generating invalid selection weight data in Trinity::Containers::SelectRandomWeightedContainerElement 2016-01-23 11:34:47 +01:00
Shauren bc94bacce4 Core/Misc: Build fix for clang & libc++ 2016-01-09 01:38:59 +01:00
DDuarte ff9c999334 Core/Utilities: Fix build in some versions of Ubuntu / GCC
Closes #16125
2016-01-03 20:39:13 +00:00
Shauren 00c878e73a Core/Misc: Build fix for older gcc 2016-01-02 18:45:01 +01:00
Vincent-Michael 478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren 9ab10d6e68 Core/Misc: VS 2013 build fix - horrible hack. 2015-12-27 01:21:30 +01:00
Shauren 921d893c2a Build fix 2015-12-26 00:33:14 +01:00
Shauren ae20b2ab56 Core/Utils: Moved rng functions to separate header and added utility functions to select a random element from a container where each element can have different chance of being selected 2015-12-24 19:48:39 +01:00
jackpoz f6131af02b Merge pull request #15912 from Treeston/3.3.5-urandms
Core/Util: Add urandms(minMS, maxMS) helper
(cherry picked from commit c1b4cd21f3debc2eb5e462c5adce659b558c7dc9)
2015-12-12 03:26:31 +01:00
Zedron 32a82dc956 Core/MMaps: Fixed mmap loading
Bug introduced in 1d2aafd
2015-11-24 15:31:49 -06:00
Vincent-Michael b5329d8a03 Core: Revert fail 2015-11-15 16:49:17 +01:00
Vincent-Michael 5d584116fe Core: Added missing overrides 2015-11-15 16:48:12 +01:00
Shauren d31706b07e Core/DBLayer: Improve error message from 0a27f8bce2 2015-11-13 22:43:36 +01:00
Shauren 9fa938f3e0 Core/Conditions: Optimizations part 1 - use containers more suited for their role 2015-10-25 12:00:05 +01:00
Shauren 5e0cee85dd Core/Conditions: Type renaming 2015-10-25 10:59:58 +01:00
Shauren 82db416b5d Warning fixes 2015-10-17 16:35:37 +02:00
Naios 13654bac2c Core/Tools: Fix brutal linking in mmaps extractor.
* caused warnings with shared linking
* ref #15671
2015-10-17 13:14:20 +02:00
Shauren 4c866a0af0 Core/Crash reporting: Fixed windows version detection for 8.1 and newer 2015-10-16 00:50:49 +02:00
jackpoz 7005089241 Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1316687, 1316688

(cherry picked from commit 51a2a3fa93702f289cda1e64323f55aba02f1026)
2015-09-24 22:36:37 +02:00