Commit Graph
38 Commits
Author SHA1 Message Date
Naios f48b6f286c Dep/CppFormat: Update cppformat to cppformat/cppformat@fd53bb6fb8
* fixes /W4 warning spamming.

(cherry picked from commit 66ce97c87e347ab9426ffbd60b6fe5aa90a96b9b)
2015-04-05 21:31:31 +02:00
Naios 9d6c837004 Core/DBUpdater: Remove some constructors accidently merged in 455eee9392 2015-04-05 01:02:19 +02:00
Naios 455eee9392 Core/DBUpdater: Exit clean if a query failed to apply.
* Fix some \W4 warnings about constructors.

(cherry picked from commit de490674ff1205d908301b94f5644247562b43cb)
2015-04-05 00:25:20 +02:00
Naios 2b6c086576 Core/Log: Remove some unnecessary std::move's.
* This are r-value references already.
* Thanks @Shauren for noticing

(cherry picked from commit 85d6ff9570869bce368e9bbcf881755c6c89cb55)
2015-04-05 00:25:14 +02:00
Naios 2acd2f1d97 Core/World: Remove va_list from World::RecordTimeDiff.
* also split it in ResetTimeDiffRecord() and RecordTimeDiff() to avoid passing of null values.

(cherry picked from commit c9b0c8a0ca6183f11d026fb8d6caaa7b476159ce)

Conflicts:
	src/server/game/World/World.cpp
2015-04-02 22:55:55 +02:00
Naios 3e5025b773 Core/Database: Remove va_list from PreparedStatement::PAppend.
(cherry picked from commit 1939367108b50eb1de2bb0a9cc017eea6423cf29)
2015-04-02 22:55:54 +02:00
Naios 6d0f0bf5fa Core/Database: Remove va_args from DatabaseWorker::Execute methods.
* Also delegate SQLQueryHolder::SetPQuery into SetQuery.

(cherry picked from commit df4723af25900b3638a2b5921cf67e1838cbaf64)

Conflicts:
	src/server/shared/Database/QueryHolder.h
2015-04-02 22:55:52 +02:00
Naios 3486f15352 Dep/CppFormat: Update cppformat to cppformat/cppformat@aab64b55a4
* fixes argument limit, argument count is unlimited now.

(cherry picked from commit 589296da9044be13f921724e8c2b1312bebde4c8)
2015-04-02 22:55:50 +02:00
Naios ed4722b6e6 CMake: Use source_groups to represent the source tree
* 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

(cherry picked from commit c386711972260aa7b877cdc8cb49d24576ce1902)

Conflicts:
	src/server/authserver/CMakeLists.txt
2015-03-29 16:13:22 +02:00
Naios 83bbe00785 Core/Database: Return an unknown error code instead of false (0) if mysql_init failed.
* Thanks @et65 for noticing.
* ref #14139
2015-03-29 15:03:32 +02:00
Naios 47410157b1 Core/Database: Fix a mistake in 54ee526724
* Also use proper errno instead of 0 when reconnecting.
* Thanks @et65 for reporting
* ref #14139
2015-03-29 14:25:10 +02:00
Naios a2e280c8a8 Core/Log: Improve creation of log prefixes.
* this also fixes non whitespace seperated timestamps in logs after 95ebe4f31c @Aokromes
* remove an unnecessary stringstream in Log::outCommand
* delete copy constructor of LogMessage to prevent unwanted copies
2015-03-28 17:12:24 +01:00
Naios 9b0b1185e4 Core/Log: Fix linker errors that occur on msvc 12 lower then update 4
* http://stackoverflow.com/questions/4891067/weird-undefined-symbols-of-static-constants-inside-a-struct-class
* http://www-01.ibm.com/support/knowledgecenter/SSGH3R_8.0.0/com.ibm.xlcpp8a.doc/language/ref/cplr038.htm%23cplr038
* closes #14463
* ref #14317
2015-03-28 17:12:11 +01:00
Naios 54ee526724 Core/Database Improve commit 39bdd06446
* found a better way where no cast is needed.
* ref #14430
2015-03-28 17:12:02 +01:00
Naios 39bdd06446 Core/Database: Prepare statements at reconnect.
* Closes #14430
2015-03-27 15:34:13 +01:00
Naios b2b8de5786 Core/DBUpdater: Use correct formatter for size_t
* thanks @DDuarte pointing this out.
2015-03-24 22:00:19 +01:00
Naios 3ad7776d50 Core/DBUpdater: Fix some warnings introduced in 966282fbed 2015-03-24 12:55:45 +01:00
Naios 966282fbed Core/DBUpdater: Add the possibility to limit the remove of orphaned entries.
* 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
2015-03-24 12:31:52 +01:00
Naios 8e48ef7863 Core/DBUpdater: Use correct uint64 to store timestamps.
* Thanks @Shauren for pointing out.
* Also removes an invalid argument thanks @jackpoz for noticing.
2015-03-22 01:28:50 +01:00
Naios cff3910ec8 Core/Database: Fix some warnings on gcc
* warning: when initialized here [-Wreorder]
* thanks to @Vincent-Michael
2015-03-21 21:07:20 +01:00
Naios 72bb8ffd96 Core/Worldserver: Set updates enabled default value to "none" -> disabled
* in addition to 1f7f9feafc
* if no config entry is presented this value is used
2015-03-21 21:06:03 +01:00
Naios 352012e531 Core/Updates: Add an automatic database update system. Automatically detects 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 ,-)

Signed-off-by: Naios <[email protected]>
Signed-off-by: Nayd <[email protected]>
2015-03-21 14:09:38 +00:00
Naios 433bc289c2 Core/Misc: Fix some issues detected by static analysis
* Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
  -> This argument is passed by value, it makes no sence so set it to null here.

* Member variable 'instance_violet_hold_InstanceMapScript::bWiped' is not initialized in the constructor.

* Mismatching allocation and deallocation: Data
2015-03-18 20:20:04 +01:00
Naios e40a5bf0b1 Dep/CppFormat: Update cppformat to cppformat/cppformat@bf8636c959
* fixes detecting support of <initializer_list>
* fixes build on solaris
2015-03-18 19:19:30 +01:00
Naios a610dea85c Core/RemoteAccess: Remove an unused define in RASession
* probably fixes gcc compile after adding cppformat
2015-03-18 16:32:19 +01:00
Naios d64e6ffade Core/Log: Readd include of <stdarg.h> to fix compile issues under gcc 2015-03-18 15:29:56 +01:00
Naios 95ebe4f31c Core/Log: Add type safe formatting
* improves safety and log speed through:
  - variadic templates
  - perfect forwarding
* fixes a newline in db logs
* improve performance of Appender::write by using std::ostringstream && std::move
2015-03-13 09:15:42 +01:00
Naios 1920e9c442 Scripts/Spells: Fix some issues detected by static analysis.
* Prefer prefix ++/-- operators for non-primitive types.
* Variable 'ownerBonus' is reassigned a value before the old one has been used.

* Fix a wrong type of ownerBonus, sometimes it is float sometimes uint32
2015-03-11 09:29:20 +01:00
Naios 9a61049f88 Core/Game: Fix some issues detected by static analysis.
* Possible inefficient checking for 'list' emptiness.

* Variable '_scheduledScripts' is assigned in constructor body.
  Consider performing initialization in initialization list.

* Variable 'Text' is assigned in constructor body.
  Consider performing initialization in initialization list.

* Possible inefficient checking for 'm_loadedScripts' emptiness.
2015-03-11 08:53:13 +01:00
Naios 8882a6ca78 Core/Log: Fix some issues detected by static analysis.
* 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.
2015-03-11 08:20:12 +01:00
Naios 7e68b39873 DB/GameTele: Add some Pandaria teleport positions. 2014-12-04 07:55:53 +01:00
Naios 7aac3bc152 DB/GameTele: Added some Draenor teleport positions.
Closes #13594
2014-11-20 14:05:11 +00:00
Naios 642ed8a5d2 Core/PhaseMgr: Fixed an updateleak that occured if the rewarded quest hadn't requirements
* Fixed the range for phase ids in the phase_definition table
* solves http://www.trinitycore.org/f/topic/8737-condition-quest-rewarded-dosnt-work-instantly/
2013-06-29 15:44:32 +02:00
Naios 6191642e59 Core/SmartScripts: Check Conditions also for timed Events
* some cleanup work in SmartScripts.cpp

Core/SmartScripts: Some Corrections to last commit
2013-01-17 20:25:29 +01:00
Naios 978611d7dd Core/DataStores: Upgraded achievement_dbc db storage to 4.3.4 2012-12-27 15:42:55 +01:00
Naios 33ce380c12 Core/DataStores: Upgraded spelldifficulty_dbc db storage to 4.3.4
* Update 2012_12_27_00_world_spelldifficulty_dbc_434.sql is required
2012-12-27 15:42:42 +01:00
Naios 38b5a6c7be Core/Spells: On Dismount use the amount to get the MountCapabilityEntry to remove related mount auras #8123 2012-10-22 20:12:46 +02:00
Naios 61dce1a02e Core/PhaseMgr: Implemented Phase Definitions, Terrainswap and multiphasing
* fixes cataclysm aura effect SPELL_AURA_PHASE without phasemasks defined in miscValueA
* implements CONDITION_SOURCE_TYPE_PHASE_DEFINITION

Thanks to:
 - Cyberbrest: For the hard research work about multiphasing.
 - Venugh: He helped me with a lot of strange compile Errors.
 - Shauren: For the 4.3.4 phaseshift packet.
 - Booksize: He showed me how terrainswap works

Signed-off-by: Naios <[email protected]>
2012-10-15 20:31:41 +02:00