Replace some PQuery/PExecute by more simple Query/Execute

Original patch by hunuza, extended to whole code
Closses issue 1446

--HG--
branch : trunk
This commit is contained in:
Spp
2010-04-30 11:21:25 +02:00
parent 19bed20036
commit 1bc2a9fd4a
9 changed files with 17 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ SystemMgr& SystemMgr::Instance()
void SystemMgr::LoadVersion()
{
//Get Version information
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT script_version FROM version LIMIT 1");
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT script_version FROM version LIMIT 1");
if (Result)
{
@@ -58,7 +58,7 @@ void SystemMgr::LoadScriptTexts()
outstring_log("TSCR: Loading Script Texts...");
LoadTrinityStrings(WorldDatabase,"script_texts",TEXT_SOURCE_RANGE,1+(TEXT_SOURCE_RANGE*2));
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT entry, sound, type, language, emote FROM script_texts");
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM script_texts");
outstring_log("TSCR: Loading Script Texts additional data...");
@@ -124,7 +124,7 @@ void SystemMgr::LoadScriptTextsCustom()
outstring_log("TSCR: Loading Custom Texts...");
LoadTrinityStrings(WorldDatabase,"custom_texts",TEXT_SOURCE_RANGE*2,1+(TEXT_SOURCE_RANGE*3));
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT entry, sound, type, language, emote FROM custom_texts");
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM custom_texts");
outstring_log("TSCR: Loading Custom Texts additional data...");
@@ -193,13 +193,13 @@ void SystemMgr::LoadScriptWaypoints()
uint64 uiCreatureCount = 0;
// Load Waypoints
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT COUNT(entry) FROM script_waypoint GROUP BY entry");
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT COUNT(entry) FROM script_waypoint GROUP BY entry");
if (Result)
uiCreatureCount = Result->GetRowCount();
outstring_log("TSCR: Loading Script Waypoints for %u creature(s)...", uiCreatureCount);
Result = WorldDatabase.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
Result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
if (Result)
{