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
@@ -1275,7 +1275,7 @@ namespace Game.Entities
foreach (var guid in allowedLooters)
ss.AppendFormat("{0} ", guid);
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_BOP_TRADE);
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.INS_ITEM_BOP_TRADE);
stmt.AddValue(0, item.GetGUID().GetCounter());
stmt.AddValue(1, ss.ToString());
DB.Characters.Execute(stmt);
@@ -5524,7 +5524,7 @@ namespace Game.Entities
if (pItem.IsWrapped())
{
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_GIFT);
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_GIFT);
stmt.AddValue(0, pItem.GetGUID().GetCounter());
DB.Characters.Execute(stmt);
}