mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Comply with Xiphoseer required changes.
Remove the CDClientDatabase::ExecuteQueryWithArgs() function and replace it with CDClientDatabase::CreatePreppedStmt(). This prevents a developer from accidently using %s, or incorrectly passing std::string, and causing a silent error.
This commit is contained in:
@@ -26,9 +26,11 @@ void dZoneManager::Initialize(const LWOZONEID& zoneID) {
|
||||
|
||||
LOT zoneControlTemplate = 2365;
|
||||
|
||||
auto result = CDClientDatabase::ExecuteQueryWithArgs(
|
||||
"SELECT zoneControlTemplate, ghostdistance_min, ghostdistance FROM ZoneTable WHERE zoneID = %d;",
|
||||
(int) zoneID.GetMapID());
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT zoneControlTemplate, ghostdistance_min, ghostdistance FROM ZoneTable WHERE zoneID = ?;");
|
||||
query.bind(1, (int) zoneID.GetMapID());
|
||||
|
||||
auto result = query.execQuery();
|
||||
|
||||
if (!result.eof()) {
|
||||
zoneControlTemplate = result.getIntField("zoneControlTemplate", 2365);
|
||||
|
Reference in New Issue
Block a user