Core/DBLayer:
* Rename QueryResult class to ResultSet * Rename QueryResult_AutoPtr to QueryResult * Declare ACE refcounted auto pointer for PreparedResultSet class --HG-- branch : trunk
This commit is contained in:
@@ -1819,7 +1819,7 @@ void World::LoadAutobroadcasts()
|
||||
{
|
||||
m_Autobroadcasts.clear();
|
||||
|
||||
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT text FROM autobroadcast");
|
||||
QueryResult result = WorldDatabase.Query("SELECT text FROM autobroadcast");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -2220,7 +2220,7 @@ BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string dura
|
||||
LoginDatabase.escape_string(safe_author);
|
||||
|
||||
uint32 duration_secs = TimeStringToSecs(duration);
|
||||
QueryResult_AutoPtr resultAccounts = QueryResult_AutoPtr(NULL); //used for kicking
|
||||
QueryResult resultAccounts = QueryResult(NULL); //used for kicking
|
||||
|
||||
///- Update the database with ban information
|
||||
switch(mode)
|
||||
@@ -2506,7 +2506,7 @@ void World::UpdateRealmCharCount(uint32 accountId)
|
||||
);
|
||||
}
|
||||
|
||||
void World::_UpdateRealmCharCount(QueryResult_AutoPtr resultCharCount, uint32 accountId)
|
||||
void World::_UpdateRealmCharCount(QueryResult resultCharCount, uint32 accountId)
|
||||
{
|
||||
if (resultCharCount)
|
||||
{
|
||||
@@ -2529,7 +2529,7 @@ void World::InitDailyQuestResetTime()
|
||||
{
|
||||
time_t mostRecentQuestTime;
|
||||
|
||||
QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT MAX(time) FROM character_queststatus_daily");
|
||||
QueryResult result = CharacterDatabase.Query("SELECT MAX(time) FROM character_queststatus_daily");
|
||||
if (result)
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
@@ -2601,7 +2601,7 @@ void World::ResetDailyQuests()
|
||||
|
||||
void World::LoadDBAllowedSecurityLevel()
|
||||
{
|
||||
QueryResult_AutoPtr result = LoginDatabase.PQuery("SELECT allowedSecurityLevel from realmlist WHERE id = '%d'", realmID);
|
||||
QueryResult result = LoginDatabase.PQuery("SELECT allowedSecurityLevel from realmlist WHERE id = '%d'", realmID);
|
||||
if (result)
|
||||
SetPlayerSecurityLimit(AccountTypes(result->Fetch()->GetUInt16()));
|
||||
}
|
||||
@@ -2646,7 +2646,7 @@ void World::UpdateMaxSessionCounters()
|
||||
|
||||
void World::LoadDBVersion()
|
||||
{
|
||||
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT db_version, script_version, cache_id FROM version LIMIT 1");
|
||||
QueryResult result = WorldDatabase.Query("SELECT db_version, script_version, cache_id FROM version LIMIT 1");
|
||||
//QueryResult* result = WorldDatabase.Query("SELECT version, creature_ai_version, cache_id FROM db_version LIMIT 1");
|
||||
if (result)
|
||||
{
|
||||
@@ -2689,7 +2689,7 @@ void World::UpdateAreaDependentAuras()
|
||||
|
||||
void World::LoadWorldStates()
|
||||
{
|
||||
QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT entry, value FROM worldstates");
|
||||
QueryResult result = CharacterDatabase.Query("SELECT entry, value FROM worldstates");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -2735,7 +2735,7 @@ uint64 World::getWorldState(uint32 index) const
|
||||
|
||||
void World::ProcessQueryCallbacks()
|
||||
{
|
||||
QueryResult_AutoPtr result;
|
||||
QueryResult result;
|
||||
|
||||
//-UpdateRealmCharCount
|
||||
if (m_realmCharCallback.IsReady())
|
||||
|
||||
@@ -43,7 +43,6 @@ class WorldSession;
|
||||
class Player;
|
||||
struct ScriptAction;
|
||||
struct ScriptInfo;
|
||||
class QueryResult;
|
||||
class WorldSocket;
|
||||
class SystemMgr;
|
||||
|
||||
@@ -738,7 +737,7 @@ class World
|
||||
protected:
|
||||
void _UpdateGameTime();
|
||||
// callback for UpdateRealmCharacters
|
||||
void _UpdateRealmCharCount(QueryResult_AutoPtr resultCharCount, uint32 accountId);
|
||||
void _UpdateRealmCharCount(QueryResult resultCharCount, uint32 accountId);
|
||||
|
||||
void InitDailyQuestResetTime();
|
||||
void InitWeeklyQuestResetTime();
|
||||
|
||||
Reference in New Issue
Block a user