Commit Graph

51 Commits

Author SHA1 Message Date
leak
6d1924cee8 Removing SQLStorage class leftovers 2011-04-28 23:03:02 +02:00
leak
5aeb4fe794 Core/ObjectMgr: Refactor sInstanceTemplate 2011-04-28 22:16:13 +02:00
Azazel
3993b73925 Core/CharDB cleanup: change creature_respawn and gameobject_respawn column names to lowerCamel, rename instance column to instanceId and move all queries to these tables to prepared statements.
Fix import error in character_database.sql.
2011-04-13 17:02:06 +06:00
Azazel
5357b1ba77 Core/CharDB Cleanup: alter corpse table making column names lowerCamel and move all queries to prepared statements.
NOTICE: column can be named `guid` only if it represents character guid. All other guids will be renamed to reflect their purpose (like corpseGuid in this specific case)
2011-04-11 14:39:00 +06:00
leak
190ef1c2ef Core/Instances: Fix crash and allocation issue in instance id generation 2011-03-11 13:24:58 +01:00
leak
4569e4852a Core/Instances: Recycle instance IDs. Should fix instance ID shifting and related issues with instance binding.
fixes #736
2011-03-10 22:22:27 +01:00
Machiavelli
e07e20ffca Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf. 2011-02-20 20:16:34 +01:00
Shauren
c2b0bcbd6c Core/Instances: Implemented DungeonEncounter.dbc for creating completed encounters mask to use in packets
Core/Dungeon Finder: Implemented new way of giving random dungeon rewards, linked to DungeonEncounter.dbc
2011-02-03 22:20:40 +01:00
Shauren
3f0d888b0e Core/Instances: Fixed cleaning and packing query for account_instance_times table (instance can no longer exist but player limit is still there) 2011-01-28 15:05:46 +01:00
leak
137b079eea Core: Generic cleanup (tab2spaces/trailing whitespace removal) 2011-01-26 01:03:35 +01:00
Shauren
867bc197ef Core/Instances: Made the max amount of instances player can enter within hour configurable and fixed typo in instance packing/cleaning query 2011-01-24 16:12:02 +01:00
Shauren
464837077a Core/Instances: Implemented hourly instance limit: players are limited to entering 5 instances per hour (account wide limit) 2011-01-24 11:20:30 +01:00
leak
c59ea4726e SQL: Characters db storage type cleanup No. 6 2011-01-20 01:02:24 +01:00
leak
a7df9ddff1 SQL: Characters db storage type cleanup No. 4 2011-01-19 22:46:21 +01:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren
928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
Shauren
0f3b9019a8 Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG--
branch : trunk
2010-12-22 21:25:23 +01:00
Shauren
7b4e1c6387 Core/ObjectMgr: Static members are no longer accessed through singleton
--HG--
branch : trunk
2010-12-22 20:23:47 +01:00
leak
6115b0bd5f Removing ProgressBars as they are performing badly on startup.
[**************************************************] 100%
R.I.P

--HG--
branch : trunk
2010-12-22 00:12:03 +01:00
leak
fd694cd232 Streamlining loading functions for server startup
- Added a couple of timer outputs
- Improved code consistency between loading functions
- Progess bars should look and behave similar on all OS now (sLog.outString() is not needed anymore to replace the progress bar in log files)

--HG--
branch : trunk
2010-12-19 17:06:33 +01:00
linencloth
2fbbcc477c Core/InstanceSaveMgr: Cleanup for better readability
--HG--
branch : trunk
2010-12-19 01:23:36 +01:00
linencloth
4193806dba Core/InstanceSaveMgr: Prevent timer underflow by passing resetTime instead of timeLeft
--HG--
branch : trunk
2010-12-19 00:59:04 +01:00
linencloth
12e046e45e Core/InstanceSaveMgr: Replace some queries with executes as the result isn't needed
(thanks to Machiavelli for the idea and for spotting these forgotten lines)

--HG--
branch : trunk
2010-12-19 00:04:27 +01:00
linencloth
a8214a682a Core/InstanceSaveMgr: Optimize instance packing and cleaning up
--HG--
branch : trunk
2010-12-18 23:43:44 +01:00
click
5cd3904059 Core/DBLayer: Move tables reserved_name, gameobject_respawn and creature_respawn from WORLD database to CHARACTER database as it's content is realm-specific and should be preserved (thanks to leak for the cleanup)
*** TO PRESERVE (COPY) THE DATA CONTAINED IN THE OLD TABLES, YOU MUST FOLLOW THE FOLLOWING SQL-RECIPE (REPLACE DATABASENAMES WHERE NEEDED!) ***

-- Move creature_respawn from world to characters db
INSERT INTO `characters`.`creature_respawn` (`guid`, `respawntime`, `instance`)
SELECT `guid, `respawntime` `instance` * FROM `world`.`creature_respawn`;
-- Remove creature_respawn table from world db
DROP TABLE `world`.`creature_respawn`;

-- Move gameobject_respawn from world to characters db
INSERT INTO `characters`.`gameobject_respawn` (`guid`, `respawntime`, `instance`)
SELECT `guid`, `respawntime`, `instance` FROM `world`.`gameobject_respawn`;
-- Remove creature_respawn table from world db
DROP TABLE `world`.`gameobject_respawn`;

-- Move reserved names from world to characters db
INSERT INTO `characters`.`reserved_name` (`name`)
SELECT `name` FROM `world`.`reserved_name`;
-- Remove reserved_names table from world db
DROP TABLE `world`.`reserved_name`;

*** THE ABOVE MUST BE DONE, OR EXISTING INSTANCES WILL BE FULLY RESPAWNED - YOU HAVE BEEN WARNED ***
Closes issue 4842. Closes issue 4849.

--HG--
branch : trunk
2010-11-19 15:53:14 +01:00
click
dc9708d09f Core/Guild: And fix a typo... *sigh*
--HG--
branch : trunk
2010-10-22 21:51:19 +02:00
click
67d5708bf0 Core/DBLayer: Use DirectPExecute, NOT DirectExecute, since we're actually using parameters in the queries - my bad!
--HG--
branch : trunk
2010-10-22 21:38:22 +02:00
click
12289c872e Core/DBLayer: Use DirectExecute instead of PQuery on some instance-saving queries
--HG--
branch : trunk
2010-10-22 21:08:27 +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
linencloth
b545bd8ea9 Core/DBLayer: Replace some asynchronous queries to synchronous ones in instance loading to prevent corruption in some cases
--HG--
branch : trunk
2010-10-16 22:19:41 +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
Machiavelli
311ae331ad Core/InstanceSaveMgr: Statically define ResetTimeDelay as class member instead of redefining it in different functions
--HG--
branch : trunk
2010-09-25 14:47:24 +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
Machiavelli
a41e99223e Core/DBLayer:
* Rename QueryResult class to ResultSet
* Rename QueryResult_AutoPtr to QueryResult
* Declare ACE refcounted auto pointer for PreparedResultSet class

--HG--
branch : trunk
2010-09-11 21:10:54 +02:00
silinoron
5179d3149a Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG--
branch : trunk
2010-09-03 21:55:57 -07:00
Shauren
e9ff90a967 Fix *SOME* build errors
--HG--
branch : trunk
2010-09-02 18:20:59 +02:00
Machiavelli
0117af4c37 Core/DBLayer:
- Implement deriviate classes of MySQLConnection for every database type (world, realm, characters)
- Make DatabaseWorkerPool templatized and use the above mentioned classes as parameter
- Implementation of the new types in code
(This is in preparation of prepared statement interface)

--HG--
branch : trunk
2010-09-02 17:47:50 +02:00
silinoron
8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00
silinoron
5cbae843d5 Core/Game: fix all warnings related to converting doubles and floats.
--HG--
branch : trunk
2010-08-22 12:39:39 -07:00
Machiavelli
994186f267 DB Layer:
- Make SQL Transactions actual objects used in code. (Thanks to Derex for the idea)
* Uncommitted transactions will be automatically rolled back and cleaned up using ACE_Refcounted_Auto_Ptr, so no need to call Rollback() in the code.
* Prevents recursive transactions and makes developers aware of transactions going on.
* Gets rid of unneccesary overhead iterating over a concurrent map.
- Some cleanups in affected code, including better usage of transaction control in AH / mail related code to prevent data loss.

*** Experimental, use at own risk, recommended to backup your DBs. ***

--HG--
branch : trunk
2010-08-21 03:19:25 +02:00
azazel
590199d8e1 * Rename InstanceData to InstanceScript
* Rename *mgr to their new names in scripts project
* Mass convert all the scripts (NEEDS THOROUGH TESTING, because it was done automatically) Please, report bugs on issue tracker.

--HG--
branch : trunk
rename : src/server/game/Instances/InstanceData.cpp => src/server/game/Instances/InstanceScript.cpp
rename : src/server/game/Instances/InstanceData.h => src/server/game/Instances/InstanceScript.h
2010-08-08 22:54:58 +06:00
XTZGZoReX
9083271a2f * Some singleton renames for consistency:
accmgr -> AccountMgr
objmgr -> ObjectMgr
auctionmgr -> sAuctionMgr
spellmgr -> sSpellMgr
CreatureEAI_Mgr -> sEventAIMgr
achievementmgr -> sAchievementMgr
gameeventmgr -> sGameEventMgr
sInstanceSaveManager -> sInstanceSaveMgr
poolhandler -> sPoolMgr

--HG--
branch : trunk
2010-08-08 05:25:45 +02:00
QAston
48b360097c *use ASSERT macro instead of regular assert for better output.
--HG--
branch : trunk
2010-07-30 20:04:28 +02:00
click
3296a944e7 Convert to using ACE for reading configurationfiles, and remove dependency on dotconfpp configuration library and related files
(patch by astellar - and a thankyou to vladimir for being a russian teddybear)

--HG--
branch : trunk
2010-07-29 01:22:45 +02:00
Machiavelli
87cc652a82 Replace some misplaced DirectExecute´s with delayed Execute calls. DirectExecute at this moment should only be used for transaction control and not for dynamic content.
--HG--
branch : trunk
2010-06-28 23:19:54 +02:00
Machiavelli
0f7657b68c Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern.

--HG--
branch : trunk
2010-06-25 00:18:01 +02:00
Brian
dee7fd1382 * Remove more not needed relative paths in include files
--HG--
branch : trunk
2010-06-08 16:13:55 -06:00
Tartalo
c834449400 More fixes for game/ cmake compilation
--HG--
branch : trunk
2010-06-07 23:40:17 +02:00
Brian
15f8bbe9ca * More cleanup
--HG--
branch : trunk
2010-06-07 12:08:15 -06:00