当前位置: 首页>>代码示例>>C#>>正文


C# Gumps.RelayInfo类代码示例

本文整理汇总了C#中Server.Gumps.RelayInfo的典型用法代码示例。如果您正苦于以下问题:C# RelayInfo类的具体用法?C# RelayInfo怎么用?C# RelayInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RelayInfo类属于Server.Gumps命名空间,在下文中一共展示了RelayInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnResponse

        public override void OnResponse( NetState state, RelayInfo info )
        {
            Mobile from = state.Mobile;

            if ( info.ButtonID == 1 )
            {
                if ( m_crop != null && !m_crop.Deleted )
                {
                    if ( m_crop is WheatCrop )
                        ((WheatCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is CottonCrop )
                        ((CottonCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is CarrotCrop )
                        ((CarrotCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is FlaxCrop )
                        ((FlaxCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is LettuceCrop )
                        ((LettuceCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is OnionCrop )
                        ((OnionCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is GarlicCrop )
                        ((GarlicCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is CabbageCrop )
                        ((CabbageCrop)m_crop).UpRoot( m_Owner );
                    else if ( m_crop is CornCrop )
                        ((CornCrop)m_crop).UpRoot( m_Owner );
                }
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:29,代码来源:UpRootGump.cs

示例2: OnResponse

		public override void OnResponse( NetState state, RelayInfo info )
		{
			m_Mobile.SendGump( new PageResponseGump( m_Mobile, m_Name, m_Text ) );

			//m_Mobile.SendMessage( 0x482, "{0} tells you:", m_Name );
			//m_Mobile.SendMessage( 0x482, m_Text );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:7,代码来源:PageQueueGump.cs

示例3: OnResponse

        public override void OnResponse(NetState state, RelayInfo info)
        {
            string bookName = "";
            try
            {
                for (int x = 0; x < 51; x++)
                {
                    bookName = GetString(info, x + 100);
                    if (!(string.IsNullOrEmpty(bookName)) && bookName.Length > 0) Book.Books[x].Name = bookName;
                    else Book.Books[x].Name = string.Format("Book #{0}", ((int)(x + 1)).ToString());
                }
            }
            catch(Exception e)
            {
                Console.WriteLine("Caught Exception in MasterRunebookGump, during the 'for' loop.");
                Console.WriteLine(e.ToString());
            }
            Mobile from = state.Mobile;
            try
            {

                if (info.ButtonID > 0)
                    from.SendGump(new InternalRunebookGump(from, Book.Books[info.ButtonID - 16], Book, info.ButtonID - 16));
            }
            catch (Exception e)
            {
                Console.WriteLine("Caught Exception in MasterRunebookGump, when sending new InternalRunebookGump.");
                Console.WriteLine(e.ToString());
            }
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:30,代码来源:MasterRunebookGump.cs

示例4: OnResponse

		public override void OnResponse(NetState state, RelayInfo info)
		{
			if (duel == null)
				return;

			if (info.ButtonID == (int)Buttons.Button1)
			{

				if (duel.Player1.BankBox == null || duel.Player1.BankBox.GetAmount(typeof(Gold), true) < duel.Wager)
				{
					duel.Player1.SendMessage("Challenge canceled, you don't have enough gold in your bank box");
				}
				else if (duel.MaxDex < duel.Player1.Dex)
				{
					duel.Player1.SendMessage("Challenge canceled, you have too high dex for this challenge.");
				}
				else
				{

					duel.Player1.SendGump(new WaitGump(duel));
					duel.Player2.SendGump(new ChallengedGump(duel));
				}


			}
			else if (info.ButtonID == (int)Buttons.Button2)
			{
				duel.Player1.SendMessage("The challenge has been canceled.");

			}

		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:32,代码来源:ChallengeGump.cs

示例5: OnResponse

        public override void OnResponse( NetState sender, RelayInfo info )
        {
            Item item = m_Addon as Item;

            if ( item == null || item.Deleted )
                return;

            if ( info.ButtonID == (int) Buttons.Confirm )
            {
                Mobile m = sender.Mobile;
                BaseHouse house = BaseHouse.FindHouseAt( m );

                if ( house != null && house.IsOwner( m ) )
                {
                    if ( m.InRange( item.Location, 2 ) )
                    {
                        Item deed = m_Addon.Deed;

                        if ( deed != null )
                        {
                            m.AddToBackpack( deed );
                            house.Addons.Remove( item );
                            item.Delete();
                        }
                    }
                    else
                        m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
                }
                else
                    m.SendLocalizedMessage( 1049784 ); // You can only re-deed this decoration if you are the house owner or originally placed the decoration.
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:32,代码来源:RewardDemolitionGump.cs

示例6: OnResponse

        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile m = sender.Mobile;

            if (info.ButtonID == 1)
            {
                if (m.InRange(m_Healer, 16))
                {
                    if (info.IsSwitched(0) && Banker.Withdraw(m, m_Price))
                    {
                        Timer.DelayCall(TimeSpan.FromSeconds(10.0), new TimerStateCallback(PaidRes), m);
                        m.Frozen = true;
                    }

                    else
                    {
                        m.Resurrect();
                        m.PlaySound(0x214);
                        m.FixedEffect(0x376A, 10, 16);
                    }
                }
                else
                    m.SendMessage("You have wandered to far off to gain any benefits from the healers practices.");
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:25,代码来源:PaidFullHealerGump.cs

示例7: OnResponse

        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (m_Deed.Deleted || !m_Deed.IsChildOf(sender.Mobile.Backpack))
                return;

            switch (info.ButtonID)
            {
                case (int)Buttons.Exit:
                    return;
                case (int)Buttons.Add:
                    m_Deed.BeginCombine(sender.Mobile);
                    return;
                case (int)Buttons.PlaceInHouse:
                    if (m_Deed.NumOfPartsAdded > 0)
                    {
                        m_Deed.PlaceInHouse(sender.Mobile);
                        return;
                    }
                    else
                        sender.Mobile.SendMessage("You cannot add the pentagram to a house without any parts in the deed.");
                    break;
            }

            sender.Mobile.SendGump(new BloodPentagramPartGump(sender.Mobile, m_Deed));
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:25,代码来源:BloodPentagramPartGump.cs

示例8: OnResponse

        public override void OnResponse( NetState state, RelayInfo info )
        {
            Mobile from = state.Mobile;

            if( info.IsSwitched( (int)Buttons.rdoYesJoin ) )
            {
                if( ScavengerSignup.signupEnabled && from is PlayerMobile )
                {
                    ScavengerBasket newBasket = new ScavengerBasket( (PlayerMobile)from );
                    if( !from.Backpack.CheckHold( from, newBasket, false ) )
                    {
                        from.SendMessage( "Your backpack is too full to even consider entering this event!" );
                        newBasket.Delete();
                        return;
                    }

                    from.AddToBackpack( newBasket );
                    ScavengerSignup.ScavengerBaskets.Add( newBasket );
                    from.SendMessage( "You are now entered in the scavenger hunt. Use the supplied basket to gather the scavenger items!" );
                }
                else
                {
                    from.SendMessage( "You have waited too long and signup for the scavenger hunt has ended" );
                }
            }
            else
            {
                from.SendMessage( "You have not been entered into the scavenger hunt event" );
            }
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:30,代码来源:ScavengerSignupGump.cs

示例9: OnResponse

		public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
		{
			if ( info.ButtonID == 2 )
			{
				if ( !m_Pet.Deleted && m_Pet.Controlled && m_From == m_Pet.ControlMaster && m_From.CheckAlive() && m_Pet.CheckControlChance( m_From ) )
				{
					if ( m_Pet.Map == m_From.Map )
					{
						if ( m_RangeCheck == true && !m_Pet.InRange( m_From, 14 ) )
						{
							m_From.SendMessage( "You are too far away from your pet." );
							return;
						}

						m_Pet.ControlTarget = null;
						m_Pet.ControlOrder = OrderType.Release;
						//Pix: added kick to Obey because when we added the ability to release a 'lost'
						// pet, if there were no players around, the pet would not release until a player
						// got in range of the pet.  This wasn't an issue before because there was 
						// a range check involved so there was always a player around when releasing the pet.
						m_Pet.AIObject.Obey();
						BaseHire m_Hire = m_Pet as BaseHire;	//added by Old Salty from here . . .
						if ( m_Hire != null && m_Hire.IsHired ) 
						{
							m_Hire.IsHired = false;
						}										//. . . to here
					}
				}
			}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:30,代码来源:ConfirmReleaseGump.cs

示例10: OnResponse

		public override void OnResponse(NetState state, RelayInfo info)
		{
			Mobile from = state.Mobile;
			
			switch(info.ButtonID)
			{
				default:
				case 0: break;
				case 1: 
					from.SendGump(new StallLeasingGump(from, m_Plot));
					from.SendGump(new BazaarInformationGump(-1, 1150391));
					break;
				case 2: // SEE TOP BIDS
					from.SendGump(new TopBidsGump(from, m_Plot));
					break;
				case 3: // MY STALL LEASE
                    if (m_Plot.IsOwner(from))
                        from.SendGump(new MyStallLeaseGump(from, m_Plot));
                    else
                        from.SendLocalizedMessage(1150685); // You are currently viewing a stall that you are not leasing. In order to set up or modify your stall, please use that stall's sign.
					break;
				case 4: // MY STALL BID
					from.SendGump(new StallBidGump(from, m_Plot));
					break;
				case 5: // MY BID MATCHING
					if(m_Plot.IsOwner(from))
                        from.SendGump(new MatchBidGump(from, m_Plot));
					else
						from.SendLocalizedMessage(1150685); // You are currently viewing a stall that you are not leasing. In order to set up or modify your stall, please use that stall's sign.
					break;
			}
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:32,代码来源:BizaarSignGump.cs

示例11: OnResponse

		public override void OnResponse( NetState sender, RelayInfo info )
		{
			PlayerMobile pm = sender.Mobile as PlayerMobile;

			if( !IsMember( pm, guild ) )
				return;

			switch( info.ButtonID )
			{
				case 1:
				{
					pm.SendGump( new GuildInfoGump( pm, guild ) );
					break;
				}
				case 2:
				{
					pm.SendGump( new GuildRosterGump( pm, guild ) );
					break;
				}
				case 3:
				{
					pm.SendGump( new GuildDiplomacyGump( pm, guild ) );
					break;
				}
			}
		}
开发者ID:Godkong,项目名称:Origins,代码行数:26,代码来源:BaseGuildGump.cs

示例12: OnResponse

        public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
        {
            int val, type, index;
            DecodeButtonId(info.ButtonID, out val, out type, out index);

            if( val < 0 )
                return;

            switch( type )
            {
                case 1:
                    {
                        switch( index )
                        {
                            case 0: //purchase
                                {
                                    Market.BuyItem(sender.Mobile, _entry);
                                    break;
                                }
                            case 1: //go back
                                {
                                    sender.Mobile.CloseGump(typeof(MarketDetailsGump));
                                    break;
                                }
                        }

                        break;
                    }
            }
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:30,代码来源:MarketDetailsGump.cs

示例13: OnResponse

      		public override void OnResponse( NetState state, RelayInfo info ) 
      		{ 
			Mobile from = state.Mobile; 

			if ( from == null )
				return;

        		if ( info.ButtonID == 0 ) // Close
         		{
				from.SendGump( new CityManagementGump( m_Stone, from ) );
			}

        		if ( info.ButtonID == 1 ) // Previous page
         		{
         			if ( m_ListPage > 0 )
					from.SendGump( new ChangeCitizenTitleGump( m_Stone, m_ListPage - 1, m_List, m_CountList ) );
			}

        		if ( info.ButtonID == 2 ) // Next page
         		{ 
         			if ( (m_ListPage + 1) * 7 < m_List.Count )
					from.SendGump( new ChangeCitizenTitleGump( m_Stone, m_ListPage + 1, m_List, m_CountList ) );
			}

        		if ( info.ButtonID >= 100 && info.ButtonID <= 999 ) // Decline
         		{
				Mobile mob = m_List[ info.ButtonID - 100 ] as Mobile;
				
				from.SendMessage( "Please enter the members new title, You are limited to 25 charactors or less." );
				from.Prompt = new CitizenTitleChangePrompt( m_Stone, mob, from );
			}
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:32,代码来源:ChangeCitizenTitleGump.cs

示例14: OnResponse

        public override void OnResponse( GameClient state, RelayInfo info )
        {
            Mobile from = state.Mobile;

            switch ( info.ButtonID )
            {
                case 0:
                    {
                        from.SendLocalizedMessage( 501235, "", 0x35 ); // Help request aborted.

                        break;
                    }
                case 1:
                    {
                        from.SendGump( new TargetInvolvedPlayersGump( text, m_Type, "", "", "" ) );

                        break;
                    }
                case 2:
                    {
                        from.SendGump( new TypeNamesOfInvolvedPlayersGump( text, m_Type, "", "", "" ) );

                        break;
                    }
                case 3:
                    {
                        from.SendGump( new SelectNamesOfInvolvedPlayersFromListGump( text, m_Type ) );

                        break;
                    }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:32,代码来源:Harassment.cs

示例15: OnResponse

        public override void OnResponse( NetState sender, RelayInfo info )
        {
            Mobile from = sender.Mobile;
            if ( info.ButtonID == 0 ) // close
                return;
            if ( m_Item1.RootParent != from || m_Item2.RootParent != from )
            {
                from.SendMessage( "The items you wish to combine must be in your backpack." );
                return;
            }

            if ( m_Item1 is IDynamicStackable )
            {
                if ( m_Item1.Amount + m_Item2.Amount > 60000 )
                    from.SendMessage( "You cannot make a single stack of more than 60000 items." );
                else
                    (m_Item1 as IDynamicStackable).AcceptedStack( from, m_Item2 );
                return;
            }
            else
            {
                from.SendMessage( "Error, one of the items is not a dynamic stackable item" );
                return;
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:25,代码来源:StackConfirmGump.cs


注:本文中的Server.Gumps.RelayInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。