Exemplo n.º 1
0
 public void RemoveLootDropEntry(LootDropEntry entry)
 {
     if (CreatedObj)
     {
         if (!NeedsInserted.Contains(entry))
         {
             NeedsDeleted.Add(entry);
         }
         else
         {
             NeedsInserted.Remove(entry);
         }
     }
     _entries.Remove(entry);
 }
Exemplo n.º 2
0
 public LootDropEntry Create()
 {
     var entry = new LootDropEntry(_connection, _queryConfig);
     entry.LootDropId = Id;
     entry.Created();
     return entry;
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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);
        }