diff --git a/WowPacketParser/SQL/QueryBuilder.cs b/WowPacketParser/SQL/QueryBuilder.cs index e2b27306cd..aaa6f2593b 100644 --- a/WowPacketParser/SQL/QueryBuilder.cs +++ b/WowPacketParser/SQL/QueryBuilder.cs @@ -347,7 +347,7 @@ public virtual string Build() query.Append(SQLUtil.AddBackQuotes(field.Item3.First().Name + (field.Item3.First().StartAtZero ? i : i+1))); query.Append("="); - query.Append(SQLUtil.ToSQLValue(v, noQuotes: field.Item3.Any(a => a.NoQuotes))); + query.Append(SQLUtil.ToSQLValue(v, v.GetType().GetCustomAttribute() != null, field.Item3.Any(a => a.NoQuotes))); query.Append(SQLUtil.CommaSeparator); hasValues = true; @@ -363,7 +363,7 @@ public virtual string Build() query.Append(field.Item1); query.Append("="); - query.Append(SQLUtil.ToSQLValue(value, noQuotes: field.Item3.Any(a => a.NoQuotes))); + query.Append(SQLUtil.ToSQLValue(value, value.GetType().GetCustomAttribute() != null, field.Item3.Any(a => a.NoQuotes))); query.Append(SQLUtil.CommaSeparator); } if (!hasValues) @@ -566,14 +566,14 @@ public string Build() query.Append("UNKNOWN"); } else - query.Append(SQLUtil.ToSQLValue(v, noQuotes: field.Item3.Any(a => a.NoQuotes))); + query.Append(SQLUtil.ToSQLValue(v, v.GetType().GetCustomAttribute() != null, field.Item3.Any(a => a.NoQuotes))); query.Append(SQLUtil.CommaSeparator); } } else { - query.Append(SQLUtil.ToSQLValue(value, noQuotes: field.Item3.Any(a => a.NoQuotes == true))); + query.Append(SQLUtil.ToSQLValue(value, value.GetType().GetCustomAttribute() != null, field.Item3.Any(a => a.NoQuotes == true))); query.Append(SQLUtil.CommaSeparator); } }