aboutsummaryrefslogtreecommitdiff
path: root/src/game/InstanceSaveMgr.cpp
diff options
context:
space:
mode:
authorp0wer <none@none>2010-01-01 14:19:29 -0600
committerp0wer <none@none>2010-01-01 14:19:29 -0600
commit17e4fbd4ad1d80c4c6a6cd2ceed1547f884bb243 (patch)
tree51190859fcb839c958f481c56ad8b7d4591c8fe6 /src/game/InstanceSaveMgr.cpp
parentf497ae3ae07d3a5652bf3d6ddfbfedb2235affc9 (diff)
Make the core boot alot cleaner. Fix some formating. Make custom attributes for spells show a bar and how much they are loading.
Overall fix 99% of display issues while core is booting. --HG-- branch : trunk
Diffstat (limited to 'src/game/InstanceSaveMgr.cpp')
-rw-r--r--src/game/InstanceSaveMgr.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp
index eadc20c4acc..dbb4414949f 100644
--- a/src/game/InstanceSaveMgr.cpp
+++ b/src/game/InstanceSaveMgr.cpp
@@ -282,7 +282,7 @@ void InstanceSaveManager::CleanupInstances()
// first, obtain total instance set
std::set<uint32> InstanceSet;
QueryResult *result = CharacterDatabase.Query("SELECT id FROM instance");
- if( result )
+ if (result)
{
do
{
@@ -295,12 +295,12 @@ void InstanceSaveManager::CleanupInstances()
// creature_respawn
result = WorldDatabase.Query("SELECT DISTINCT(instance) FROM creature_respawn WHERE instance <> 0");
- if( result )
+ if (result)
{
do
{
Field *fields = result->Fetch();
- if(InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
+ if (InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
WorldDatabase.DirectPExecute("DELETE FROM creature_respawn WHERE instance = '%u'", fields[0].GetUInt32());
}
while (result->NextRow());
@@ -309,12 +309,12 @@ void InstanceSaveManager::CleanupInstances()
// gameobject_respawn
result = WorldDatabase.Query("SELECT DISTINCT(instance) FROM gameobject_respawn WHERE instance <> 0");
- if( result )
+ if (result)
{
do
{
Field *fields = result->Fetch();
- if(InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
+ if (InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
WorldDatabase.DirectPExecute("DELETE FROM gameobject_respawn WHERE instance = '%u'", fields[0].GetUInt32());
}
while (result->NextRow());
@@ -323,12 +323,12 @@ void InstanceSaveManager::CleanupInstances()
// characters
result = CharacterDatabase.Query("SELECT DISTINCT(instance_id) FROM characters WHERE instance_id <> 0");
- if( result )
+ if (result)
{
do
{
Field *fields = result->Fetch();
- if(InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
+ if (InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
CharacterDatabase.PExecute("UPDATE characters SET instance_id = '0' WHERE instance_id = '%u'", fields[0].GetUInt32());
}
while (result->NextRow());
@@ -337,12 +337,12 @@ void InstanceSaveManager::CleanupInstances()
// corpse
result = CharacterDatabase.Query("SELECT DISTINCT(instance) FROM corpse WHERE instance <> 0");
- if( result )
+ if (result)
{
do
{
Field *fields = result->Fetch();
- if(InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
+ if (InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
CharacterDatabase.PExecute("UPDATE corpse SET instance = '0' WHERE instance = '%u'", fields[0].GetUInt32());
}
while (result->NextRow());
@@ -366,7 +366,7 @@ void InstanceSaveManager::PackInstances()
// any associations to ids not in this table are assumed to be
// cleaned already in CleanupInstances
QueryResult *result = CharacterDatabase.Query("SELECT id FROM instance");
- if( result )
+ if (result)
{
do
{
@@ -377,7 +377,7 @@ void InstanceSaveManager::PackInstances()
delete result;
}
- barGoLink bar( InstanceSet.size() + 1);
+ barGoLink bar(InstanceSet.size() + 1);
bar.step();
uint32 InstanceNumber = 1;
@@ -400,8 +400,8 @@ void InstanceSaveManager::PackInstances()
bar.step();
}
- sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber );
sLog.outString();
+ sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber );
}
void InstanceSaveManager::LoadResetTimes()