mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
Replace some PQuery() calls with more simple Query()
This commit is contained in:
parent
086dee05cd
commit
fa37c291d6
8 changed files with 24 additions and 24 deletions
|
|
@ -268,7 +268,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
|
||||
|
|
@ -281,7 +281,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
|
||||
|
|
@ -295,7 +295,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
|
||||
|
|
@ -324,7 +324,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
|
||||
|
|
@ -374,7 +374,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
|
||||
|
|
@ -390,7 +390,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue