aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared
AgeCommit message (Collapse)Author
2015-07-06Core/PacketIO: Removed timezone adjustments from ReadPackedTime - player's ↵Shauren
session timezone offset should be used there, not server offset (cherry picked from commit aa3b05c312626d903228aa7a768a069bce5fe526)
2015-06-30Core/Updater: Fix mysql cli password prompt when password is empty.Naios
* ref: http://community.trinitycore.org/topic/11510-world-server-bug-enter-password-to-update/
2015-06-30Core/Utilities: Fix callback invokation when there are no tasks present.Naios
* thx @joschiwald for noticing.
2015-06-29Merge pull request #14941 from ShinDarth/db_backports3Carbenium
DB/World schema backport: move questItem* fields to *_questitem tables
2015-06-29DB/World schema backport: move questItem* fields to *_questitem tablesShinDarth
2015-06-26Scripts/RubySanctum: Updates to Halion.Warpten
* Fixed Living Embers not spawning. * Meteor Strike is now randomized. (cherry picked from 1447875cac0fefd58ae3ad27e6b3fa2134a714c0) Scripts/RubySanctum: Fix a mathematical mistake. SQL: Do not use MAX(Id), hardcode it. (cherry picked from 7a5bc9e1fe457f0c77cdfecefa5bd42525105c3e) Scripts/RubySanctum: Correctly spawn Living Embers. (cherry picked from 7c4b8b0e826fd1cdab8a635225123aebd1b950c6) Scripts/RubySanctum: Remove duplicate code. (cherry picked from 1d29328769d505caf4541b0d712972195dda8b70) Core/Misc: Warning fixes (cherry picked from dc53dad8a44292bcb555db9fdc07eb255a838cac)
2015-06-26DB/Characters: Backport schema changes from 6.x branch (renames)ShinDarth
Closes #14951
2015-06-21Core/Utilities: TaskScheduler: add a task validator and on update success ↵Naios
callback. * makes it possible to block tasks if there is an active spellcast. * requested by @joschiwald
2015-06-21Core/Updater: Fix a wrong formatter introduced in 0d095109eec31Naios
* thanks @Aokromes for noticing
2015-06-20Core/Updater: Add some info about the count of applied updates.Naios
* some minor improvements * add a log message when database updates are disabled.
2015-06-03Core/Shared: Hide the internal shared_ptr of the TaskContextNaios
* use . operator instead of -> to access the TaskContext now. * Add TaskContext::IsExpired to check whether the owner has expired.
2015-06-01Core/CrashHandler: Make crashhandler tread-safejackpoz
Handle only 1 exception in the whole process lifetime and create only 1 crash report.
2015-06-01Merge pull request #14782 from doctaweeks/fixes-for-6.xMitchesD
Minor fixes for 6.x (cherry picked from commit 0cf02097414ddf7a370bd2efef5b892616e8de93) Conflicts: src/server/bnetserver/Main.cpp src/server/game/Battlegrounds/Zones/BattlegroundBFG.h src/server/game/Battlegrounds/Zones/BattlegroundTP.h src/server/game/Chat/Channels/Channel.h src/server/game/Entities/Player/Player.h src/server/game/Quests/QuestDef.h src/server/scripts/OutdoorPvP/OutdoorPvPNA.h src/server/shared/Cryptography/SHA256.h
2015-05-31Shared/Util: Introduce a task scheduler which schedules task with c++11 ↵Naios
techniques. * Use std::function as callback (methods, lamdas & std::bind). * Uses std::chrono::duration as duration type (Milliseconds, Seconds...) - With c++11 user defined literals we could just write "11s" for example (MSVS 2015, gcc & clang). * Provides a lot of overloads for easier usage: - Static durations or random durations between min and max. - Named (with group ids - group id 0 is possible) or anonymous tasks. - Asynchronous tasks. * Is adapted to the current needs of scripting: - Repeat tasks through the TaskContext - Schedule new tasks from the context. - Provides access to the times repeat counter of a task, this will help to schedule multi step events (dialogs for example). See https://gist.github.com/Naios/6d143538abdc3d32fd2b for usage examples.
2015-05-28Core/Updater: Fix issues when connecting through unix sockets.glkrlos
* closes #14766 * closes #14759 Signed-off-by: Naios <naios-dev@live.de>
2015-05-23Core/CrashHandler: Log STACK_OVERFLOW crashesjackpoz
Try to log STACK_OVERFLOW crashes by allocating log buffer on the heap which should still be in a valid state with a stack overflow exception. This will probably still not produce a complete crash report with details about all stackframes.
2015-05-19Core/Misc: Removed gcc specific packing pragma syntax - only unsupported ↵Shauren
(now) versions required it (cherry picked from commit 4c7c2abf03b692e67a89d2ba0856aec1553c8ae1) Conflicts: src/server/bnetserver/Packets/BitStream.h src/server/shared/Common.h
2015-05-19Merge pull request #14454 from ariel-/cdDuarte Duarte
Port Core/Spells: Cooldown updates (6.x branch)
2015-05-19Core/Networking: Fixed possible msvc debug assertions in vectorShauren
(cherry picked from commit e4abbc09266d5878d0a03b04f3d72ea68549997f)
2015-04-29Core/Socket: Removed unused synchronous read methodShauren
(cherry picked from commit 59e9bcf0bf44d89397f5a182e2ef21f7e3a3635d) Conflicts: src/server/game/Server/WorldSocket.cpp
2015-04-24Core/Log: Fix newlines when using dynamic log namesNaios
* thanks @Aokromes for reporting * also removes an unnecessary std::move
2015-04-15Add missing newlineDaniel M. Weeks
(cherry picked from commit f48b86fd8ad734855744e766109a543208fce454)
2015-04-15Remove unnecessary semicolonsDaniel M. Weeks
(cherry picked from commit 27923b8d8fc10b46f86a2419cf27e9c9f1a96be8)
2015-04-15Fix documentationDaniel M. Weeks
(cherry picked from commit 62ff887236ad835f1353c415ae6baca6ac6b94b8)
2015-04-15Prevent collisions in GCC attribute definitionsDaniel M. Weeks
(cherry picked from commit 64848856002a796e30b822d70a31087495084bfa)
2015-04-13Port commit 56186319bdd41dd26b6cc14f84e6e41eef5d953b (6.x branch)ariel-
Core/Spells: Cooldown updates Updates #14418
2015-04-10Core: Whitespace/tab2spaces cleanupclick
2015-04-05Core/Misc: Warning fixesShauren
(cherry picked from commit cc4d79495f98006f77c68792b946a412f5e86714) Partial cherry-picked. Signed-off-by: Naios <naios-dev@live.de>
2015-04-05Rename variables to fix C++11 keyword collisionCarbenium
(cherry picked from commit 573cda7b524ee4d7d23cefd026b056181f451a8b)
2015-04-05Core/DBUpdater: Exit clean if a query failed to apply.Naios
* Fix some \W4 warnings about constructors.
2015-04-05Core/Log: Remove some unnecessary std::move's.Naios
* This are r-value references already. * Thanks @Shauren for noticing
2015-04-04Core/Networking: Fixed unsafe access to _worldSession member in WorldSocketShauren
(cherry picked from commit bed88e0dd475af5b73cea03821f7fb7cb9ddce9d) Core/Networking: Fixed deadlock in HandlePing if the client is about to be kicked for overspeed pings (cherry picked from commit 3da0f7e40920b652d2222fa88dbb4b516d24725d) Core/Networking: Cleanup CloseSocket calls from read failures in WorldSocket (cherry picked from commit 18343a7309fbf53a3509749c0a5ca1f8ea273c57) Conflicts: src/server/game/Server/WorldSocket.cpp Ref #14474
2015-04-02Core/Database: Remove va_list from PreparedStatement::PAppend.Naios
2015-04-02Core/Database: Remove va_args from DatabaseWorker::Execute methods.Naios
* Also delegate SQLQueryHolder::SetPQuery into SetQuery.
2015-03-30Core/Misc: Remove unused headersleak
2015-03-29CMake: Use source_groups to represent the source treeNaios
* It let ide's (like vs) display the source tree. * Disabled by default. * Soft requirement is cmake >= 2.8.12 . * Offers 2 modes: flat & hierarchical. * For detailed description see #14471 * Thanks @click for help and advises. * Closes #14471
2015-03-29Core/Database: Return an unknown error code instead of false (0) if ↵Naios
mysql_init failed. * Thanks @et65 for noticing. * ref #14139 (cherry picked from commit 83bbe00785a7ee7c8141d83bfe94a1415466c64d)
2015-03-29Core/Database: Fix a mistake in 54ee5267244acac16Naios
* Also use proper errno instead of 0 when reconnecting. * Thanks @et65 for reporting * ref #14139 (cherry picked from commit 47410157b1d1e51062732696ad5f457a69019ef4)
2015-03-28Core/Log: Improve creation of log prefixes.Naios
* this also fixes non whitespace seperated timestamps in logs after 95ebe4f31cba6b4772cfd19 @Aokromes * remove an unnecessary stringstream in Log::outCommand * delete copy constructor of LogMessage to prevent unwanted copies (cherry picked from commit a2e280c8a8478bbe0652c1850b1a435abba79f93)
2015-03-28Core/Database Improve commit 39bdd06446dcNaios
* found a better way where no cast is needed. * ref #14430 (cherry picked from commit 54ee5267244acac16e4b56342e64c0235ee0599b)
2015-03-27Core/Database: Prepare statements at reconnect.Naios
* Closes #14430 (cherry picked from commit 39bdd06446dc8ae6f19e017e4390bd2aa7834d03)
2015-03-24Core/DBUpdater: Use correct formatter for size_tNaios
* thanks @DDuarte pointing this out. (cherry picked from commit b2b8de5786364d81fbce643e8f00bcc0129ed760)
2015-03-24Core/DBUpdater: Add the possibility to limit the remove of orphaned entries.Naios
* This will save you from loosing your update history if you use a repository in bad state (revision or branch) by mistake. * Also turned 1 error message into a warning (cherry picked from commit 966282fbed24a0d0cf8cb3e05b1849c3e6a0d1d6) (cherry picked from commit 3ad7776d5061308d3e2b4ff9e3cbf67d48bffdd6)
2015-03-22Core/DBUpdater: Use correct uint64 to store timestamps.Naios
* Thanks @Shauren for pointing out. * Also removes an invalid argument thanks @jackpoz for noticing. (cherry picked from commit 8e48ef7863c5018aa185913ce6a616e46ef5b17e)
2015-03-22Core/DBUpdater: Fixed compile errors with boost 1.55 and VS 2013Shauren
(cherry picked from commit 495af75b7e21a2a84231b0540a6f2b9ed349ea58)
2015-03-22Core/Database: Fix some warnings on gccNaios
* warning: when initialized here [-Wreorder] * thanks to @Vincent-Michael (cherry picked from commit cff3910ec82b9f5ebc462a756ce39cc062120cfa)
2015-03-21Core/Updates: Add an automatic database update system. Automatically detects ↵Naios
new and edited sql updates through file lists and hashing. Detects renames, deletes and is able to create and auto import full databases. * cleanups in main.cpp of world & bnetserver * refactoring in DatabaseWorkerPool.h & MySQLConnection.cpp Make sure you re-run cmake, because boost::iostreams was added as dependency. Maybe you need to install libboost-iostreams1.55-dev on unix as well. Import every update manual until (included) those INSERT IGNORE updates for each database. Thanks DDuarte and Shauren for your amazing ideas, help and advises. In hope that nobody gets a "Your database structure is not up to date..." anymore ,-) (cherry picked from commit 352012e53173372ebc82898e1b6854c983b01b25) (cherry picked from commit 1f7f9feafc3f5017d617634ae993d2cdf4430920) For 3.3.5: * Synchronized ConfigureBoost.cmake with 6.x, libboost-filesystem1.55-dev also added as dependency! Signed-off-by: Naios <naios-dev@live.de> Signed-off-by: Nayd <dnpd.dd@gmail.com>
2015-03-18Core/Log: Readd include of <stdarg.h> to fix compile issues under gccNaios
(cherry picked from commit d64e6ffade392be32f634b32658a6e0353f369c1)
2015-03-18Merge pull request #14317 from Naios/typesafelogCarbenium
Type safe logging (cherry picked from commit cc0c9add5a3f3a17e19029ddcaa7e711040f4fc5) Conflicts: src/server/bnetserver/CMakeLists.txt src/server/game/Server/WorldSocketMgr.cpp src/server/shared/Logging/AppenderDB.cpp src/server/worldserver/CMakeLists.txt
2015-03-18Core/Log: Fix some issues detected by static analysis.Naios
* Either inefficient or wrong usage of string::find(). string::compare() will be faster if string::find's result is compared with 0, because it will not scan the whole string. If your intention is to check that there are no findings in the string, you should compare with std::string::npos. * C-style pointer casting detected. C++ offers four different kinds of casts as replacements: static_cast, const_cast, dynamic_cast and reinterpret_cast. (cherry picked from commit 8882a6ca78e90d2980a3cd8d53acea9d2137f8b8)