Commit Graph

102 Commits

Author SHA1 Message Date
ariel-
c69a7d1223 Core/Auras: reworked multiplicative AuraEffects calculation
- Splitted containers for flat modifiers and pct modifiers, as they now have different handling
- Amount is now multiplied only on apply; on unapply, iterate through auras and reset the counter
- Fixes many cases of rounding error due to applying/unapplying of small factors
- Allows amounts to be zeroed (ie with an AuraEffect of amount -100)
- Do a partial revert of 6dc37a9add, auras should update amounts only for items allowed (ie no more giving crit to a sword while having an axe in the other hand and being Poleaxe spec'd)
- SPELL_AURA_MOD_SCALE now scales additively, rather than multiplicatively (checked in sniffs)

Closes #18687
2017-02-27 14:24:20 -03:00
jackpoz
b375bab225 Core/Misc: Fix static analysis issues 2017-02-25 13:33:51 +01:00
jackpoz
865a3a47ea Core/Misc: Fix static analysis issues 2017-02-11 21:01:11 +01:00
Shauren
bf2121680f Core/Misc: Added regex compatibility layer to fall back to boost::regex for really old compiler
(cherry picked from commit b6f1f8405f)
2017-02-06 21:12:27 -03:00
xinef1
c6060dd0c5 Core/Spells: Remade trajectory target selection (#19048)
* Remade trajectory target selection
* Added possibility to apply conditions to trajectory spells
* Properly recalculate delay time if CMSG_UPDATE_PROJECTILE_POSITION is received
2017-02-05 21:10:15 -03:00
ariel-
077b5aec9e Core/Util: avoid one useless copy when adding stuff into a HookList 2017-01-23 17:00:35 -03:00
Shauren
c90882ed6e Core/Vmaps: Changed error message when loading outdated vmaps
Closes #18431
Closes #18857
2017-01-22 12:06:02 +01:00
Shauren
742c5f1e0b Fix static analysis issues
CID 1291964
CID 1292775

(cherry picked from commit 6767bbc95f)

Conflicts:
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Spells/SpellHistory.h
	src/server/game/Spells/SpellInfo.cpp
2017-01-21 21:10:46 -03:00
ariel-
65b6202bd8 Core/Collision: fix no-PCH build 2017-01-21 14:44:06 -03:00
HelloKitty
01d715eaef Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528
2017-01-21 14:44:31 +01:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
DDuarte
7ee6afe885 Dep: Update fmt (cppformat) to 3.0.1 7fa8f8fa48
Also renamed cppformat to fmt
2016-12-29 22:38:46 +00:00
zori
0df0cb30ca Correct Nav type for WMO objects (#18364)
* Tools/MMaps: Correct liquid type for WMO objects

* MMaps: Update version to 6
2016-12-03 17:48:55 +01:00
ariel-
ec9a8345a4 Core/Maps: bumping Vmap version after 2402f47642
Re-extracting vmaps is required
2016-12-02 20:13:59 -03:00
Aokromes
2402f47642 Fix typo in VMap BIH generation (#18297)
Fix typo in VMap BIH generation
By zorix
2016-11-28 01:19:16 +01:00
Shauren
6dc37a9add Core/Auras: Rewritten conditionally applying SPELL_AURA_MOD_WEAPON_CRIT_PERCENT, SPELL_AURA_MOD_DAMAGE_DONE and SPELL_AURA_MOD_DAMAGE_PERCENT_DONE auras
* Now the entire aura is removed when changing equipment
* All aura types can now depend on equipped items

(cherry picked from commit b9f7b500a3)
2016-11-20 01:46:47 -03:00
ariel-
20cdf1a830 Core/Utils: build fix 2016-11-14 02:36:33 -03:00
ariel-
cbb5c073ce Core/ScriptMgr: use vector instead of list to contain Spell and Aura scripts and hooks 2016-11-14 02:05:51 -03:00
jackpoz
189edc0f23 Shared/Metric: Initial support for tag value escaping
Fix #18175
2016-10-31 20:34:22 +01:00
treeston
2174c5d7dd Common/Utilities: More std::chrono overloads for EventMap. Specifying 2 std::chrono types now gives you a random (to milliseconds) time in that interval (inclusive) for (Re)ScheduleEvent. 2016-09-13 20:02:09 +02:00
Naios
da3c03a48b Core/Define: Remove the conditional macro for constexpr.
* Not needed anymore since the requirements were raised to MSVC 2015.
2016-08-29 22:03:48 +02:00
Naios
13e5817417 Core/Common: Correct the linking of localeNames 2016-08-29 22:03:48 +02:00
jackpoz
2585c62e6f Tools/MMapGenerator: Avoid saving uninitialized padding bytes to disk
Initialize padding bytes in MmapTileHeader struct to avoid saving uninitialized data to disk, causing issues when binary-comparing *.mmtile files.
2016-08-17 15:07:02 +02:00
jackpoz
5588881be2 Common/Common: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-08 18:07:19 +02:00
Naios
68015599dc Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.

(cherry picked from commit 501fd9b502)

# 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-08 18:00:32 +02:00
jackpoz
4170a9357c Common/Utilities: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-06 16:28:46 +02:00
Shauren
caee7dcad5 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
(cherry picked from commit dd1533b315)
2016-08-06 14:29:11 +02:00
jackpoz
206f08adbb Common/Threading: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 23:44:55 +02:00
jackpoz
bcd5380e78 Common/Logging: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 21:53:43 +02:00
jackpoz
8538151ea6 Common/Debugging: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 17:04:31 +02:00
jackpoz
e4b2e0450f Common/Crypto: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 23:33:36 +02:00
jackpoz
25dc3dd7a2 Common/Maps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 22:35:44 +02:00
jackpoz
6ce252f80a Common/Maps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 18:29:57 +02:00
jackpoz
d77e76c584 Common/MMaps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 15:45:44 +02:00
ariel-
2efd40b804 Core/Misc: remove unused function prototype 2016-07-16 20:38:34 -03:00
Naios
d9755c637c 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.
2016-07-03 20:52:50 +02:00
jackpoz
284dd6b80d 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.
2016-07-03 13:16:06 +02:00
Naios
1ad73212dc 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
2016-07-03 00:22:23 +02:00
Naios
185921dc2b 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

(cherry picked from commit afa0bac669)
2016-06-23 22:24:52 +02:00
jackpoz
1347d7cf7a Core/VMaps: Fix some vmap height edge cases
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-04 15:01:39 +02:00
Duarte Duarte
3ae1016082 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
2016-06-04 11:23:29 +01:00
Shauren
0fbfa8ead0 Core/Containers: Warning fixes and RandomResizeList with predicate optimization 2016-05-24 18:51:31 +02:00
Naios
f50c4b71a1 Core/Game: Remove some unnecessary export macros 2016-05-10 19:22:22 +02:00
Naios
d4d199d765 Core/Common: Move the query callback header to the database project
* Also renames the header to it's correct name QueryCallback
2016-05-10 18:16:13 +02:00
Naios
5b15b714ab Core/Utilities: Inherit env vars when starting external processes 2016-04-30 01:06:00 +02:00
Shauren
5bbc58f32d Core/Misc: Use steady_clock instead of system_clock for calculating ms timers. This makes update diffs immune to systemwide time changes
(cherry picked from commit 406ac4f4b4)
2016-04-26 18:15:10 +02:00
joschiwald
9e371b766c Core/Utils: replaced std::random_shuffle with our own implementation using SFMT random generator 2016-04-24 01:15:56 +02:00
Naios
2698d1ff48 Core/Common: Fix a std::string -> char* -> std::string conversion
* Thanks jackpoz for noticing
2016-04-23 18:13:42 +02:00
Naios
86b0fcf67a 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.
2016-04-18 21:02:01 +02:00
Naios
3271f328de Core/Cryptography: Move the SHA1 calculate helper to the SHA1 header 2016-04-17 19:30:13 +02:00