Commit Graph

94 Commits

Author SHA1 Message Date
jackpoz
6d866102de Common/Utilities: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-06 16:27:10 +02:00
jackpoz
fe6d8016af Common/Logging: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 21:54:02 +02:00
jackpoz
bceb385773 Core/Crash reporting: Better handle max nesting level setting
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.

(cherry picked from commit 284dd6b80d)
2016-08-04 17:05:24 +02:00
jackpoz
37fedcc8f6 Common/Crypto: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 17:03:25 +02:00
jackpoz
ab40f20bad Common/Crypto: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 23:34:01 +02:00
jackpoz
02a9ae031e Common/Maps: Reduce differences between 3.3.5 and 6.x branches
Partially port 1347d7cf7a too
2016-08-03 18:51:42 +02:00
ariel-
02b98010cd Core/Misc: remove unused function prototype
(cherry picked from commit 2efd40b804)
2016-08-02 21:23:00 +02:00
Shauren
298333a55a Build fix for dynamic linking 2016-07-19 19:57:57 +02:00
Shauren
fe4d11c65a Tools: Extractor updates
* VMAP extractor does not work due to a bug in CascLib
2016-07-18 23:37:19 +02:00
Shauren
a9a13d10f7 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-17 17:37:06 +02:00
Shauren
201d09ec34 Build fix for dynamic linking 2016-07-17 17:32:03 +02:00
Shauren
a8c412a063 Tools: Added universal TrinityCore banner with git version info to all tools 2016-07-17 17:24:53 +02:00
Shauren
0d9136f764 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-10 00:37:33 +02:00
et65
f293994ef4 Core/MMaps: Fix crash introduced in commit 32e8b65 (#17447)
* Core/MMaps: Fix crash introduced in commit 32e8b6506f
* Also fix remaining memory leaks scenarios.
2016-07-07 15:04:52 +02:00
Shauren
70137b8f3a Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-06 00:05:13 +02:00
Naios
a2ac2b3cc7 Core/EventProcessor: Check whether an event was aborted before aborting it.
* Fixes an assertion introduced in commit 1ad73212dc.
* Use itr = std::unordered_map<...>::erase for updating the iterator.

(cherry picked from commit d9755c637c)
2016-07-05 00:19:53 +02:00
Naios
80fe552894 Core/EventProcessor: Wait for non deletable events to get deletable.
* 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

(cherry picked from commit 1ad73212dc)
2016-07-05 00:19:45 +02:00
Naios
afa0bac669 Core/Common: Add the linkage type to the version string
* Add platform strings for intel and apple
* Remove usage of underscore uppercase identifiers because
  those are reserved for the compiler.
* Requested by Aokromes
2016-06-15 19:58:21 +02:00
Shauren
d2733eb6f1 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-06-13 21:00:25 +02:00
Shauren
dd1533b315 Core/Utils: Added additional argument to Tokenizer class to make it behave like strtok - not returning empty tokens in case of multiple consecutive separators in input string 2016-06-04 16:40:57 +02:00
Shauren
40065aa658 Core/GameTables: Fixed loading gametables with trailing tabs 2016-06-04 16:36:23 +02:00
DDuarte
8b26aea95a Implement real time statistic visualization (#16956)
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 ed75b0649a

* 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
(cherry picked from commit 3ae1016082)

# Conflicts:
#	src/server/game/Server/WorldSession.cpp
#	src/server/game/World/World.cpp
#	src/server/worldserver/Main.cpp
2016-06-04 11:26:57 +01:00
Shauren
b82332487a Core/DataStores: Updated db2 to 7.0.3.21737 2016-05-27 23:14:36 +02:00
Shauren
a6205e4035 Core/Containers: Warning fixes and RandomResizeList with predicate optimization
(cherry picked from commit 0fbfa8ead0)
2016-05-24 18:52:34 +02:00
Shauren
70102f32fe Core/DataStores: Updated opcodes and db2 to 7.0.3.21414 2016-05-20 23:49:53 +02:00
Shauren
5c2c9a684f Core/DataStores: Updated dbc/db2 to 7.0.1.20810 2016-05-20 23:46:17 +02:00
Naios
a0dacd90cb Core/Game: Remove some unnecessary export macros
(cherry picked from commit f50c4b71a1)
2016-05-10 19:24:30 +02:00
Naios
be90932eda Core/Common: Move the query callback header to the database project
* Also renames the header to it's correct name QueryCallback

(cherry picked from commit d4d199d765)
2016-05-10 18:20:52 +02:00
Naios
8f05a47793 Core/Utilities: Inherit env vars when starting external processes
(cherry picked from commit 5b15b714ab)
2016-05-01 01:45:10 +02:00
Shauren
406ac4f4b4 Core/Misc: Use steady_clock instead of system_clock for calculating ms timers. This makes update diffs immune to systemwide time changes 2016-04-26 18:10:17 +02:00
joschiwald
803473fb64 Core/Utils: replaced std::random_shuffle with our own implementation using SFMT random generator
(cherry picked from commit 9e371b766c)
2016-04-24 20:19:42 +02:00
Naios
53f44fbffa Core/Common: Fix a std::string -> char* -> std::string conversion
* Thanks jackpoz for noticing

(cherry picked from commit 2698d1ff48)
2016-04-23 18:15:12 +02:00
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 86b0fcf67a)
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 3271f328de)
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 224b42c53a)
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 1038df8d5b)
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 6487e2f2d6 (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