public void CreateRank(string name, GuildRankRights rights) { if (RankList.Count() == MaxRanks) { return; } uint newRankId = (uint)RankList.Count(); Rank rank = new Rank() { RankId = newRankId, Name = name, Rights = (uint)rights, BankMoneyPerDay = 0, Order = newRankId }; RankList.Add(rank); PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.GuildInsBankRightDefault); for (var i = 0; i < GetBankTabSize(); ++i) { stmt.AddValue(0, Guid); stmt.AddValue(1, i); stmt.AddValue(2, newRankId); DB.Characters.Execute(stmt); stmt.Clear(); } rank.SaveToDB(Guid); }