public void RemoveLootDropEntry(LootDropEntry entry) { if (CreatedObj) { if (!NeedsInserted.Contains(entry)) { NeedsDeleted.Add(entry); } else { NeedsInserted.Remove(entry); } } _entries.Remove(entry); }
public LootDropEntry Create() { var entry = new LootDropEntry(_connection, _queryConfig); entry.LootDropId = Id; entry.Created(); return entry; }
public void Lookup(int id) { _id = id; var sql = String.Format(SelectString, SelectArgValues); var results = QueryHelper.TryRunQuery(_connection, sql); foreach (var row in results) { var entry = new LootDropEntry(_connection, _queryConfig); entry.SetProperties(Queries, row); entry.Created(); AddLootDropEntry(entry); } if (results.Count > 0 && results.ElementAt(0).ContainsKey("name")) { Name = results.ElementAt(0)["name"].ToString(); } Created(); }
public void AddLootDropEntry(LootDropEntry entry) { if (Entries.Count(x => x.ItemId == entry.ItemId && x.LootDropId == entry.LootDropId) > 0) { return; } if (CreatedObj) { NeedsInserted.Add(entry); } _entries.Add(entry); }