Exemplo n.º 1
0
        public static void AddVendorInfo(vendor_info info)
        {
            if (info.NpcID == 0 || info.SetID == 0)
                return;

            var old = (from d in DB.LEGACY.vendor_info where d.SetID == info.SetID && d.NpcID == info.NpcID select d).SingleOrDefault();
            if (old == null)
            {
                DB.LEGACY.vendor_info.Add(info);
                DB.LSave();
            }
        }
Exemplo n.º 2
0
 public static void DeleteVendorInfo(vendor_info info)
 {
     var old = (from d in DB.LEGACY.vendor_info where d.SetID == info.SetID && d.NpcID == info.NpcID select d).SingleOrDefault();
     if (old != null)
     {
         DB.LEGACY.vendor_info.Remove(old);
         DB.LSave();
     }
 }