async void LoadData(int id)
        {
            if (Weapon == null)
            {
                Weapon = await MHDatabaseHelper.GetWeapon(id);
            }
            if (Melodies == null && Weapon.wtype.Equals("Hunting Horn"))
            {
                Melodies = await MHDatabaseHelper.GetHornMelodies(Weapon.horn_notes);
            }
            if (Components == null)
            {
                Components = await MHDatabaseHelper.GetComponentsForItem(id);
            }
            if (WeaponFamily == null)
            {
                List <Weapon> w        = MHDatabaseHelper.GetWeaponParents(id);
                List <Weapon> upgrades = await MHDatabaseHelper.GetWeaponChildren(id);

                foreach (Weapon wep in upgrades)
                {
                    wep.final = 1;
                }
                w.AddRange(upgrades);
                if (upgrades.Count == 0)
                {
                    w[w.Count - 1].final = 1;
                }
                WeaponFamily = w;
            }
        }
Exemple #2
0
 async void LoadData(int id)
 {
     if (Armor == null)
     {
         Armor = await MHDatabaseHelper.GetArmor(id);
     }
     if (Components == null)
     {
         Components = await MHDatabaseHelper.GetComponentsForItem(id);
     }
     if (Skills == null)
     {
         Skills = await MHDatabaseHelper.GetSkillTreesForItem(id);
     }
 }
 async void LoadData(int id)
 {
     if (Decoration == null)
     {
         Decoration = await MHDatabaseHelper.GetDecoration(id);
     }
     if (Components == null)
     {
         Components = await MHDatabaseHelper.GetComponentsForItem(id);
     }
     if (Skills == null)
     {
         Skills = await MHDatabaseHelper.GetSkillTreesForItem(id);
     }
 }