public void UpdateBuffBans() { this.BuffBans.Clear(); using (QueryResult queryResult = DbExt.QueryReader(this.database, "SELECT * FROM BuffBans", new object[0])) { while (queryResult != null && queryResult.Read()) { BuffBan buffBan = new BuffBan(queryResult.Get <int>("BuffID")); buffBan.SetAllowedGroups(queryResult.Get <string>("AllowedGroups")); this.BuffBans.Add(buffBan); } } }
public static QueryResult RunSql(string sql, object[] args = null) { return(args == null?DbExt.QueryReader(TShock.DB, sql) : DbExt.QueryReader(TShock.DB, sql, args)); }