Make PreparedStatements static for each database.
This commit is contained in:
@@ -294,7 +294,7 @@ namespace Game
|
||||
}
|
||||
else
|
||||
{
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_MAIL_COUNT);
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.SEL_MAIL_COUNT);
|
||||
stmt.AddValue(0, receiverGuid.GetCounter());
|
||||
|
||||
GetQueryProcessor().AddCallback(DB.Characters.AsyncQuery(stmt).WithChainingCallback((queryCallback, mailCountResult) =>
|
||||
@@ -366,11 +366,11 @@ namespace Game
|
||||
//we can return mail now, so firstly delete the old one
|
||||
SQLTransaction trans = new();
|
||||
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_MAIL_BY_ID);
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_MAIL_BY_ID);
|
||||
stmt.AddValue(0, returnToSender.MailID);
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_MAIL_ITEM_BY_ID);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CharStatements.DEL_MAIL_ITEM_BY_ID);
|
||||
stmt.AddValue(0, returnToSender.MailID);
|
||||
trans.Append(stmt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user