public CompiledMysteriousTraderShop(MysteriousTraderShopManager shopBuilder)
        {
            //FillRarity(MysteriousTraderItemRarity.NonUnique, shopBuilder);
            FillRarity(MysteriousTraderItemRarity.Common, shopBuilder);
            FillRarity(MysteriousTraderItemRarity.Rare, shopBuilder);
            FillRarity(MysteriousTraderItemRarity.Legendary, shopBuilder);

            AnyCall = shopBuilder.AnyCall;

            if (Instance == null)
            {
                Instance = this;
            }
        }
Exemple #2
0
        static MysteriousTraderShopManager()
        {
            Instance = new MysteriousTraderShopManager();

            MyRegisterItem(ItemID.TruffleWorm, MysteriousTraderItemRarity.Legendary, () => NPC.downedPlantBoss && !NPC.downedFishron);
            MyRegisterItem(ItemID.RodofDiscord, MysteriousTraderItemRarity.Legendary, () => NPC.downedMechBossAny);
            MyRegisterItem(ItemID.Arkhalis, MysteriousTraderItemRarity.Legendary, () => NPC.downedBoss1);

            MyRegisterItem(ItemID.SittingDucksFishingRod, MysteriousTraderItemRarity.Rare, () => NPC.downedBoss3);
            MyRegisterItem(ItemID.PulseBow, MysteriousTraderItemRarity.Rare, () => NPC.downedPlantBoss);
            MyRegisterItem(ItemID.AnkletoftheWind, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.AmmoBox, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.CelestialMagnet, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.MagicHat, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.StaffofRegrowth, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.BlizzardinaBalloon, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.SandstorminaBalloon, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.CloudinaBalloon, MysteriousTraderItemRarity.Rare);
            MyRegisterItem(ItemID.WhoopieCushion, MysteriousTraderItemRarity.Rare);

            MyRegisterItem(ItemID.BandofRegeneration, MysteriousTraderItemRarity.Common);
            MyRegisterItem(ItemID.Aglet, MysteriousTraderItemRarity.Common);

            MyRegisterItem(ItemID.DPSMeter, MysteriousTraderItemRarity.Common);
            MyRegisterItem(ItemID.LifeformAnalyzer, MysteriousTraderItemRarity.Common);
            MyRegisterItem(ItemID.Stopwatch, MysteriousTraderItemRarity.Common);

            MyRegisterItem(ItemID.ActuationAccessory, MysteriousTraderItemRarity.Common);
            MyRegisterItem(ItemID.PortableCementMixer, MysteriousTraderItemRarity.Common);
            MyRegisterItem(ItemID.ExtendoGrip, MysteriousTraderItemRarity.Common);
            MyRegisterItem(ItemID.BrickLayer, MysteriousTraderItemRarity.Common);

            MyRegisterItem(ItemID.MagicMirror, MysteriousTraderItemRarity.Common);

            MyRegisterItem(ItemID.ShinyRedBalloon, MysteriousTraderItemRarity.Common);
            MyRegisterItem(ItemID.Aglet, MysteriousTraderItemRarity.Common);

            //MyRegisterItem(ItemID.LesserHealingPotion, MysteriousTraderItemRarity.NonUnique, new Func<bool>(() => !Main.hardMode));
            //MyRegisterItem(ItemID.HealingPotion, MysteriousTraderItemRarity.NonUnique, new Func<bool>(() => Main.hardMode));
        }
 private void FillRarity(MysteriousTraderItemRarity rarity, MysteriousTraderShopManager shopBuilder)
 {
     ItemCollections[rarity] = shopBuilder.Items.Where(k => k.Value == rarity).ToDictionary(k => k.Key).Keys.ToList();
 }