Exemple #1
0
 private void ItemTapped(object sender, TappedRoutedEventArgs e)
 {
     if (sender is Grid)
     {
         Grid g  = (Grid)sender;
         int  id = (int)g.Tag;
         Item i  = MHDatabaseHelper.GetItemSync(id);
         if (i.type.Equals("Weapon"))
         {
             Frame.Navigate(typeof(WeaponDetailsPage), i._id);
         }
         else if (i.type.Equals("Armor"))
         {
             Frame.Navigate(typeof(ArmorDetailsPage), i._id);
         }
         else if (i.type.Equals("Decoration"))
         {
             Frame.Navigate(typeof(DecorationDetailsPage), i._id);
         }
         else
         {
             Frame.Navigate(typeof(ItemDetailsPage), i._id);
         }
     }
 }
Exemple #2
0
 async void LoadData()
 {
     if (CaravanQuests == null)
     {
         CaravanQuests = (from item in (await MHDatabaseHelper.GetAllQuestsForHub("Caravan"))
                          group item by item.stars into questGroup
                          select new QuestHubGroup(questGroup)
         {
             Stars = questGroup.Key
         }).ToList();
     }
     if (GuildQuests == null)
     {
         GuildQuests = (from item in (await MHDatabaseHelper.GetAllQuestsForHub("Guild"))
                        group item by item.stars into questGroup
                        select new QuestHubGroup(questGroup)
         {
             Stars = questGroup.Key
         }).ToList();
     }
     if (EventQuests == null)
     {
         EventQuests = (from item in (await MHDatabaseHelper.GetAllQuestsForHub("Event"))
                        group item by item.stars into questGroup
                        select new QuestHubGroup(questGroup)
         {
             Stars = questGroup.Key
         }).ToList();
     }
 }
 async void LoadData()
 {
     if (SkillTrees == null)
     {
         SkillTrees = await MHDatabaseHelper.GetAllSkillTrees();
     }
 }
Exemple #4
0
 async void LoadData()
 {
     if (Combinations == null)
     {
         Combinations = await MHDatabaseHelper.GetAllCombinations();
     }
 }
 async void LoadData()
 {
     if (AllItems == null)
     {
         AllItems = await MHDatabaseHelper.GetAllItems();
     }
 }
 public async void LoadData()
 {
     if (Trades == null)
     {
         Trades = await MHDatabaseHelper.GetWyporiumTrades();
     }
 }
        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;
            }
        }
 async void LoadData()
 {
     if (Skills == null)
     {
         Skills = await MHDatabaseHelper.GetFelyneSkills();
     }
 }
 async void LoadData()
 {
     //Crazy LINQ queries to setup grouping
     if (BladeArmorGroups == null)
     {
         BladeArmorGroups = (from item in (await MHDatabaseHelper.GetArmorForHunterType("Blade"))
                             group item by item.slot into armorGroup
                             select new ArmorTypeGroup(armorGroup)
         {
             Slot = armorGroup.Key
         }).ToList();
     }
     if (GunnerArmorGroups == null)
     {
         GunnerArmorGroups = (from item in (await MHDatabaseHelper.GetArmorForHunterType("Gunner"))
                              group item by item.slot into armorGroup
                              select new ArmorTypeGroup(armorGroup)
         {
             Slot = armorGroup.Key
         }).ToList();
     }
     if (BothArmorGroups == null)
     {
         BothArmorGroups = (from item in (await MHDatabaseHelper.GetArmorForHunterType("Both"))
                            group item by item.slot into armorGroup
                            select new ArmorTypeGroup(armorGroup)
         {
             Slot = armorGroup.Key
         }).ToList();
     }
 }
 async void LoadData()
 {
     if (Monsters == null)
     {
         Monsters = await MHDatabaseHelper.GetAllLargeMonsters();
     }
     if (SmallMonsters == null)
     {
         SmallMonsters = await MHDatabaseHelper.GetAllSmallMonsters();
     }
 }
Exemple #11
0
        async void LoadData(int id)
        {
            if (Monster == null)
            {
                Monster = await MHDatabaseHelper.GetMonster(id);
            }
            if (Damages == null)
            {
                Damages = await MHDatabaseHelper.GetMonsterDamageForMonster(id);
            }
            if (Statuses == null)
            {
                Statuses = await MHDatabaseHelper.GetMonsterStatusForMonster(id);
            }

            if (Habitats == null)
            {
                Habitats = await MHDatabaseHelper.GetHabitatForMonster(id);
            }

            //Crazy LINQ queries that get the hunting rewards grouped by condition.
            if (LowHuntingRewardGroup == null)
            {
                LowHuntingRewardGroup = (from item in (await MHDatabaseHelper.GetHuntingRewardsForMonsterRank(id, "LR"))
                                         group item by item.condition into huntGroup
                                         select new HuntingRewardGroup(huntGroup)
                {
                    Condition = huntGroup.Key
                }).ToList();
            }
            if (HighHuntingRewardGroup == null)
            {
                HighHuntingRewardGroup = (from item in (await MHDatabaseHelper.GetHuntingRewardsForMonsterRank(id, "HR"))
                                          group item by item.condition into huntGroup
                                          select new HuntingRewardGroup(huntGroup)
                {
                    Condition = huntGroup.Key
                }).ToList();
            }
            if (GHuntingRewardGroup == null)
            {
                GHuntingRewardGroup = (from item in (await MHDatabaseHelper.GetHuntingRewardsForMonsterRank(id, "G"))
                                       group item by item.condition into huntGroup
                                       select new HuntingRewardGroup(huntGroup)
                {
                    Condition = huntGroup.Key
                }).ToList();
            }

            if (Quests == null)
            {
                Quests = await MHDatabaseHelper.GetQuestsForMonster(id);
            }
        }
Exemple #12
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);
     }
 }
 async void LoadData(int id)
 {
     if (Quest == null)
     {
         Quest = await MHDatabaseHelper.GetQuest(id);
     }
     if (Monsters == null)
     {
         Monsters = await MHDatabaseHelper.GetMonstersForQuest(id);
     }
     if (Rewards == null)
     {
         Rewards = (from item in (await MHDatabaseHelper.GetQuestRewardsForQuest(id))
                    group item by item.reward_slot into rewardGroup
                    select new RewardGroup(rewardGroup)
         {
             Slot = rewardGroup.Key
         }).ToList();
     }
 }
        private void textName_Tapped(object sender, TappedRoutedEventArgs e)
        {
            TextBlock tb = (TextBlock)e.OriginalSource;
            int       id = (int)tb.Tag;
            Item      i  = MHDatabaseHelper.GetItemSync(id);

            if (i.type.Equals("Weapon"))
            {
                Frame.Navigate(typeof(WeaponDetailsPage), i._id);
            }
            else if (i.type.Equals("Armor"))
            {
                Frame.Navigate(typeof(ArmorDetailsPage), i._id);
            }
            else if (i.type.Equals("Decoration"))
            {
                Frame.Navigate(typeof(DecorationDetailsPage), i._id);
            }
            else
            {
                Frame.Navigate(typeof(ItemDetailsPage), i._id);
            }
        }
 public async void LoadData(long id)
 {
     if (Item == null)
     {
         Item = await MHDatabaseHelper.GetItem(id);
     }
     if (Components == null)
     {
         Components = await MHDatabaseHelper.GetComponentsForComponent(id);
     }
     if (Monsters == null)
     {
         Monsters = await MHDatabaseHelper.GetHuntingRewardsForItem(id);
     }
     if (Gathering == null)
     {
         Gathering = await MHDatabaseHelper.GetGatheringRewardsForItem(id);
     }
     if (Quests == null)
     {
         Quests = await MHDatabaseHelper.GetQuestRewardsForItem(id);
     }
 }
        async void LoadData(int id)
        {
            if (Skills == null)
            {
                Skills = await MHDatabaseHelper.GetSkillsForSkillTree(id);
            }
            if (SkillTree == null)
            {
                SkillTree = await MHDatabaseHelper.GetSkillTree(id);
            }

            //TODO:Probably can make this better
            if (HeadArmor == null)
            {
                HeadArmor = await MHDatabaseHelper.GetArmorForSkillTree(id, "Head");
            }
            if (BodyArmor == null)
            {
                BodyArmor = await MHDatabaseHelper.GetArmorForSkillTree(id, "Body");
            }
            if (ArmsArmor == null)
            {
                ArmsArmor = await MHDatabaseHelper.GetArmorForSkillTree(id, "Arms");
            }
            if (WaistArmor == null)
            {
                WaistArmor = await MHDatabaseHelper.GetArmorForSkillTree(id, "Waist");
            }
            if (LegsArmor == null)
            {
                LegsArmor = await MHDatabaseHelper.GetArmorForSkillTree(id, "Legs");
            }
            if (Decorations == null)
            {
                Decorations = await MHDatabaseHelper.GetDecorationsForSkillTree(id);
            }
        }
        public async void LoadData()
        {
            var weapons = await MHDatabaseHelper.GetWeaponsByType(WeaponType);

            WeaponTree = WeaponTreeEntry.GenerateTree(weapons);
        }