Beispiel #1
0
 public SnowTarget(Mobile thrower, SnowPile snow) : base(10, false, TargetFlags.None)
 {
     m_Thrower = thrower;
     m_Snow    = snow;
 }
Beispiel #2
0
		public override bool OnDragDrop( Mobile from, Item dropped )
		{
			BankBox box = from.BankBox;
			if ( box == null )
				return false;

			if ( dropped is HolidayDeed )
			{
				if(message != null)
					SayTo(from, message);
				Item random = null;
				int randomitem = Utility.RandomMinMax(0, 3);

                if (randomitem == 0)
                {
                    random = new Snowman();
                    random.Name = "snowman";
                }

				if(randomitem == 1)
					random = new SnowPile();

				if(randomitem == 2)
					random = new EternalEmbers();

				if(randomitem == 3)
				{
					if(Utility.RandomBool() )
						random = new RedPoinsettia();
					else
						random = new WhitePoinsettia();

                    random.Name = "poinsettia";
				}

				Item roast = new RoastPig();
                roast.Name = "roast pig";

				Item candle = new CandleLong();
                candle.Name = "candle";
				candle.Hue = Utility.RandomList(0, 3343, 72, 7, 1274, 53);

				Item cookie = new Cookies();
                cookie.Name = "Christmas cookies";

				GiftBox Giftbox = new GiftBox();

                string year = DateTime.Now.Year.ToString();
                string Signature = "Christmas " + year;

                Giftbox.Name = Signature;

                roast.Name += " - " + Signature;
				Giftbox.DropItem(roast);
                candle.Name += " - " + Signature;
				Giftbox.DropItem(candle);
                random.Name += " - " + Signature;
				Giftbox.DropItem(random);
                cookie.Name += " - " + Signature;
				Giftbox.DropItem(cookie);

				//drop it all to bank
				// Adam: This method fails if the bank is full!
				// box.TryDropItem( from, Giftbox, false );
				// this one won't 
				box.AddItem( Giftbox );

				//delete deed.
				dropped.Delete();
				return true;
			}
			else //if not a holiday deed dont accept anything
				return false;
		}
Beispiel #3
0
		public SnowTarget( Mobile thrower, SnowPile snow ) : base ( 10, false, TargetFlags.None ) 
		{ 
			m_Thrower = thrower; 
			m_Snow=snow;
		}