示例#1
0
		private void Process( Mobile from )
		{
			Item rewardItem;

            switch( m_Skill.SkillID )
			{
				case 0: // alchemy
					rewardItem = new MortarPestle();
					break;
				case 7: // Blacksmithy
					rewardItem = new GMSmithHammer();
					break;
				case 8: // Bowcraft/fletching
					rewardItem = new Bow();
					break;
				case 11: // Carpentry
                    switch (m_Itemid)
                    {
                        case 4138:
                            rewardItem = new Hammer();
                            break;
                        case 4148:
                            rewardItem = new Saw();
                            break;
                        case 4146:
                            rewardItem = new SmoothingPlane();
                            break;
                        case 4325:
                            rewardItem = new Froe();
                            break;
                        case 4326:
                            rewardItem = new Inshave();
                            break;
                        case 4324:
                            rewardItem = new DrawKnife();
                            break;
                        default:
                            return;
                    }
			        break;
				case 23: // Inscription
					rewardItem = new ScribesPen();
					break;
				case 25: // Magery
					rewardItem = new Spellbook();
					( rewardItem as Spellbook ).Content = ulong.MaxValue;
                    (rewardItem as Spellbook).LootType = LootType.Blessed;
					break;
				case 34: // Tailoring
					rewardItem = new RewardDyeTub();
					break;
				case 35: // Animal Taming
					rewardItem = new ShepherdsCrook();
					break;
                case 44: //Lumberjacking
			        rewardItem = new Hatchet();
			        break;
                case 45: // Mining
                    rewardItem = new Pickaxe();
                    break;
                //Bardic skills
                case 9:
                case 15:
                case 22:
                case 29:
                    switch (m_Itemid)
                    {
                        case 3740:
                            rewardItem = new Drums();
                            break;
                        case 3761:
                            rewardItem = new Harp();
                            break;
                        case 3762:
                            rewardItem = new LapHarp();
                            break;
                        case 3763:
                            rewardItem = new Lute();
                            break;
                        case 3741:
                            rewardItem = new Tambourine();
                            break;
                        case 3742:
                            rewardItem = new TambourineTassel();
                            break;
                        default:
                            return;
                    }
			        break;
                //"Thieving" skills
                case 21:
                case 28:
                case 33:
                case 47:
			        rewardItem = new Cloak();
			        break;
				default:
					return;
			}

			rewardItem.Hue = m_CurrentHue;
			rewardItem.LootType = LootType.Blessed;

			if( m_Name != "" )
				rewardItem.Name = m_Name;

			if( rewardItem is RewardDyeTub )
			{
				var tub = (RewardDyeTub)rewardItem;
				tub.DyedHue = rewardItem.Hue;
                tub.Redyable = false;
                tub.LootType = LootType.Blessed;
                tub.Owner = from;

			}
			else if( rewardItem is GMSmithHammer )
			{
				var hammer = (GMSmithHammer)rewardItem;
				hammer.Owner = from;
			}

			from.AddToBackpack( rewardItem );

			// Log
			RewardLogging.WriteLine( from, m_Skill, m_Name, m_CurrentHue );
		}
        public static void CreateItem(ItemInfo info, Mobile m)
        {
            if (m == null)
                return;

            Item item = null;
            BaseCreature bc = null;
            switch (info.IncrID)
            {
                case 0: item = new BlackPearl(999); break;
                case 1: item = new Bloodmoss(999); break;
                case 2: item = new MandrakeRoot(999); break;
                case 3: item = new Garlic(999); break;
                case 4: item = new Ginseng(999); break;
                case 5: item = new Nightshade(999); break;
                case 6: item = new SpidersSilk(999); break;
                case 7: item = new SulfurousAsh(999); break;
                case 8: item = new Bag();
                        ((Bag)item).DropItem( new BlackPearl(100) );
                        ((Bag)item).DropItem( new Bloodmoss(100) );
                        ((Bag)item).DropItem( new MandrakeRoot(100) );
                        ((Bag)item).DropItem( new Garlic(100) );
                        ((Bag)item).DropItem( new Ginseng(100) );
                        ((Bag)item).DropItem( new Nightshade(100) );
                        ((Bag)item).DropItem( new SpidersSilk(100) );
                        ((Bag)item).DropItem( new SulfurousAsh(100) );
                        break;
                case 9: item = new BatWing(999); break;
                case 10: item = new GraveDust(999); break;
                case 11: item = new DaemonBlood(999); break;
                case 12: item = new NoxCrystal(999); break;
                case 13: item = new PigIron(999); break;
                case 14: item = new Bag();
                        ((Bag)item).DropItem( new BatWing(100) );
                        ((Bag)item).DropItem( new GraveDust(100) );
                        ((Bag)item).DropItem( new DaemonBlood(100) );
                        ((Bag)item).DropItem( new NoxCrystal(100) );
                        ((Bag)item).DropItem( new PigIron(100) );
                        break;
                case 15: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new RefreshPotion();
                        break;
                case 16: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new LesserCurePotion();
                        break;
                case 17: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new LesserHealPotion();
                        break;
                case 18: for (int i=0; i < 2; i++) //The last potion is dropped later
                        {
                            item = new RefreshPotion();
                            m.AddToBackpack(item);
                        }
                        item = new NightSightPotion();
                        break;
                case 19: item = new Bandage(50); break;
                case 20: item = new Bandage(200); break;
                case 21: item = new Bandage(1000); break;
                case 22: item = new Arrow(100); break;
                case 23: item = new Arrow(1000); break;
                case 24: item = new Bolt(100); break;
                case 25: item = new Bolt(1000); break;
                case 26: bc = new Horse(); break;
                case 27: bc = new PackLlama(); break;
                case 28: item = new Club();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 29: item = new WarFork();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 30: item = new Katana();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 31: item = new Bow();
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 32: item = new MetalKiteShield();
                        BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 33: item = new WoodenShield();
                        BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 34: item = new LeatherChest();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 35: item = new LeatherGloves();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 36: item = new LeatherGorget();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 37: item = new LeatherLegs();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 38: item = new LeatherCap();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 39: item = new LeatherArms();
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
                        break;
                case 40: item = new Gold(300); break;
                case 41: item = new Gold(3000); break;
                case 42: item = new Server.Engines.BulkOrders.BulkOrderBook(); break;
                case 43: item = new Drums();
                        ((BaseInstrument)item).Quality = InstrumentQuality.Exceptional;
                        break;
                case 44: item = new TambourineTassel();
                        ((BaseInstrument)item).Quality = InstrumentQuality.Exceptional;
                        break;
                case 45: item = new Server.Multis.SmallDragonBoatDeed(); break;
                case 46: item = new Server.Multis.LargeDragonBoatDeed(); break;
            }

            if (item != null)
            {
                m.AddToBackpack(item);
                m.SendMessage("Here are the goods you requested.");
            }
            else if (bc != null)
            {
                bc.Controlled = true;
                bc.ControlMaster = m;
                bc.MoveToWorld( m.Location, m.Map );
                m.SendMessage("Here is the pet you requested.");
            }
            else
            {
                m.SendMessage("That item is not available. Please report the bug at the site that will open in your browser.");
                m.LaunchBrowser( "http://bug.casiopia.net/" );
                m.AddToBackpack( new VeriteGem(info.Price) );
            }
        }