Make PreparedStatements static for each database.

This commit is contained in:
hondacrx
2023-02-04 20:55:14 -05:00
parent e0e20b6b1c
commit 149fadccab
90 changed files with 922 additions and 923 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ namespace Game.Chat
uint days = WorldConfig.GetUIntValue(WorldCfg.PreserveCustomChannelDuration);
if (days != 0)
{
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_OLD_CHANNELS);
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_OLD_CHANNELS);
stmt.AddValue(0, days * Time.Day);
DB.Characters.Execute(stmt);
}
@@ -73,7 +73,7 @@ namespace Game.Chat
foreach (var (name, team) in toDelete)
{
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_CHANNEL);
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_CHANNEL);
stmt.AddValue(0, name);
stmt.AddValue(1, (uint)team);
DB.Characters.Execute(stmt);