public void AddLootSet(long id, string comment)
 {
     loot_set set = new loot_set();
     set.Entry = id;
     set.MinCount = 1;
     set.MaxCount = 1;
     set.Mode = 1;
     set.Comment = comment;
     LootInfoSet.Add(set);
 }
 public void DeleteLootSet(loot_set set)
 {
     DataProcessor.DeleteLootSet(set);
     if (LootInfoSet != null)
         LootInfoSet.Remove(set);
 }
Ejemplo n.º 3
0
 public static void DeleteLootSet(loot_set set)
 {
     var old = (from d in DB.LEGACY.loot_set where d.Entry == set.Entry && d.Item == set.Item select d).SingleOrDefault();
     if (old != null)
     {
         DB.LEGACY.loot_set.Remove(old);
         DB.LSave();
     }
 }
Ejemplo n.º 4
0
        public static void CreateCreatureLootInfo(int creature, int setID, int item, float chance, int group, string name)
        {
            var old = (from d in DB.LEGACY.loot_set where d.Entry == setID && d.Item == item select d).SingleOrDefault();
            if (old != null)
            {
                DB.LEGACY.loot_set.Remove(old);
                DB.LSave();
            }

            var oldName = (from d in DB.LEGACY.loot_set_name where d.SetID == setID select d).SingleOrDefault();
            if (oldName == null)
            {
                loot_set_name setName = new loot_set_name();
                setName.Category = 17;
                setName.SetID = setID;
                setName.Name = name;
                DB.LEGACY.loot_set_name.Add(setName);
                DB.LSave();
            }

            loot_set set = new loot_set();
            set.Entry = setID;
            set.Chance = chance;
            set.GroupID = group;
            set.Item = item;
            set.MaxCount = 1;
            set.MaxLooterLevel = 0;
            set.MaxTargetLevel = 0;
            set.MinCount = 1;
            set.MinLooterLevel = 0;
            set.MinMF = 0;
            set.MinTargetLevel = 0;
            set.Mode = 1;
            set.Quest = 0;
            SaveLootSet(set);

            loot_info_creature loot_info = new loot_info_creature();
            loot_info.Entry = creature;
            loot_info.SetID = set.Entry;
            loot_info.Chance = 100.0f;
            SaveCreatureLoot(loot_info);
        }