Commit Graph

201 Commits

Author SHA1 Message Date
Rat
62739ed26f Core/AI: implemented basic class for GameObjectAI
--HG--
branch : trunk
2010-10-23 23:31:37 +02:00
click
ea847598d0 Buildsystem: Add initial support for Intel C++ Compiler (patch by Leak)
Note: Intel C++ Compiler for Windows is not supported in this change
Closes issue 4361

--HG--
branch : trunk
2010-10-21 22:00:12 +02:00
linencloth
d9d1ec3670 Core: optimize string splitting
- Mainly affects item loading performance
  - Reduces guild loading time a lot

--HG--
branch : trunk
2010-10-21 16:56:51 +02:00
Xanadu
1e101ed785 Core/Utils: Fixed some unsafe calls to utf8 translation functions.
--HG--
branch : trunk
2010-10-17 20:35:11 +02:00
azazel
c0faed2251 Core/Guilds: guild code was completely refactored and rewritten.
* OOP desing and implementation;
* all the queries are moved to prepared statements;
* guild loading is optimized;
* all the possible interaction with guild's data is done inside the guild class;
* added more hooks to GuildScript class;

WARNING: Make sure you backup your characters database before applying this change (just in case).

Known problems with guilds:
* when new member is added to the guild, MOTD is not displayed for him in guild tab of social window;
* if you add item with random property to guild bank visual representation of item below it becomes wrong (it displays wrong stack number);
* packets order differs from official: currently guild bank packet traffic is twice as more than on offy.

--HG--
branch : trunk
2010-10-17 19:54:13 +06:00
azazel
3bd1ee0665 Fix most of the recently introduced warnings
--HG--
branch : trunk
2010-10-16 13:32:30 +06:00
click
0509a780c8 Core/Entities: Ensure that pets retain their XP-points when dismissed in any form or way (outrunning/riding/mounting/flying)
Also clean up the logic a bit - pet stats initialization initializes hp/mana/powers on pets, while they should only be initialized/changed on pet call/creation.
Fixes issues 4284

--HG--
branch : trunk
2010-10-10 01:03:21 +02:00
click
613b81f36f REALLY fix the CRLF-crap...
--HG--
branch : trunk
2010-10-07 15:54:07 +02:00
click
f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click
dd29d9e422 More copyright header updates (will this ever end?)
--HG--
branch : trunk
2010-10-07 14:50:05 +02:00
click
a67d7c9afd Copyright header updates - part 3... (and some whitespace cleanups)
--HG--
branch : trunk
2010-10-07 14:00:52 +02:00
click
df66aee929 Yet more copyright header updates
--HG--
branch : trunk
2010-10-07 13:38:35 +02:00
click
8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
Spp
952d3cf10e Core: Fix couple of warnings
--HG--
branch : trunk
2010-10-01 09:10:07 +02:00
Anubisss
84a29b2d35 Remove const from MySQLConnectionInfo, can't use non const functions in a const struct. This fixes the compile error.
--HG--
branch : trunk
2010-09-30 20:32:09 +02:00
click
b87d8f4700 Buildsystem: Overhaul of the CMake buildsystem:
- utilize CMake for completely generating revision.h (kills off genrev and revision.h targets):
  - pull and set correct revision-ID/hash from Mercurial (hg) when using regular repository sourcetree
  - pull and set correct revision-ID/hash from archived releases (when pulled from googlecode)
  - set and use _BUILD_DIRECTIVE definition (earlier part of revision.h) as compiletime definition
- delete genrev and related buildsystems
  (now deprecated)
- Move some files around to adhere to buildsystem structure
Thanks to Shauren for figuring out the definition-behaviour for MSVC while he was in the shower

--HG--
branch : trunk
rename : cmake_uninstall.cmake.in => cmake/platform/unix/cmake_uninstall.in.cmake
2010-09-29 23:42:09 +02:00
Machiavelli
fcec787e9c Core/DBLayer: Pass connection info down to lower level class MySQLConnection and use relevant data in logging messages in its methods
--HG--
branch : trunk
2010-09-29 15:29:57 +02:00
Machiavelli
d3b30e979a Fix linux compile. Thanks to click, hunshijie and tomkuzyno for spotting the culprits.
--HG--
branch : trunk
2010-09-29 14:59:05 +02:00
Machiavelli
bf72fa749f Core/DBLayer: Store MySQL connection details in a struct and print relevant data in sql driver messages
--HG--
branch : trunk
2010-09-29 08:48:06 +02:00
Shauren
665e7a06ce Core/Commands: Remove all active bans before adding new one, prevents multiple active bans for one character/account
Core/DBLayer: Converted most of ban related queries into prepared statement (might have missed some)

Closes issue #4218.

--HG--
branch : trunk
2010-09-28 21:30:05 +02:00
Spp
e27976102d Core/: Fix warnings
--HG--
branch : trunk
2010-09-28 14:48:17 +02:00
Machiavelli
7abe69b570 Core/DBLayer: Remove obsolete parameter in PreparedResultSet constructor.
Thanks to Spp for pointing out.

--HG--
branch : trunk
2010-09-28 14:03:35 +02:00
Shocker
78803c9f09 Magic numbers cleanup:
- Replace many magic numbers with constants
- Use enum for vehicle flags/seat flags
- Correct structure for ItemRandomSuffixEntry

--HG--
branch : trunk
2010-09-28 08:21:51 +03:00
Machiavelli
a9e9a2c884 Core/DBLayer:
- DB Threading model update
* Get rid of ThreadBundleMask and bundled connection
* Implement configurable amount of Synch threads for databasepools
* Use modulus based algorithm to check for free synchronous connections instead of previous ¨get connection by thread key or bundlemask¨ feature
* Locks on mysql context objects are now managed outside the mysql query methods

Fixes issue #4058
Fixes issue #4059
Introduces a ton of more issues. Use at own risk. You were warned. Really.

Don´t forget to update your worldserver.conf

--HG--
branch : trunk
2010-09-27 00:20:56 +02:00
Shauren
2e2951d037 Core/Players: Fixed action bar issues when changing active spec
--HG--
branch : trunk
2010-09-26 21:15:15 +02:00
click
461590832a Core: Generic cleanup (tab2spaces/whitespace removal)
--HG--
branch : trunk
2010-09-25 22:03:57 +02:00
click
f077277aa1 Buildsystem: Set revision.h as a required dependency build before building game, shared, worldserver and authserver
--HG--
branch : trunk
2010-09-25 21:42:11 +02:00
Rat
28e90bbb60 Core/Scripts/SmartAI: added SmartAI files
Core/DBLayer/Texts: added CreatureTextMgr files
BuildSystem: added cmake for above files
Note: these are still under development and NOT USABLE
should not effect anything now

--HG--
branch : trunk
2010-09-25 18:47:03 +02:00
Machiavelli
fec6143f42 Core/SocialMgr: Do not load recently deleted (but existant) characters to social (friend/ignore) lists.
Fixes issue #3870
Fixes issue #3610

--HG--
branch : trunk
2010-09-25 17:34:26 +02:00
Machiavelli
477b30a1ad Core/DBLayer: Fix a memory leak in Field class, properly clear buffer before repopulating it.
Fixes many issues (from wrong subnames on NPCs to absent GO/Creature spawns)
Thanks to Rat for helping find the issue

--HG--
branch : trunk
2010-09-25 13:12:12 +02:00
Machiavelli
62946f9ef6 Core/DBLayer:
- Rewrite KeepAlive method for DatabaseWorkerPool. Use mysql_ping instead of explicit select queries, and also schedule KeepAlives for asynchronous threads.
NOTE: While the function is implemented and previous keepalive calls were transformed, it´s possible the keepalive call will need to be placed in several other locations in the code. Please leave feedback on whether or not this fixes your timeout issues.

Update issue #4062

--HG--
branch : trunk
2010-09-25 01:05:24 +02:00
Machiavelli
154d11acc0 Core/DBLayer:
- Fix another pesky linux specific compile error. (Thanks to Derex/Aokromes)
- Fix a typo in an assertion. (Thanks to Derex/Aokromes)
- Add proper zero termination in SetStructuredValue to get rid of memory issues that arose in the last few commits.
- Fix a crash caused by vsprintf´ing std::string in SystemMgr::LoadVersion()

--HG--
branch : trunk
2010-09-25 01:02:40 +02:00
Machiavelli
09aeff1027 Core/DBLayer: Return proper connection handle from DatabaseWorkerPool<T>::GetConnection
Updates issue #4062
Updates issue #4058

--HG--
branch : trunk
2010-09-24 22:41:24 +02:00
Machiavelli
e3bf89b6f7 Core/DBLayer:
- Fix memory leak introduced in previous rev
- Fix linux compile, thanks to Playon for reporting

--HG--
branch : trunk
2010-09-24 22:36:35 +02:00
Machiavelli
3c6dc32030 Core/DBLayer:
- Rewrite Field class to be able to store both binary prepared statement data and data from adhoc query resultsets
- Buffer the data of prepared statements using ResultSet and Field classes and let go of mysql c api structures after PreparedResultSet constructor. Fixes a race condition and thus a possible crash/data corruption (issue pointed out to Derex, basic suggestion by raczman)
- Conform PreparedResultSet and ResultSet to the same design standards, and using Field class as data buffer class for both
* NOTE: This means the fetching methods are uniform again, using ¨Field* fields = result->Fetch();¨ and access to elements trough fields[x].
* NOTE: for access to the correct row in prepared statements, ¨Field* fields = result->Fetch();¨ must ALWAYS be called inside the do { }while(result->NextRow()) loop.
* NOTE: This means that Field::GetString() returns std::string object and Field::GetCString() returns const char* pointer.

Still experimental and all that jazz, not recommended for production servers until feedback is given.

--HG--
branch : trunk
2010-09-24 22:16:21 +02:00
Shauren
d8ddf38453 Core/Items: Implemented trading soulbound loot items
Core/DBLayer: Converted more more player-related queries into prepared statements
Core/Items: Fixed loading of enchantments

Closes issue #4130.

--HG--
branch : trunk
2010-09-21 21:55:16 +02:00
Machiavelli
ce2d4e9a20 Core/DBLayer: Correctly print relevant mysql prepared statement creation error to give the end-user an idea of what exactly went wrong (missing SQL updates are the culprit of creation failure 99% of the time)
--HG--
branch : trunk
2010-09-20 20:53:32 +02:00
Shauren
a509976369 Core/DBLayer: Converted player login queries into prepared statements
Core/DBLayer: Added missing implementation for SQLQueryHolder::SetPreparedQuery

--HG--
branch : trunk
2010-09-20 18:20:40 +02:00
click
907203fdd9 Core/DBLayer: Shuffle an #include-statement around (initialize mysql connections before working on the rest) - Fixes nonPCH-builds.
--HG--
branch : trunk
2010-09-19 17:53:45 +02:00
Shauren
97aeb251b8 Core/Players: Added support for single character bans
Core/Commands: Renamed .ban character to .ban playeraccount (.ban character will ban only the player, not account)

This revision reaches 10000, congratulations and thanks to everyone who contributed!

--HG--
branch : trunk
2010-09-19 17:02:14 +02:00
Machiavelli
019103cb5a Core/DBLayer: Correct size for storing MYSQL_TYPE_FLOAT
--HG--
branch : trunk
2010-09-19 15:28:35 +02:00
Machiavelli
22571e9443 Core/DBLayer:
- Allow storing floats in prepared statements explicitly (previously would be casted to double)
- Add GetBool ¨wrapper/hack¨ to PreparedResultset class.

--HG--
branch : trunk
2010-09-19 15:25:50 +02:00
Machiavelli
b50c931d6e Core/DBLayer: Move QueryHolder and BasicStatement operations to their own file and remove SQLOperation.cpp from revision control
--HG--
branch : trunk
2010-09-19 12:36:48 +02:00
Machiavelli
0982719f5f Core/DBLayer:
- Declare the datatypes used to determine transaction element data (prepared statement/adhoc query string) on a generic level in SQLOperation.h
- Implement variable SQL element data for SQLQueryHolder class so it can execute both prepared statements and adhoc queries
- Make MySQLConnection::Query for adhoc queries return pointer to type instead of an autopointer, the autopointer is now applied on higher level code just like the function for querying prepared statements

--HG--
branch : trunk
2010-09-19 12:16:29 +02:00
Machiavelli
12acb7dd8f Core/DBLayer: Fix syntax of some recently added prepared statements that might have caused statement creation failure on certain platforms
--HG--
branch : trunk
2010-09-19 10:40:10 +02:00
Machiavelli
27dd112c97 Core/DBLayer: Add an assert to trace down when a prepared statement creation has failed (99% it will be because of a bad query) - to prevent crashes at a later stage
--HG--
branch : trunk
2010-09-19 10:36:48 +02:00
silinoron
65a50ed3a2 Core/DBLayer: Some more prepared statements in ObjectMgr.
Core/ObjectMgr: Some additional cleanup.

--HG--
branch : trunk
2010-09-18 19:49:17 -07:00
silinoron
1e127eef73 Core/DBLayer: Change some regular statements to prepared statements.
Patch by thyros82@gmx.de.
Fixes issue #3774

--HG--
branch : trunk
2010-09-18 19:21:03 -07:00
linencloth
ae13e7354a Core/DBLayer: Fix a typo. Author: 41782992@qq.com
Fixes issue 4071.

--HG--
branch : trunk
2010-09-18 15:34:01 +02:00
Machiavelli
49dc1e55de Core/Utils: Fix a crash in vutf8printf. Author: Vladimir
--HG--
branch : trunk
2010-09-18 11:29:09 +02:00