35 Commits

Author SHA1 Message Date
Shauren
157a16d790 Tools/vmap_extractor: Preserve destructible models to use them in mmaps_generator 2025-11-01 14:26:48 +01:00
Shauren
03e2aa6737 Core/Vmaps: Rename VMapManager2 to VMapManager 2025-10-25 00:55:34 +02:00
Shauren
96b567995a Core/Vmaps: Remove VMapManager2 virtual interface 2025-10-25 00:52:55 +02:00
Shauren
b13b5142f1 Core/Utilities: Extend make_unique_ptr_with_deleter functionality to allow it to create deleters with compile time constant functions (reduces its size to just sizeof(void*)) 2024-10-01 21:03:44 +02:00
Shauren
d05dbaaecb Core/Vmaps: Fixed use after free and deadlocks when loading a model file fails 2024-07-06 22:52:11 +02:00
Shauren
518fe1fd1e Tools/vmap_assembler: Organize vmap files into directory-per-map 2024-07-06 14:29:54 +02:00
Shauren
35a2d49971 Core/Vmaps: Optimize loading vmaps
* Changed spawn id to BIH tree index mapping from generated on load to baked in tile files
* Remove map holding model load counts and moved that to ModelInstance instead
2024-07-05 21:20:25 +02:00
Shauren
5dbb6b043f Core/Vmaps: Minor cleanup in MapTree - use unique_ptr to manage file handles 2024-07-05 17:48:08 +02:00
Shauren
ff4fc1ad4e Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings 2024-07-04 22:56:00 +02:00
Shauren
45ee989c70 Core/vmaps: Removed vmap lookup functions duplicating functionality of each other 2024-03-07 00:23:52 +01:00
Shauren
a70e758ba5 Tools/vmap_extractor: Move information about model type from spawns in vmap tiles to model file itself 2024-03-06 00:04:19 +01:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Ujp8LfXBJ6wCPR
43aa763d04 Part1: Modernize codebase with Clang-Tidy range based loops (#24164)
(cherry picked from commit fb75a958f0)
2021-12-22 15:48:01 +01:00
Shauren
622cec8a8f Core/Vmaps: Fixed crash in unloading vmaps
Closes #26536
2021-05-21 12:31:21 +02:00
Shauren
bb8f22ed20 Core/Vmaps: Reduce memory used by vmaps (and their size, slightly) 2021-04-25 00:11:36 +02:00
Shauren
7a406db506 Core/Collision: Fixed false positive errors in console about vmap loading 2020-12-08 18:16:47 +01:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren
eba31dea27 Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-05-24 22:34:25 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
25594c5a8e Core/Misc: Fix static analysis issues
Fix static analysis issues reported by Coverity
2019-02-16 17:37:16 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
217a9bb34d Core/Vmaps: Changed error message when loading outdated vmaps
Closes #18431
Closes #18857

(cherry-picked from c90882ed6e)
2018-12-09 14:18:42 +01:00
HelloKitty
46c69df3a7 Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528

(cherry-picked from 01d715eaef)
2018-12-09 14:18:42 +01:00
Shauren
45b2492aa0 Nopch/warning fixes 2018-04-27 20:29:01 +02:00
Shauren
24d30dab84 Core/VMAPS: Fixed vmaps in single WMO instances like ragefire chasm
* Fixed some models not always being spawned because they only appear in one tile file but are large enough to cross tile boundaries (lava in Firelands at Ragnaros place)

Closes #21879
2018-04-27 20:23:52 +02:00
Shauren
b095c4cd30 Core/Misc: Removed obsolete NO_CORE_FUNCS 2018-04-02 20:05:08 +02:00
Shauren
8f53ba3854 Core/Phasing: Rewrite GetTerrainMapId 2018-03-25 19:28:36 +03:00
Shauren
4798d9ce7a Core/VMaps: Implement loading phased tiles
Closes #15163
2018-03-25 19:28:36 +03:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01: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
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01: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
StormBytePP
1d2aafd39b Core/Build: Merge common library and move database out of shared 2015-08-21 17:52:42 +02:00