aboutsummaryrefslogtreecommitdiff
path: root/src/game/InstanceSaveMgr.cpp
diff options
context:
space:
mode:
authorKingPin <none@none>2008-11-05 20:10:19 -0600
committerKingPin <none@none>2008-11-05 20:10:19 -0600
commit8d331f2b10cff29ee0571f7056ad353df6a3eabd (patch)
tree36ef334fec8d6a55f151d40ca5e709880346c219 /src/game/InstanceSaveMgr.cpp
parent404f72c7a2e9c230156e51f8013993b3c8f03d93 (diff)
[svn] * Avoid access to bag item prototype for getting bag size, use related item update field instead as more fast source.
* Better check client inventory pos data received in some client packets to skip invalid cases. * Removed some unnecessary database queries. * Make guid lookup for adding ignore async. * Added two parameter versions of the AsyncQuery function * Make queries for adding friends async. - Hunuza * Replace some PQuery() calls with more simple Query() - Hunuza * Mark spell as executed instead of deleteable to solve crash. *** Source mangos. **Its a big commit. so test with care... or without care.... whatever floats your boat. --HG-- branch : trunk
Diffstat (limited to 'src/game/InstanceSaveMgr.cpp')
-rw-r--r--src/game/InstanceSaveMgr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp
index 15f2d097615..f97fc4bff19 100644
--- a/src/game/InstanceSaveMgr.cpp
+++ b/src/game/InstanceSaveMgr.cpp
@@ -271,7 +271,7 @@ void InstanceSaveManager::CleanupInstances()
// creature_respawn and gameobject_respawn are in another database
// first, obtain total instance set
std::set< uint32 > InstanceSet;
- QueryResult *result = CharacterDatabase.PQuery("SELECT id FROM instance");
+ QueryResult *result = CharacterDatabase.Query("SELECT id FROM instance");
if( result )
{
do
@@ -284,7 +284,7 @@ void InstanceSaveManager::CleanupInstances()
}
// creature_respawn
- result = WorldDatabase.PQuery("SELECT DISTINCT(instance) FROM creature_respawn WHERE instance <> 0");
+ result = WorldDatabase.Query("SELECT DISTINCT(instance) FROM creature_respawn WHERE instance <> 0");
if( result )
{
do
@@ -298,7 +298,7 @@ void InstanceSaveManager::CleanupInstances()
}
// gameobject_respawn
- result = WorldDatabase.PQuery("SELECT DISTINCT(instance) FROM gameobject_respawn WHERE instance <> 0");
+ result = WorldDatabase.Query("SELECT DISTINCT(instance) FROM gameobject_respawn WHERE instance <> 0");
if( result )
{
do
@@ -327,7 +327,7 @@ void InstanceSaveManager::PackInstances()
// all valid ids are in the instance table
// any associations to ids not in this table are assumed to be
// cleaned already in CleanupInstances
- QueryResult *result = CharacterDatabase.PQuery("SELECT id FROM instance");
+ QueryResult *result = CharacterDatabase.Query("SELECT id FROM instance");
if( result )
{
do
@@ -377,7 +377,7 @@ void InstanceSaveManager::LoadResetTimes()
// resettime = 0 in the DB for raid/heroic instances so those are skipped
typedef std::map<uint32, std::pair<uint32, uint64> > ResetTimeMapType;
ResetTimeMapType InstResetTime;
- QueryResult *result = CharacterDatabase.PQuery("SELECT id, map, resettime FROM instance WHERE resettime > 0");
+ QueryResult *result = CharacterDatabase.Query("SELECT id, map, resettime FROM instance WHERE resettime > 0");
if( result )
{
do
@@ -393,7 +393,7 @@ void InstanceSaveManager::LoadResetTimes()
delete result;
// update reset time for normal instances with the max creature respawn time + X hours
- result = WorldDatabase.PQuery("SELECT MAX(respawntime), instance FROM creature_respawn WHERE instance > 0 GROUP BY instance");
+ result = WorldDatabase.Query("SELECT MAX(respawntime), instance FROM creature_respawn WHERE instance > 0 GROUP BY instance");
if( result )
{
do