Core/DB: Fixes sometimes wrong values added to DB, also fixes errors when trying to convert updatefield to object.

This commit is contained in:
hondacrx
2021-04-21 18:06:46 -04:00
parent 897ca11273
commit ba064327b0
30 changed files with 149 additions and 89 deletions
+4 -4
View File
@@ -129,7 +129,7 @@ namespace Game.Chat.Commands
PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.SEL_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, disableType);
stmt.AddValue(1, (byte)disableType);
SQLResult result = DB.World.Query(stmt);
if (!result.IsEmpty())
{
@@ -139,7 +139,7 @@ namespace Game.Chat.Commands
stmt = DB.World.GetPreparedStatement(WorldStatements.INS_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, disableType);
stmt.AddValue(1, (byte)disableType);
stmt.AddValue(2, flags);
stmt.AddValue(3, disableComment);
DB.World.Execute(stmt);
@@ -261,7 +261,7 @@ namespace Game.Chat.Commands
PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.SEL_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, disableType);
stmt.AddValue(1, (byte)disableType);
SQLResult result = DB.World.Query(stmt);
if (result.IsEmpty())
{
@@ -271,7 +271,7 @@ namespace Game.Chat.Commands
stmt = DB.World.GetPreparedStatement(WorldStatements.DEL_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, disableType);
stmt.AddValue(1, (byte)disableType);
DB.World.Execute(stmt);
handler.SendSysMessage("Remove Disabled {0} (Id: {1})", disableTypeStr, entry);