Ejemplo n.º 1
0
        private static REWARDTYPE GetRewardType(string dropItem)
        {
            REWARDTYPE type = REWARDTYPE.OTHER;

            if (dropItem.Contains("Rune") && !dropItem.Contains("Rune Piece"))
            {
                type = REWARDTYPE.RUNE;
            }
            else if (dropItem.Contains("Grindstone"))
            {
                type = REWARDTYPE.GRINDSTONE;
            }
            else if (dropItem.Contains("Enchanted Gem"))
            {
                type = REWARDTYPE.ENCHANTEDGEM;
            }
            else if (dropItem.Contains("Summoning Stone"))
            {
                type = REWARDTYPE.SUMMONSTONE;
            }
            else if (dropItem.Contains("Mystical Scroll"))
            {
                type = REWARDTYPE.MYSTICALSCROLL;
            }

            return(type);
        }
Ejemplo n.º 2
0
        public static Reward GetReward(RunResult runResult)
        {
            Reward reward = null;

            REWARDTYPE type = GetRewardType(runResult.Drop);

            switch (type)
            {
            case REWARDTYPE.RUNE:
                reward = new Rune.RuneBuilder().Grade(runResult.Grade).Set(runResult.Set).Slot(runResult.Slot).
                         Rarity(runResult.Rarity).MainStat(runResult.MainStat).PrefixStat(runResult.PrefixStat).
                         SubStat1(runResult.SubStat1).SubStat2(runResult.SubStat2).SubStat3(runResult.SubStat3).
                         SubStat4(runResult.SubStat4).Build();
                break;

            case REWARDTYPE.GRINDSTONE:
                reward = new GrindStone(runResult.Set, runResult.MainStat, runResult.SubStat1, runResult.SubStat2);
                break;

            case REWARDTYPE.ENCHANTEDGEM:
                reward = new EnchantedGem(runResult.Set, runResult.MainStat, runResult.SubStat1, runResult.SubStat2);
                break;

            default:
                //throw new NotImplementedException();
                reward = new Reward(runResult.Drop, type);
                break;
            }

            return(reward);
        }
Ejemplo n.º 3
0
        private void BtnAddGemStoneFilter_Click(object sender, RoutedEventArgs e)
        {
            REWARDTYPE type     = (REWARDTYPE)cbType.SelectedItem;
            RUNESET    set      = (RUNESET)cbSet.SelectedItem;
            string     mainStat = (string)cbMainStat.SelectedItem;
            RARITY     rarity   = (RARITY)cbRarity.SelectedItem;

            List <GemStone> list = (List <GemStone>)lvGemStoneList.ItemsSource;

            if (type == REWARDTYPE.GRINDSTONE)
            {
                GrindStone grindStone = new GrindStone(set, mainStat, rarity);
                list.Add(grindStone);
            }
            else
            {
                EnchantedGem enchantedGem = new EnchantedGem(set, mainStat, rarity);
                list.Add(enchantedGem);
            }

            lvGemStoneList.ItemsSource = null;
            lvGemStoneList.ItemsSource = list;
        }
Ejemplo n.º 4
0
 public Reward(string dropItem, REWARDTYPE type)
 {
     Drop = dropItem;
     Type = type;
     SetQuantity(dropItem);
 }