Commit Graph
88 Commits
Author SHA1 Message Date
Naios 2cd46f6f05 Core/Utilities: Inherit env vars when starting external processes 2016-08-10 08:58:38 +02:00
Naios 176f3f1a87 Core/Common: Fix a std::string -> char* -> std::string conversion
* Thanks jackpoz for noticing
2016-08-10 08:58:09 +02:00
Naios 7a827fe435 Core/Cryptography: Move the SHA1 calculate helper to the SHA1 header 2016-08-10 08:56:37 +02:00
Naios a75d2b01fb 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-08-10 08:51:52 +02:00
Aokromes 231d680826 typo fix 2016-08-10 08:21:10 +02:00
Aokromes 384a5216fd Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.
2016-08-10 08:19:25 +02:00
Aokromes 4905073101 Buildsystem: Initial changes to support building with vs clang toolset 2016-08-10 04:43:29 +02:00
Shauren ea918e1b69 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 dd1533b315bda37e1d43ebe0fb8bde87381c6e66)
2016-08-07 21:28:29 +02:00
jackpoz 0f965a530e Common/Threading: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 23:48:39 +02:00
jackpoz 44165712ca Common/Logging: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 21:56:30 +02:00
jackpoz e8bc203651 Common/Debugging: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-04 20:57:38 +02:00
jackpoz 5dcb395e90 Common/Crypto: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 23:35:34 +02:00
jackpoz 3c66feafcc Common/Maps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 22:39:59 +02:00
jackpoz 8cd5cefaf6 Common/Maps: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 19:48:38 +02:00
Vincent-Michael aa61332af8 Core: Revert fail
(cherry picked from commit b5329d8a0394888fdf955afe0ac726ad63534220)
2016-07-22 18:51:10 +02:00
Vincent-Michael 0d7a6c6556 Core: Added missing overrides
(cherry picked from commit 5d584116feab33ac04135e46ba9b43738a02e106)
2016-07-22 18:50:26 +02:00
jackpoz 648b8859d5 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-20 18:30:50 +02:00
jackpoz d9f485273c 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-07-20 15:45:05 +02:00
Shauren f11a9a31c2 Core/Containers: Warning fixes and RandomResizeList with predicate optimization 2016-07-20 13:28:41 +02:00
Naios 74a588b462 Core/Misc: Replace tc's optional with boost::optional. (very partial 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-07-19 13:37:37 +02:00
Aokromes f5de65fd96 Core/Misc: MSVC /W4 warning fixes 2016-07-19 13:02:54 +02:00
Aokromes 9c1b965136 Core/Misc: MSVC warning fixes 2016-07-19 12:40:58 +02:00
ariel- 1a6f3472da Core/Misc: remove unused function prototype 2016-07-17 14:11:33 +02:00
Aokromes 9cf3bdf125 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-07-15 20:35:32 +02:00
Aokromes 5ecf2e318c Update MMapManager.cpp 2016-06-24 17:16:14 +00:00
Aokromes 1cc604cdee by et65 closes https://github.com/TrinityCore/TrinityCore/issues/16910 2016-06-23 10:24:55 +02:00
Aokromes 460a660d4f CMake: Use inherited dependencies in common and tools (partial pick, need help on this) 2016-05-23 06:24:26 +02:00
Naios 9ac55d9181 Dep/CppFormat: Update cppformat to cppformat/cppformat@5174b8c
Conflicts:
	src/server/worldserver/CMakeLists.txt
2016-05-16 22:37:02 +02:00
Shauren 2aa7dff892 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 406ac4f4b492e8733d0c1e6142838b3fff8c80a3)
2016-05-12 09:09:13 +02:00
joschiwald 42033fd904 Core/Utils: replaced std::random_shuffle with our own implementation using SFMT random generator 2016-05-12 09:07:29 +02:00
Shauren 4c3db96715 Core/Common: Moved MessageBuffer to common
(cherry picked from commit a81a204678f4cbd8b8a53333600f50f0b494706a)
2016-05-12 08:28:38 +02:00
DDuarte 477a4edfe2 Core/Config: Fix 3 more missing config warnings
Closes #16861

Thanks tkrokli

(cherry picked from commit 0afcefea2724081968b07119ebd54943fdc44b60)
2016-05-12 08:24:45 +02:00
DDuarte 06a91b090d Core/Config: Error logging for ptree_bad_data
Ref https://github.com/TrinityCore/TrinityCore/commit/6487e2f2d6a1ddbeff77362219658376b8a3f9f0#commitcomment-16888976

(cherry picked from commit 9431b94bff939457cb915da3728cda6067674558)
2016-05-12 08:24:32 +02:00
DDuarte 6cc4cc362d 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"
(cherry picked from commit 06b3bca0d2bf6f049128da110681a5244d90225a)

# Conflicts:
#	src/common/Configuration/Config.cpp
2016-05-12 08:22:15 +02:00
Shauren b68437da60 Core/Util: Extracted GetPID to separate function
(cherry picked from commit e3af42e05cdf9e4c959d4e038349008da4faca27)
2016-05-12 08:04:52 +02:00
MitchesD c5d2ece2fe Core/Misc: fix build
(cherry picked from commit ce5def332fa12ea4b2f3223fbaa4e41750da9cfb)
2016-05-05 03:40:27 +02:00
Shauren 702d19039e Core/Debugging: Make abort() less bad on windows by forcing crash log generation
(cherry picked from commit dea7d429abe5143672154784f93e4b19020062d5)

# Conflicts:
#	src/server/bnetserver/Main.cpp
2016-05-05 03:40:04 +02:00
Shauren fe64bdddb3 Core/Logging: Force synchronous logging after io_service shutdown - fixes logging on worldserver shutdown
(cherry picked from commit a0b2be6c1d0ae17ad8a17692d77f2020bbb9296e)
2016-05-05 03:35:07 +02:00
Shauren 9d4e537a62 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
(cherry picked from commit 8086a39210659c44d52fb463f5a39f047aa45685)
2016-05-05 03:34:42 +02:00
Aokromes 0ac5f4a440 Sync with 3.3.5a core 2016-05-03 12:40:27 +02:00
ariel- 65aec5f8f7 Merge remote-tracking branch 'tc/3.3.5' into 4.3.4
Note: additional hand-picked ports from 6.x to fix build

Conflicts:
	sql/updates/world/2016_02_22_00_world.sql
	sql/updates/world/2016_02_22_01_world.sql
	sql/updates/world/2016_02_22_02_world.sql
	sql/updates/world/2016_03_07_00_world.sql
	src/server/authserver/Realms/RealmList.cpp
	src/server/authserver/Realms/RealmList.h
	src/server/authserver/Server/AuthSession.cpp
	src/server/game/Accounts/AccountMgr.cpp
	src/server/game/AuctionHouse/AuctionHouseMgr.cpp
	src/server/game/Chat/Chat.cpp
	src/server/game/Conditions/ConditionMgr.cpp
	src/server/game/Conditions/ConditionMgr.h
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Scripting/ScriptLoader.cpp
	src/server/game/Scripting/ScriptLoader.h
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/World/World.cpp
	src/server/game/World/World.h
	src/server/scripts/CMakeLists.txt
	src/server/scripts/Commands/cs_gm.cpp
	src/server/scripts/Commands/cs_misc.cpp
	src/server/scripts/Commands/cs_rbac.cpp
	src/server/scripts/Commands/cs_ticket.cpp
	src/server/scripts/Commands/cs_wp.cpp
	src/server/scripts/EasternKingdoms/CMakeLists.txt
	src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/Kalimdor/CMakeLists.txt
	src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/OutdoorPvP/CMakeLists.txt
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_hunter.cpp
	src/server/shared/CMakeLists.txt
	src/server/worldserver/CMakeLists.txt
	src/server/worldserver/Main.cpp
	src/tools/mmaps_generator/CMakeLists.txt
2016-03-11 18:32:07 -03:00
treeston 224b42c53a Util/Random: Add randtime(Milliseconds const&, Milliseconds const&) to supersede urandms(uint32,uint32) for scripts being ported to std::chrono. 2016-03-01 23:09:25 +01:00
joschiwald ffdf75a233 Scripts/Spells: Glyph of Arcane Shot is affected by own debuffs on target only 2016-02-27 17:55:43 +01:00
joschiwald 9beeca79ac Core/Logging: fixed default logger (partial reverts 0904858624) 2016-02-27 17:47:35 +01:00
Naios b5369b7d87 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

(cherry picked from commit 719159e2074ac2d0902c70bdd3c7a39e0d311bbe)
2016-02-22 16:25:47 +01:00
ariel- 8bc477a2de Merge remote-tracking branch 'tc/3.3.5' into 4.3.4
Conflicts:
	sql/base/characters_database.sql
	sql/updates/world/2016_01_26_00_world.sql
	sql/updates/world/2016_01_31_00_world.sql
	sql/updates/world/2016_02_07_00_world.sql
	src/server/authserver/Server/AuthSession.cpp
	src/server/database/Database/Implementation/LoginDatabase.cpp
	src/server/database/Database/Implementation/LoginDatabase.h
	src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
	src/server/game/AI/ScriptedAI/ScriptedCreature.h
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Chat/Chat.cpp
	src/server/game/DataStores/DBCStores.cpp
	src/server/game/DataStores/DBCStructure.h
	src/server/game/DataStores/DBCfmt.h
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Server/WorldSocket.h
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/game/Spells/SpellMgr.cpp
	src/server/scripts/Spells/spell_druid.cpp
	src/server/scripts/Spells/spell_generic.cpp
	src/server/scripts/Spells/spell_hunter.cpp
	src/server/scripts/Spells/spell_rogue.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/shared/Networking/AsyncAcceptor.h
	src/tools/map_extractor/CMakeLists.txt
	src/tools/map_extractor/System.cpp
	src/tools/map_extractor/adt.h
	src/tools/mmaps_generator/MapBuilder.cpp
2016-02-21 07:02:53 -03:00
Shauren b2e03a7448 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

(cherry picked from commit 97a79af4701621ec04b88c8b548dbc35d120e99e)
2016-02-20 13:08:03 +01:00
Shauren 55ef8d80a3 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
(cherry picked from commit ae20b2ab561bc07d85f443ae914bc597c9d6ac6e)
(cherry picked from commit 921d893c2a82eb6ac0762bf7001df87911b44611)
(cherry picked from commit 9ab10d6e680ca835d1dfdfbceb9f18f330f994fc)
(cherry picked from commit 00c878e73a8c6b8ce3339d224ab5611df3bbd07c)
(cherry picked from commit ff9c999334d87acc3fcea9737753c30b7f1abe25)
(cherry picked from commit bc94bacce404401a480b6871eaa7bc38d766014c)
(cherry picked from commit d5b0ffbe9b0c07beb8d0dfc52a6532c2da805285)
2016-02-09 19:26:29 +01:00
Carbenium d427c853e7 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

(cherry picked from commit 32e8b6506fc064fdba134d692dfe99298e43f055)
2016-01-30 20:48:15 +01:00
Carbenium 0d80fee45a Core/Util: Add a missing include
(cherry picked from commit 1038df8d5b)
2016-01-22 22:29:59 +01:00