本文整理汇总了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 );
}
}
}
示例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 );
}
示例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());
}
}
示例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.");
}
}
示例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.
}
}
示例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.");
}
}
示例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));
}
示例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" );
}
}
示例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
}
}
}
}
示例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;
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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 );
}
}
示例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;
}
}
}
示例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;
}
}