Exemple #1
0
        // Loot is DDC-based, can export multiple rows
        public static string Loot(LootPage loot)
        {
            Logger.Log($"Export: Called Loot with profile: '{Profile.Active.Name}' - Revision {Profile.Active.Revision}");
            // Loot table names are relative to a setting, use special table name in gtk
            string sp = ((ComboBoxItem)loot.lootTypeCb.SelectedValue).Content.ToString();

            // Loot supports multiple rows per "creation", hence the loop
            string sql = String.Empty;

            foreach (LootRowControl row in loot.lootRowSp.Children)
            {
                int entry = 0;
                try // Loot has an unusual system, need to manually parse the int
                {
                    entry = int.Parse(loot.entryTb.Text);
                }
                catch
                {
                    Logger.Log("Target Entry ID was not a numeric value.", Logger.Status.Error, true);
                    return(""); // export/save won't happen
                }

                sql += GenerateSql(new List <ExpKvp>()
                {
                    new ExpKvp("Entry", entry, C.Loot, sp),
                    new ExpKvp("Item", row.Item, C.Loot, sp),
                    new ExpKvp("Chance", row.Chance, C.Loot, sp),
                    new ExpKvp("QuestRequired", row.QuestRequired, C.Loot, sp),
                    new ExpKvp("MinCount", row.MinCount, C.Loot, sp),
                    new ExpKvp("MaxCount", row.MaxCount, C.Loot, sp),
                }) + Environment.NewLine;
            }

            // todo: Custom fields not supported for Loot
            return(sql);
        }
Exemple #2
0
 public ARunner()
 {
     webDriver.Manage().Window.Maximize();
     lootPage = new LootPage(webDriver);
 }
Exemple #3
0
 public string GenerateQuery(LootPage loot)
 {
     throw new NotImplementedException();
 }