aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2016-09-13Common/Utilities: More std::chrono overloads for EventMap. Specifying 2 ↵treeston
std::chrono types now gives you a random (to milliseconds) time in that interval (inclusive) for (Re)ScheduleEvent.
2016-08-29Core/Define: Remove the conditional macro for constexpr.Naios
* Not needed anymore since the requirements were raised to MSVC 2015.
2016-08-29Core/Common: Correct the linking of localeNamesNaios
2016-08-17Tools/MMapGenerator: Avoid saving uninitialized padding bytes to diskjackpoz
Initialize padding bytes in MmapTileHeader struct to avoid saving uninitialized data to disk, causing issues when binary-comparing *.mmtile files.
2016-08-08Common/Common: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-08Core/Common: Converted the common library to a shared library.Naios
* There is still the possibility to static link against common. (cherry picked from commit 501fd9b50232ca3ae3623877c3e521c9c1f894be) # Conflicts: # src/common/Collision/Management/MMapManager.h # src/common/Collision/VMapTools.h # src/common/Common.cpp # src/common/Common.h # src/common/Cryptography/Authentication/PacketCrypt.h # src/common/Cryptography/Authentication/WorldPacketCrypt.h # src/common/Cryptography/HmacHash.cpp # src/common/Cryptography/HmacHash.h # src/common/Cryptography/SHA256.h # src/common/GitRevision.h # src/common/Utilities/Random.h # src/common/Utilities/Util.h
2016-08-06Common/Utilities: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-06Core/Utils: Added additional argument to Tokenizer class to make it behave ↵Shauren
like strtok - not returning empty tokens in case of multiple consecutive separators in input string (cherry picked from commit dd1533b315bda37e1d43ebe0fb8bde87381c6e66)
2016-08-04Common/Threading: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-04Common/Logging: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-04Common/Debugging: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-03Common/Crypto: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-03Common/Maps: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-03Common/Maps: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-08-03Common/MMaps: Reduce differences between 3.3.5 and 6.x branchesjackpoz
Code functionality shouldn't have been modified.
2016-07-16Core/Misc: remove unused function prototypeariel-
2016-07-03Core/EventProcessor: Check whether an event was aborted before aborting it.Naios
* Fixes an assertion introduced in commit 1ad73212dca0cf. * Use itr = std::unordered_map<...>::erase for updating the iterator.
2016-07-03Core/Crash reporting: Better handle max nesting level settingjackpoz
Fix wheaty exception report counting reference symbols as 2 nesting levels, not logging child objects in some cases, i.e. spell id in SpellEvent crash.
2016-07-03Core/EventProcessor: Wait for non deletable events to get deletable.Naios
* Immediate deletion caused issues with the SpellEvent, so we delete it at one of the next update ticks now. * Only affects the unforced cancellation of events. * Ref #16675
2016-06-23Core/Common: Add the linkage type to the version stringNaios
* Add platform strings for intel and apple * Remove usage of underscore uppercase identifiers because those are reserved for the compiler. * Requested by Aokromes (cherry picked from commit afa0bac669ac787e6bd35273c967a58b3e4e2196)
2016-06-04Core/VMaps: Fix some vmap height edge casesjackpoz
Fix Map::GetWaterOrGroundLevel() checking dynamic object only in phase 1 instead of current Unit phase. Improve DynamicMapTree::getHeight() dynamic object check by casting the ray at +0.5f from the passed Z coordinate, this value will be tuned to improve even more the results.
2016-06-04Implement real time statistic visualization (#16956)Duarte Duarte
Docs at https://trinitycore.atlassian.net/wiki/display/tc/Monitoring+a+TrinityCore+server * Common/Graphs: Initial proof of concept * Move influx db code to its own class * Reuse the same socket * Allow to log values of different categories * Allow to log events * Pass the timestamp to influxdb * Send events in batches * Send data async * Log server shutdown. Fix memory leak. * Allow to enable/disable Stats in the settings and at runtime * Read interval between each batch send from config * Add InfluxDB connection info to configs * Move each event category to its own table * Log pathfinding queries * Move categories table initialization to constructor using enum as key to avoid assigning the table name to the wrong enum value * Log player login/logout events. Pass the hostname correctly in the HTTP request. * Fix linux build * Handle "Connection: close" HTTP header, reconnecting on next scheduled send. Disable StatsLogger if connection fails, logging the error. * Add an enum for categories of logged values, it's still possible to pass a string instead of the enum. * Don't log the whole batchedData when InfluxDB returns an error, it's too long and unreadable on console. * Allow to call a function at a specified interval in thread-safe World::Update() context to log data like player count. * Log map tile load/unload * Core/StatsLogger: Allow logging more value types other than ints https://docs.influxdata.com/influxdb/v0.10/write_protocols/write_syntax/ * Fix a typo in string escape of StatsLogger * Yet more fixes to the escaping in FormatInfluxDBValue * DB/Gameobject: Fix respawn time of few Quest GameObjects By Tauriella, closes #16701 * DB/Misc: Fix some engrish By tkrokli closes #16648 * Tools/MMaps: Add format library linking to mmaps_generator (Very) partial cherry pick of ed75b0649add23e082976fa4e5d504bc0c312602 * Core/StatsLogger: Simplify code Convert values and categories arrays to maps initialized in-place Remove constructor and destructor * Core/StatsLogger: Add realm name to the event and value tags * Log amount of processed packet of each session * Apply recent singleton changes to sStatsLogger too * Fix influxdb data format if no realm name is present * Remove unneeded newlines from request body, fixes response 400 from InfluxDB 0.10 * Rename Reporting folder to Metric * Rename StatsLogger to Metric * Rename InfluxDB configs to Metric * Add Grafana dashboards * Add a random annoying macro * Move string formatting to Metric::SendBatch(), reducing performance footprint of Metric::LogEvent() and Metric::LogValue() * Update grafana graphs refresing tags on load and showing now-15m data, refreshing every minute. These settings can be modified in grafana. * Rename MetricData fields * Contrib/Grafana: Rename dashboard files * Contrib/Grafana: Replace hardcoded Windows/Ubuntu realm names by the default, Trinity * Config/Worldserver: Add missing section to the index * Contrib/Grafana: Add singlestat panels with current online players, update diff averages (1 min, 5 mins and 15 mins) http://i.imgur.com/Zi8lfvS.png * Core/Metric: Replace the enums MetricEventCategory and MetricValueCategory by strings For the sake of simplicity and less recompile time when adding new metrics, similar to how TC_LOG_* works * Contrib/Grafana: Display the current number of online players and not its average Closes #15075
2016-05-24Core/Containers: Warning fixes and RandomResizeList with predicate optimizationShauren
2016-05-10Core/Game: Remove some unnecessary export macrosNaios
2016-05-10Core/Common: Move the query callback header to the database projectNaios
* Also renames the header to it's correct name QueryCallback
2016-04-30Core/Utilities: Inherit env vars when starting external processesNaios
2016-04-26Core/Misc: Use steady_clock instead of system_clock for calculating ms ↵Shauren
timers. This makes update diffs immune to systemwide time changes (cherry picked from commit 406ac4f4b492e8733d0c1e6142838b3fff8c80a3)
2016-04-24Core/Utils: replaced std::random_shuffle with our own implementation using ↵joschiwald
SFMT random generator
2016-04-23Core/Common: Fix a std::string -> char* -> std::string conversionNaios
* Thanks jackpoz for noticing
2016-04-18Core/Scripting: Use the path of the worldserver executable to search for the ↵Naios
scripts dir * Fixes issues when starting the worldserver not in the bin directory or the CMAKE_INSTALL_PREFIX directory using the -c option.
2016-04-17Core/Cryptography: Move the SHA1 calculate helper to the SHA1 headerNaios
2016-04-11Core/Common: Capsule boost process into helper functionsNaios
* 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. (cherry picked from commit 3497b4960ba944388d148e10084e62eee909e986)
2016-04-11Core/Misc: Replace tc's optional with boost::optional. (very partial ↵Naios
cherry-pick) * benefits from empty optimization (objects are only constructed if needed). * supports r-value references (move semantics) (boost >= 1.56.0). * preparation for c++14/17's std::optional and std::none_t. * add move constructor to CompactArray. (cherry picked from commit 800d5d893964a82265577d3352d683035b589f78)
2016-04-09Core/Misc: MSVC /W4 warning fixesShauren
(cherry picked from commit 08c27d3205a6dc825512757ab88acf0e4379fe75)
2016-04-09Core/Misc: MSVC warning fixesShauren
(cherry picked from commit 70412e7e254a36398f101b4bfe1926c619063202)
2016-04-09Buildsystem: Initial changes to support building with vs clang toolsetShauren
(cherry picked from commit 4a3a178d7fe9d2d7e8fde2fe915cf5cec5223502)
2016-04-09Core/Common: Moved MessageBuffer to commonShauren
(cherry picked from commit a81a204678f4cbd8b8a53333600f50f0b494706a)
2016-03-31Core/Config: Fix 3 more missing config warningsDDuarte
Closes #16861 Thanks tkrokli (cherry picked from commit 0afcefea2724081968b07119ebd54943fdc44b60)
2016-03-31Core/Config: Error logging for ptree_bad_dataDDuarte
Ref https://github.com/TrinityCore/TrinityCore/commit/6487e2f2d6a1ddbeff77362219658376b8a3f9f0#commitcomment-16888976 (cherry picked from commit 9431b94bff939457cb915da3728cda6067674558)
2016-03-27Core/Startup: Warn when a config key isn't found in the config filesDDuarte
Example: "Missing name Guild.SaveInterval in config file worldserver.conf, add "Guild.SaveInterval = 15" to this file" (cherry picked from commit 06b3bca0d2bf6f049128da110681a5244d90225a) # Conflicts: # src/common/Configuration/Config.cpp
2016-03-24Core/Common: Converted the common library to a shared library.Naios
* There is still the possibility to static link against common. (cherry picked from commit 501fd9b50232ca3ae3623877c3e521c9c1f894be)
2016-03-24Core/Build: Add the possibility to link libraries dynamically.Naios
* makes it possible to access exported singletons from other shared lib's. * reduces binary size (cherry picked from commit f4e0945b13a70225684e7421d9542efae6a47c89)
2016-03-21Core/Util: Extracted GetPID to separate functionShauren
(cherry picked from commit e3af42e05cdf9e4c959d4e038349008da4faca27)
2016-03-18CMake: Use inherited dependencies in common and toolsNaios
2016-03-16Dep/CppFormat: Update cppformat to cppformat/cppformat@5174b8cNaios
2016-03-12Core/Misc: fix buildMitchesD
(cherry picked from commit ce5def332fa12ea4b2f3223fbaa4e41750da9cfb)
2016-03-12Core/Debugging: Make abort() less bad on windows by forcing crash log generationShauren
(cherry picked from commit dea7d429abe5143672154784f93e4b19020062d5) # Conflicts: # src/server/bnetserver/Main.cpp
2016-03-12Core/Logging: Force synchronous logging after io_service shutdown - fixes ↵Shauren
logging on worldserver shutdown (cherry picked from commit a0b2be6c1d0ae17ad8a17692d77f2020bbb9296e)
2016-03-12Core/PacketIO: Requeue packets handled with STATUS_LOGGEDIN received before ↵Shauren
player is fully loaded in one step after packet processing loop - reduces used locks from 3 per packet to 1 per packet (cherry picked from commit 8086a39210659c44d52fb463f5a39f047aa45685)
2016-03-12Core: Revert failVincent-Michael
(cherry picked from commit b5329d8a0394888fdf955afe0ac726ad63534220)