Make PreparedStatements static for each database.
This commit is contained in:
@@ -44,13 +44,13 @@ namespace Game
|
||||
|
||||
public static void SaveToDB(QuestPool pool, SQLTransaction trans)
|
||||
{
|
||||
PreparedStatement delStmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_POOL_QUEST_SAVE);
|
||||
PreparedStatement delStmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_POOL_QUEST_SAVE);
|
||||
delStmt.AddValue(0, pool.poolId);
|
||||
trans.Append(delStmt);
|
||||
|
||||
foreach (uint questId in pool.activeQuests)
|
||||
{
|
||||
PreparedStatement insStmt = DB.Characters.GetPreparedStatement(CharStatements.INS_POOL_QUEST_SAVE);
|
||||
PreparedStatement insStmt = CharacterDatabase.GetPreparedStatement(CharStatements.INS_POOL_QUEST_SAVE);
|
||||
insStmt.AddValue(0, pool.poolId);
|
||||
insStmt.AddValue(1, questId);
|
||||
trans.Append(insStmt);
|
||||
@@ -141,7 +141,7 @@ namespace Game
|
||||
SQLTransaction trans0 = new SQLTransaction();
|
||||
foreach (uint poolId in unknownPoolIds)
|
||||
{
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_POOL_QUEST_SAVE);
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_POOL_QUEST_SAVE);
|
||||
stmt.AddValue(0, poolId);
|
||||
trans0.Append(stmt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user