diff options
author | click <none@none> | 2010-10-22 21:38:22 +0200 |
---|---|---|
committer | click <none@none> | 2010-10-22 21:38:22 +0200 |
commit | 67d5708bf031356050198628004a4f75729e32cc (patch) | |
tree | 9c69a022e1d0c69c794c5f108329f98d2ee5f045 | |
parent | 12289c872e8002f418fdf1013a586ba67f243140 (diff) |
Core/DBLayer: Use DirectPExecute, NOT DirectExecute, since we're actually using parameters in the queries - my bad!
--HG--
branch : trunk
-rwxr-xr-x | src/server/game/Instances/InstanceSaveMgr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 3bbf5dffa15..35cdbdb167c 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -241,7 +241,7 @@ void InstanceSaveManager::_DelHelper(const char *fields, const char *table, cons CharacterDatabase.escape_string(fieldValue); ss << (i != 0 ? " AND " : "") << fieldTokens[i] << " = '" << fieldValue << "'"; } - CharacterDatabase.DirectExecute("DELETE FROM %s WHERE %s", table, ss.str().c_str()); + CharacterDatabase.DirectPExecute("DELETE FROM %s WHERE %s", table, ss.str().c_str()); } while (result->NextRow()); } } @@ -431,7 +431,7 @@ void InstanceSaveManager::LoadResetTimes() InstResetTimeMapDiffType::iterator itr = instResetTime.find(instance); if (itr != instResetTime.end() && itr->second.second != resettime) { - CharacterDatabase.DirectExecute("UPDATE instance SET resettime = '"UI64FMTD"' WHERE id = '%u'", uint64(resettime), instance); + CharacterDatabase.DirectPExecute("UPDATE instance SET resettime = '"UI64FMTD"' WHERE id = '%u'", uint64(resettime), instance); itr->second.second = resettime; } } @@ -460,7 +460,7 @@ void InstanceSaveManager::LoadResetTimes() if (!mapDiff) { sLog.outError("InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty); - CharacterDatabase.DirectExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid,difficulty); + CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid,difficulty); continue; } @@ -498,7 +498,7 @@ void InstanceSaveManager::LoadResetTimes() { // initialize the reset time t = today + period + diff; - CharacterDatabase.DirectExecute("INSERT INTO instance_reset VALUES ('%u','%u','"UI64FMTD"')", mapid, difficulty, (uint64)t); + CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u','%u','"UI64FMTD"')", mapid, difficulty, (uint64)t); } if (t < now) @@ -507,7 +507,7 @@ void InstanceSaveManager::LoadResetTimes() // calculate the next reset time t = (t / DAY) * DAY; t += ((today - t) / period + 1) * period + diff; - CharacterDatabase.DirectExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty); + CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty); } SetResetTimeFor(mapid,difficulty,t); |