Show
Ignore:
Timestamp:
11/19/08 13:43:02 (17 years ago)
Author:
yumileroy
Message:

[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.

Original author: KingPin?
Date: 2008-11-05 20:10:19-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/InstanceSaveMgr.cpp

    r102 r173  
    272272    // first, obtain total instance set 
    273273    std::set< uint32 > InstanceSet; 
    274     QueryResult *result = CharacterDatabase.PQuery("SELECT id FROM instance"); 
     274    QueryResult *result = CharacterDatabase.Query("SELECT id FROM instance"); 
    275275    if( result ) 
    276276    { 
     
    285285 
    286286    // creature_respawn 
    287     result = WorldDatabase.PQuery("SELECT DISTINCT(instance) FROM creature_respawn WHERE instance <> 0"); 
     287    result = WorldDatabase.Query("SELECT DISTINCT(instance) FROM creature_respawn WHERE instance <> 0"); 
    288288    if( result ) 
    289289    { 
     
    299299 
    300300    // gameobject_respawn 
    301     result = WorldDatabase.PQuery("SELECT DISTINCT(instance) FROM gameobject_respawn WHERE instance <> 0"); 
     301    result = WorldDatabase.Query("SELECT DISTINCT(instance) FROM gameobject_respawn WHERE instance <> 0"); 
    302302    if( result ) 
    303303    { 
     
    328328    // any associations to ids not in this table are assumed to be 
    329329    // cleaned already in CleanupInstances 
    330     QueryResult *result = CharacterDatabase.PQuery("SELECT id FROM instance"); 
     330    QueryResult *result = CharacterDatabase.Query("SELECT id FROM instance"); 
    331331    if( result ) 
    332332    { 
     
    378378    typedef std::map<uint32, std::pair<uint32, uint64> > ResetTimeMapType; 
    379379    ResetTimeMapType InstResetTime; 
    380     QueryResult *result = CharacterDatabase.PQuery("SELECT id, map, resettime FROM instance WHERE resettime > 0"); 
     380    QueryResult *result = CharacterDatabase.Query("SELECT id, map, resettime FROM instance WHERE resettime > 0"); 
    381381    if( result ) 
    382382    { 
     
    394394 
    395395        // update reset time for normal instances with the max creature respawn time + X hours 
    396         result = WorldDatabase.PQuery("SELECT MAX(respawntime), instance FROM creature_respawn WHERE instance > 0 GROUP BY instance"); 
     396        result = WorldDatabase.Query("SELECT MAX(respawntime), instance FROM creature_respawn WHERE instance > 0 GROUP BY instance"); 
    397397        if( result ) 
    398398        {