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


C# Mobile.MoveToWorld方法代码示例

本文整理汇总了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;
				
			

		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:28,代码来源:DraculasDeadOnlyTeleportalOut.cs

示例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.
                }
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:30,代码来源:FeluccaMap.cs

示例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;
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:25,代码来源:DraculasTeleporter.cs

示例4: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if( HomeMap != Map.Internal && HomeMap != null && from.AccessLevel > AccessLevel.Player )
			{
				from.MoveToWorld( HomeLoc, HomeMap );
			}
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:7,代码来源:StaffCloak.cs

示例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.
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:32,代码来源:BottleOfGoo.cs

示例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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:27,代码来源:DespiseTeleporter.cs

示例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 );
					}
				}
			}
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:28,代码来源:GuardiansRoom.cs

示例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);
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:59,代码来源:MooringLine.cs

示例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.");
     }
 }
开发者ID:brodock,项目名称:genova-project,代码行数:8,代码来源:PersonagemEmMundoRestrito.cs

示例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 );
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:8,代码来源:MobFactionRegion.cs

示例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);
     }
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:9,代码来源:BoardGameRegion.cs

示例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);
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:57,代码来源:Battle_Actions.cs

示例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;                
     }
 }
开发者ID:brodock,项目名称:genova-project,代码行数:9,代码来源:PersonagemDesconhecido.cs

示例14: OnDoubleClick

		public override void OnDoubleClick(Mobile from)
		{
			base.OnDoubleClick(from);

			if (ToLocation == Point3D.Zero ||
				ToMap == Map.Internal)
				return;

			from.MoveToWorld(ToLocation, ToMap);
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:10,代码来源:TeleportRope.cs

示例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.
 }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:10,代码来源:PrismOfLightAdmissionTicket.cs


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