本文整理汇总了C#中Mobile.SendGump方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.SendGump方法的具体用法?C# Mobile.SendGump怎么用?C# Mobile.SendGump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile.SendGump方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnTargetFinish
protected override void OnTargetFinish( Mobile from )
{
if ( m_Type == typeof( Type ) )
from.SendGump( new PropertiesGump( m_Mobile, m_Object, m_Stack, m_List, m_Page ) );
else
from.SendGump( new SetObjectGump( m_Property, m_Mobile, m_Object, m_Stack, m_Type, m_Page, m_List ) );
}
示例2: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (Filled)
{
if (from.InRange(this, 3) && from.InLOS(this))
{
from.SendAsciiMessage("You look at the Tombstone");
from.PlaySound(47);
from.SendGump(new GraveGump());
}
else if (IsChildOf(from.Backpack))
{
from.SendAsciiMessage("You look at the Tombstone");
from.PlaySound(47);
from.SendGump(new GraveGump());
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
}
if (!(Filled))
{
if (!IsChildOf(from.Backpack))
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
else
{
from.Target = new InternalTarget(this);
from.SendAsciiMessage("This tombstone is blank!");
from.SendAsciiMessage("Target a players head to bury them.");
}
}
}
示例3: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( m_Game != null )
{
if ( m_Game.OpenJoin )
{
if ( m_Game.IsInGame( from ) )
{
from.SendGump( new GameTeamSelector( m_Game ) );
}
else
{
if ( from.AccessLevel == AccessLevel.Player )
from.SendGump( new GameJoinGump( m_Game, m_GameName ) );
else
from.SendMessage( "It might not be wise for staff to be playing..." );
}
}
else
{
from.SendMessage( "{0} join is closed.", m_GameName );
}
}
else
{
from.SendMessage( "This stone must be linked to a game stone. Please contact a game master." );
}
}
示例4: OnDoubleClick
public override void OnDoubleClick(Mobile m)
{
if (!m.InRange(GetWorldLocation(), 2) || ValorRewardController.Instance == null)
{
return;
}
m.CloseGump(typeof(ValorBoardGump));
m.CloseGump(typeof(ValorBoardGumpBritish));
m.CloseGump(typeof(ValorBoardGumpSide));
m.SendGump(new ValorBoardGumpBritish());
m.SendGump(new ValorBoardGump(ValorRewardController.Instance, 0, null, null, null, false));
m.SendGump(new ValorBoardGumpSide(m, m, ValorRewardController.Instance));
}
示例5: ApplyHungerStatMod
public static void ApplyHungerStatMod(Mobile m)
{
if (m is PlayerMobile && m.AccessLevel == AccessLevel.Player)
{
m.CloseGump(typeof(HungerGump));
m.SendGump(new HungerGump(m));
}
int HungerModStr = 0;
if (m.Hunger == 0)
HungerModStr = 0;
else if (m.Hunger < 4)
HungerModStr = 1;
else if (m.Hunger < 8)
HungerModStr = 2;
else if (m.Hunger < 12)
HungerModStr = 3;
else if (m.Hunger < 16)
HungerModStr = 4;
else if (m.Hunger <= 20)
HungerModStr = 5;
m.AddStatMod(new StatMod(StatType.Str, "HungerModStr", HungerModStr, TimeSpan.Zero));
}
示例6: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
return;
if ( m_UsesRemaining > 0 )
{
from.SendLocalizedMessage( 1072357 ); // Select an object to engrave.
from.Target = new TargetWeapon( this );
}
else
{
if ( from.Skills.Tinkering.Value == 0 )
{
from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.
}
else if ( from.Skills.Tinkering.Value < 75.0 )
{
from.SendLocalizedMessage( 1076178 ); // Your tinkering skill is too low to fix this yourself. An NPC tinkerer can help you repair this for a fee.
}
else
{
Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );
if ( diamond != null )
from.SendGump( new ConfirmGump( this, null ) );
else
from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.
}
from.SendLocalizedMessage( 1076163 ); // There are no charges left on this engraving tool.
}
}
示例7: OnTargetFinish
protected override void OnTargetFinish( Mobile from )
{
if ( !m_Plant.Deleted && m_Plant.PlantStatus < PlantStatus.DecorativePlant && m_Plant.PlantStatus != PlantStatus.BowlOfDirt && from.InRange( m_Plant.GetWorldLocation(), 3 ) && m_Plant.IsUsableBy( from ) )
{
from.SendGump( new ReproductionGump( m_Plant ) );
}
}
示例8: OnTarget
protected override void OnTarget(Mobile from, object targeted)
{
if (targeted is DyeTub)
{
DyeTub tub = (DyeTub)targeted;
if (tub.Redyable)
{
if (tub.CustomHuePicker == null)
from.SendHuePicker(new InternalPicker(tub));
else
from.SendGump(new CustomHuePickerGump(from, tub.CustomHuePicker, new CustomHuePickerCallback(SetTubHue), tub));
}
else if (tub is BlackDyeTub)
{
from.SendLocalizedMessage(1010092); // You can not use this on a black dye tub.
}
else
{
from.SendMessage("That dye tub may not be redyed.");
}
}
else
{
from.SendLocalizedMessage(500857); // Use this on a dye tub.
}
}
示例9: SendMessage
private static void SendMessage(Mobile m)
{
Account acct = (Account)m.Account;
m.CloseGump(typeof(MotDGump));
m.SendGump(new MotDGump(m, LastMessage));
acct.SetTag("MotD", "true");
}
示例10: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
ttt = this;
if( IsChildOf( from.Backpack ) )
{
fromBackpack = true;
from.SendGump( new SelectGump( from, ttt ) );
}
else if( IsChildOf( from.BankBox ) )
{
fromBackpack = false;
from.SendGump( new SelectGump( from, ttt ) );
}
else
from.SendMessage( "This item has to either be in your backpack or bank" );
}
示例11: OnTarget
protected override void OnTarget(Mobile from, object targeted)
{
if (from != null)
{
if (targeted != null && targeted is PlayerMobile)
{
PlayerMobile pm = (PlayerMobile)targeted;
DuelPoints dp = null;
if (DuelController.PointsTable.TryGetValue(pm.Serial, out dp))
{
from.SendGump(new DuelPlayerInfoGump(dp));
}
else
{
if (from == pm)
from.SendMessage(53, "You have no dueling record.");
else
from.SendMessage(53, "That player has no dueling record.");
}
}
else
{
from.SendMessage(32, "That's not a player!");
}
}
}
示例12: OnTarget
protected override void OnTarget(Mobile from, object targeted)
{
if (m_Item.Deleted)
{
return;
}
if (targeted is Item && !((Item)targeted).IsStandardLoot())
{
// Scissors can not be used on that to produce anything.
// from.SendLocalizedMessage(502440);
if (targeted is IScissorable)
{
from.SendGump(new BlessedClothingCutGump((IScissorable)targeted, m_Item));
}
else
{
from.SendLocalizedMessage(502440);
}
}
else if (m_Item.EraAOS && targeted == from)
{
// That doesn't seem like the smartest thing to do.
// That was an encounter you don't wish to repeat.
// Ha! You missed!
from.SendLocalizedMessage(1062845 + Utility.Random(3));
}
else if (m_Item.EraSE && Utility.RandomDouble() > 0.20 && (from.Direction & Direction.Running) != 0 &&
DateTime.UtcNow - from.LastMoveTime < from.ComputeMovementSpeed(from.Direction))
{
// Didn't your parents ever tell you not to run with scissors in your hand?!
from.SendLocalizedMessage(1063305);
}
else if (targeted is Item && !((Item)targeted).Movable)
{
if (targeted is IScissorable && (targeted is PlagueBeastInnard || targeted is PlagueBeastMutationCore))
{
var obj = (IScissorable)targeted;
if (obj.Scissor(from, m_Item))
{
from.PlaySound(0x248);
}
}
}
else if (targeted is IScissorable)
{
var obj = (IScissorable)targeted;
if (obj.Scissor(from, m_Item))
{
from.PlaySound(0x248);
}
}
else
{
from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
}
}
示例13: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (m_Statue != null)
{
from.SendGump(new CharacterPlinthGump(m_Statue));
}
}
示例14: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
if(from == null) return;
PlayerMobile pm = targeted as PlayerMobile;
if (pm != null && from.AccessLevel <= pm.AccessLevel)
{
from.SendAsciiMessage("You can only do this to staff with lower privs");
return;
}
// does it have an xmldialog attachment?
XmlDialog xd = XmlAttach.FindAttachment(targeted, typeof(XmlDialog)) as XmlDialog;
if(xd == null)
{
from.SendMessage("Target has no XmlDialog attachment");
// TODO: ask whether they would like to add one
from.SendGump( new XmlConfirmAddGump(from, targeted));
return;
}
from.SendGump( new XmlEditDialogGump(from, true, xd, -1, 0, null, false, null, 0, 0));
}
示例15: OnTarget
protected override void OnTarget(Mobile from, object targeted)
{
if (m_Tool != null && (targeted is Cloth || targeted is BoltOfCloth || targeted is BaseLeather))
from.SendGump(new CraftGump(from, DefTailoring.CraftSystem, m_Tool, null));
else
from.SendAsciiMessage("You cant use this on that!");
}