コード例 #1
0
        private Item GiveAward()
        {
            if (0.05 > Utility.RandomDouble())
            {
                switch (Utility.Random(4))
                {
                case 0: return(new ExpiredVoucher());

                case 1: return(new ForgedArtwork());

                case 2: return(new LittleBlackBook());

                case 3: return(new SlimsShadowVeil());
                }
            }

            switch (Utility.Random(3))
            {
            default:
            case 0:
                return(new Skeletonkey());

            case 1:
                Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(false, false, true);

                int min, max;
                TreasureMapChest.GetRandomItemStat(out min, out max, 1.0);

                RunicReforging.GenerateRandomItem(item, 0, min, max, Map);
                return(item);

            case 2:
                return(ScrollOfTranscendence.CreateRandom(1, 10));
            }
        }
コード例 #2
0
        public virtual void Fill()
        {
            Reset();

            List <Item> contains = new List <Item>(Items);

            foreach (Item item in contains)
            {
                item.Delete();
            }

            ColUtility.Free(contains);

            for (int i = 0; i < Utility.RandomMinMax(6, 12); i++)
            {
                DropItem(Loot.RandomGem());
            }

            DropItem(new Gold(Utility.RandomMinMax(800, 1100)));

            if (0.1 > Utility.RandomDouble())
            {
                DropItem(new StasisChamberPowerCore());
            }

            if (0.1 > Utility.RandomDouble())
            {
                DropItem(new CardOfSemidar((CardOfSemidar.CardType)Utility.RandomMinMax(0, 5)));
            }

            if (0.25 > Utility.RandomDouble())
            {
                DropItem(new InoperativeAutomatonHead());
            }

            if (0.1 > Utility.RandomDouble() && Server.Engines.Points.PointsSystem.TreasuresOfKotlCity.Enabled)
            {
                Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(this), LootPackEntry.IsMondain(this), LootPackEntry.IsStygian(this));

                if (item != null)
                {
                    int min, max;

                    TreasureMapChest.GetRandomItemStat(out min, out max, 1.0);

                    RunicReforging.GenerateRandomItem(item, null, Utility.RandomMinMax(min, max), 0, ReforgedPrefix.None, ReforgedSuffix.Kotl, Map);

                    DropItem(item);
                }
            }

            if (0.25 > Utility.RandomDouble())
            {
                Item item;

                switch (Utility.Random(8))
                {
                default:
                case 0: item = new JournalDrSpector1(); break;

                case 1: item = new JournalDrSpector2(); break;

                case 2: item = new JournalDrSpector3(); break;

                case 3: item = new JournalDrSpector4(); break;

                case 4: item = new HistoryOfTheGreatWok1(); break;

                case 5: item = new HistoryOfTheGreatWok2(); break;

                case 6: item = new HistoryOfTheGreatWok3(); break;

                case 7: item = new HistoryOfTheGreatWok4(); break;
                }

                DropItem(item);
            }
        }