本文整理汇总了C#中Server.Mobile.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.MoveToWorld方法的具体用法?C# Mobile.MoveToWorld怎么用?C# Mobile.MoveToWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.MoveToWorld方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnMoveOver
public override bool OnMoveOver( Mobile m )
{
if( !m_AllowCreatures && !m.Player )
return true;
if( m.Alive)
{
m.SendMessage( "You must be dead to use this portal." );
m.Say("Duh... I am not dead... Hello? Use a Rune book..");
m.PlaySound( 0x440 );
return true;
}
if( m_TelePets)
{
Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
}
m.Say("Have mercy on my soul.");
World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as Dracula has consumed another victim. May {0} rest in peace.", m.Name );
m.PlaySound(0x1F7);
m.MoveToWorld( m_DestLoc, m_DestMap );
return false;
}
示例2: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (from.Map == Map.Trammel)
{
//Now where am I at?
//from.SendMessage(11, "You are at {0} {1} {2} in {3}.", from.X, from.Y, from.Z, from.Map);
from.SendLocalizedMessage(1005680); //teleporting to Felucca
from.MoveToWorld(from.Location, Map.Felucca);
}
else
if (from.Map == Map.Felucca)
{
from.SendLocalizedMessage(502353); //Strange, that did not seem to work.
//To switch from Trammel to Felucca, remove the above line and add the two lines below.
//from.SendLocalizedMessage(1005681); //teleporting to Trammel
//from.MoveToWorld(from.Location, Map.Trammel);
//502353); //Strange, that did not seem to work.
//502369); //You hesitate, and decide to start again.
}
else
{
from.SendLocalizedMessage(1042766); //Waaaaaaah! I am lost!
//1010217); //I'm lost!
//1042766); //Waaaaaaah! I am lost!
//10495430); //You decide against traveling to Felucca while you are still young.
//501816); //You are too far away to do that.
}
}
示例3: OnMoveOver
public override bool OnMoveOver( Mobile m )
{
if( !m_AllowCreatures && !m.Player )
return true;
if( m.Backpack.ConsumeTotal( typeof( DracsKey ), 1 ) )
{
if( m_TelePets )
{
Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
}
m.Say("Have mercy on my soul");
World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as {0} has Entered Draculas inner room.", m.Name );
m.PlaySound(0x1F7);
m.MoveToWorld( m_DestLoc, m_DestMap );
return false;
}
m.SendMessage( " You must have the Key to Draculas chamber to use this gate." );
return true;
}
示例4: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if( HomeMap != Map.Internal && HomeMap != null && from.AccessLevel > AccessLevel.Player )
{
from.MoveToWorld( HomeLoc, HomeMap );
}
}
示例5: OnDoubleClick
// When this object -- the bottle -- is double-clicked...
public override void OnDoubleClick(Mobile m)
{
if (m.Followers >= m.FollowersMax) // If the player's followers is greater than or equal to his max followers...
{
m.SendMessage("You need at least one free follower slot to open the bottle.");
}
else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (!GetGooInBottle())) // If the bottle is in-range and the goo is not in its bottle...
{
m.SendMessage("The goo is out of its bottle!");
m.SendLocalizedMessage(1010018); // What do you want to use this item on?
m.Target = new BottleOfGooTarget(this, gooPet); // Creates a target from this mobile with the goo mobile thrown to the new class as a reference.
}
else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (GetGooInBottle())) // If the bottle is in-range and the goo IS in its bottle, this function creates a new goo mobile.
{
gooPet = new Goo(this);
((GenericWarrior)gooPet).Controlled = true;
((GenericWarrior)gooPet).ControlMaster = m;
gooPet.MoveToWorld(m.Location, m.Map);
gooPet.PlaySound(0x1CC);
gooPet.Emote("*leaps out of " + m.Name + "'s bottle!*");
SetGooInBottle(false);
}
else
{
m.SendLocalizedMessage(500446); //That is too far away.
}
}
示例6: DoTeleport
public override void DoTeleport(Mobile m)
{
Map map = MapDest;
if (map == null || map == Map.Internal)
map = m.Map;
Point3D p = PointDest;
if (p == Point3D.Zero)
p = m.Location;
//Server.Mobiles.BaseCreature.TeleportPets(m, p, map);
bool sendEffect = (!m.Hidden || m.AccessLevel == AccessLevel.Player);
if (SourceEffect && sendEffect)
Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);
m.MoveToWorld(p, map);
if (DestEffect && sendEffect)
Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);
if (SoundID > 0 && sendEffect)
Effects.PlaySound(m.Location, m.Map, SoundID);
}
示例7: OnExit
public override void OnExit( Mobile m )
{
if ( m.IsPlayer && !m.Alive )
{
Rectangle2D rect = new Rectangle2D( 342, 168, 16, 16 );
int x = Utility.Random( rect.X, rect.Width );
int y = Utility.Random( rect.Y, rect.Height );
if ( x >= 345 && x <= 352 && y >= 173 && y <= 179 )
{
x = 353;
y = 172;
}
m.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas );
if ( m.Corpse != null )
{
Region region = Region.Find( m.Corpse.Location, Map.Malas );
if ( region.Name == "Doom Dark Guardians Room" )
{
m.Corpse.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas );
}
}
}
}
示例8: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (m_Boat == null || from == null)
return;
BaseBoat boat = BaseBoat.FindBoatAt(from, from.Map);
int range = boat != null && boat == this.Boat ? 3 : 8;
bool canMove = false;
if (m_Boat != null)
m_Boat.Refresh();
if (boat != null && m_Boat != boat)
boat.Refresh();
if (!from.InRange(this.Location, range))
from.SendLocalizedMessage(500295); //You are too far away to do that.
else if (!from.InLOS(this.Location))
from.SendLocalizedMessage(500950); //You cannot see that.
else if (m_Boat.IsMoving || m_Boat.IsTurning)
from.SendLocalizedMessage(1116611); //You can't use that while the ship is moving!
else if (BaseBoat.IsDriving(from))
from.SendLocalizedMessage(1116610); //You can't do that while piloting a ship!
else if (BaseHouse.FindHouseAt(from) != null)
from.SendLocalizedMessage(1149795); //You may not dock a ship while on another ship or inside a house.
else if (!m_Boat.IsClassicBoat)
{
if (boat == m_Boat && !MoveToNearestDockOrLand(from))
from.SendLocalizedMessage(1149796); //You can not dock a ship this far out to sea. You must be near land or shallow water.
else if (boat == null)
{
if (!from.Alive)
from.SendLocalizedMessage(1060190); //You cannot do that while dead!
else if ((m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from)) || (m_Boat is RowBoat && ((RowBoat)m_Boat).HasAccess(from)))
canMove = true;
else
from.SendLocalizedMessage(1116617); //You do not have permission to board this ship.
}
else if (boat != null && m_Boat != boat)
{
if (!from.Alive)
from.SendLocalizedMessage(1060190); //You cannot do that while dead!
else if (boat is BaseGalleon && m_Boat is RowBoat && ((RowBoat)m_Boat).HasAccess(from))
canMove = true;
else if (boat is RowBoat && m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from))
canMove = true;
else if (boat is BaseGalleon && m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from))
canMove = true;
else
from.SendLocalizedMessage(1149795); //You may not dock a ship while on another ship or inside a house.
}
}
if (canMove)
{
BaseCreature.TeleportPets(from, this.Location, this.Map);
from.MoveToWorld(this.Location, this.Map);
}
}
示例9: VerificarComRestricoes
public static void VerificarComRestricoes(Mobile personagem)
{
if (Confirmar(personagem))
{
personagem.MoveToWorld(PosicionamentoNoMapa.BritainCentro(), Map.Felucca);
personagem.SendMessage("Você estava em um mundo restrito e fora movido para o ponto inicial.");
}
}
示例10: KickOut
public void KickOut( Mobile m )
{
if(m == null || EjectMap == null) return;
m.SendMessage("Your {0} faction is too low to enter here", FactionType);
m.MoveToWorld(EjectLocation, EjectMap);
Effects.SendLocationParticles( Server.Items.EffectItem.Create( m.Location, m.Map, Server.Items.EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
}
示例11: OnEnter
public override void OnEnter(Mobile m)
{
m.SendMessage("Entering boardgame");
if (_BoardGameControlItem.Players.IndexOf(m) == -1 && m.AccessLevel == AccessLevel.Player)
{
m.SendMessage("You are not allowed in there.");
m.MoveToWorld(_BoardGameControlItem.Location, _BoardGameControlItem.Map);
}
}
示例12: Teleport
public void Teleport(Mobile m, Point3D destLoc, Map destMap)
{
if (m == null || m.Deleted || destLoc == Point3D.Zero || destMap == Map.Internal)
{
return;
}
var oldLoc = m.Location;
var oldMap = m.Map;
var pm = m as PlayerMobile;
if (pm != null && !IsOnline(pm))
{
pm.LogoutLocation = destLoc;
pm.LogoutMap = destMap;
if (!pm.Alive && pm.Corpse != null && !pm.Corpse.Deleted)
{
pm.Corpse.MoveToWorld(pm.LogoutLocation, pm.LogoutMap);
}
OnTeleported(pm, oldLoc, oldMap);
return;
}
if (!m.Hidden)
{
Effects.SendLocationParticles(
EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration),
0x3728,
10,
10,
5023);
}
m.MoveToWorld(destLoc, destMap);
m.Send(VNScreenLightFlash.Instance);
SendSound(Options.Sounds.Teleport);
if (!m.Hidden)
{
Effects.SendLocationParticles(EffectItem.Create(destLoc, destMap, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
}
if (m.Location != destLoc || m.Map != destMap)
{
return;
}
if (!m.Alive && m.Corpse != null && !m.Corpse.Deleted)
{
m.Corpse.MoveToWorld(m.Location, m.Map);
}
OnTeleported(m, oldLoc, oldMap);
}
示例13: VerificarComRestricoes
public static void VerificarComRestricoes(Mobile personagem)
{
if (personagem.Name.Equals(NomePadrao))
{
personagem.Frozen = true;
personagem.MoveToWorld(PosicionamentoNoMapa.BritainCentro(), Map.Felucca);
personagem.Hidden = true;
}
}
示例14: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
if (ToLocation == Point3D.Zero ||
ToMap == Map.Internal)
return;
from.MoveToWorld(ToLocation, ToMap);
}
示例15: OnDoubleClick
public override void OnDoubleClick( Mobile m )
{
if ( ( m.Map == Map.Felucca || m.Map == Map.Trammel ) && m.X > 6435 && m.Y > 9 && m.X < 6631 && m.Y < 244 ) // Prism of Light
{
BaseCreature.TeleportPets( m, m_Dest, m.Map );
m.MoveToWorld( m_Dest, m.Map );
}
else
m.SendLocalizedMessage( 1074840 ); // This ticket can only be used while you are in the Prism of Light dungeon.
}