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
@@ -758,12 +758,12 @@ namespace Game
{
if (factionState.needSave)
{
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_CHAR_REPUTATION_BY_FACTION);
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_CHAR_REPUTATION_BY_FACTION);
stmt.AddValue(0, _player.GetGUID().GetCounter());
stmt.AddValue(1, factionState.Id);
trans.Append(stmt);
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_CHAR_REPUTATION_BY_FACTION);
stmt = CharacterDatabase.GetPreparedStatement(CharStatements.INS_CHAR_REPUTATION_BY_FACTION);
stmt.AddValue(0, _player.GetGUID().GetCounter());
stmt.AddValue(1, factionState.Id);
stmt.AddValue(2, factionState.Standing);