• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Server.Point3D类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				case 0:
				{
					m_MultiID = reader.ReadInt();
					m_Offset = reader.ReadPoint3D();
					m_ShipName = reader.ReadString();

					if ( version == 0 )
						reader.ReadUInt();

					break;
				}
			}

			if ( LootType == LootType.Newbied )
				LootType = LootType.Blessed;

			if ( Weight == 0.0 )
				Weight = 1.0;
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:28,代码来源:BaseDockedBoat.cs


示例2: OnMovement

			public override void OnMovement( Mobile m, Point3D oldLocation )/////To Fix/////
		{
			
			if ( m.Alive && m is PlayerMobile )
			{
				PlayerMobile pm = (PlayerMobile)m;

				
				if ( InRange( pm, 2 ) && !InRange( oldLocation, 2 ) )
				{
					
					WormSilk ws = pm.Backpack.FindItemByType( typeof ( WormSilk ) ) as WormSilk;
		        

					if ( ws == null )
					{
						if ( ! pm.HasGump( typeof( RalphGump ) ) )
					{
					        pm.SendGump( new RalphGump( pm ) );
						
						return;
					}
					}
					else if ( ws != null )
					{
						Say( "I see you have found some worm silk! If you have 10, may I have them please?");
						
						return;
					}
				}
			}
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:32,代码来源:Ralph.cs


示例3: OnTarget

			protected override void OnTarget( Mobile from, object targeted )
			{
				IPoint3D p = targeted as IPoint3D;

				if ( p == null )
					return;
				else if ( p is Item )
					p = ((Item)p).GetWorldTop();

				if ( m_First )
				{
					from.SendMessage( "Target another location to complete the bounding box." );
					from.Target = new PickTarget( new Point3D( p ), false, from.Map, m_Callback, m_State );
				}
				else if ( from.Map != m_Map )
				{
					from.SendMessage( "Both locations must reside on the same map." );
				}
				else if ( m_Map != null && m_Map != Map.Internal && m_Callback != null )
				{
					Point3D start = m_Store;
					Point3D end = new Point3D( p );

					Utility.FixPoints( ref start, ref end );

					m_Callback( from, m_Map, start, end, m_State );
				}
			}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:28,代码来源:BoundingBoxPicker.cs


示例4: OnLocationChange

		public override void OnLocationChange( Point3D oldLocation )
		{
			if ( m_Item != null )
				m_Item.Location = new Point3D( X, Y + 1, Z );
			if ( m_Item2 != null )
				m_Item2.Location = new Point3D( X, Y + 2, Z );
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:7,代码来源:LargeForge.cs


示例5: OnMovement

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
				Effects.PlaySound( Location, Map, m_Sounds[ Utility.Random( m_Sounds.Length ) ] );
				
			base.OnMovement( m, oldLocation );
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:7,代码来源:TragicRemainsOfTravesty.cs


示例6: CompassDirectionGump

		public CompassDirectionGump(Mobile from) : base(120, 50)
		{
			m_From = from;
            List<Point3D> pointList = Server.Regions.MazeOfDeathRegion.Path;
			
			Point3D cur = m_From.Location;
			Point3D northLoc = new Point3D(cur.X, cur.Y - 1, cur.Z);
			Point3D eastLoc = new Point3D(cur.X + 1, cur.Y, cur.Z);
			Point3D southLoc = new Point3D(cur.X, cur.Y + 1, cur.Z);
			Point3D westLoc = new Point3D(cur.X - 1, cur.Y, cur.Z);
			
			//this.Closable = false;
			
			//Empty radar
			AddImage(0, 0, 9007);
			
			//Arrows
			if(pointList.Contains(northLoc))
				AddImage(100, 50, 4501);
			
			if(pointList.Contains(eastLoc))
				AddImage(100, 100, 4503);

			if(pointList.Contains(southLoc))
				AddImage(50, 100, 4505);
				
			if(pointList.Contains(westLoc))
				AddImage(50, 50, 4507);
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:29,代码来源:CompassDirectionGump.cs


示例7: SignEntry

			public SignEntry( string text, Point3D pt, int itemID, int mapLoc )
			{
				m_Text = text;
				m_Location = pt;
				m_ItemID = itemID;
				m_Map = mapLoc;
			}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:7,代码来源:SignParser.cs


示例8: CheckMulti

		public static bool CheckMulti( Point3D p, Map map, bool houses, int housingrange )
		{
			if( map == null || map == Map.Internal )
				return false;

			Sector sector = map.GetSector( p.X, p.Y );

			for( int i = 0; i < sector.Multis.Count; ++i )
			{
				BaseMulti multi = sector.Multis[i];

				if( multi is BaseHouse )
				{
					BaseHouse bh = (BaseHouse)multi;

					if( ( houses && bh.IsInside( p, 16 ) ) || ( housingrange > 0 && bh.InRange( p, housingrange ) ) )
						return true;
				}
				else if( multi.Contains( p ))
				{
					return true;
				}
			}
			
			return false;
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:26,代码来源:SpellHelper.cs


示例9: MovementPath

        public MovementPath(Mobile m, Point3D goal)
        {
            Point3D start = m.Location;
            Map map = m.Map;

            this.m_Map = map;
            this.m_Start = start;
            this.m_Goal = goal;

            if (map == null || map == Map.Internal)
                return;

            if (Utility.InRange(start, goal, 1))
                return;

            try
            {
                PathAlgorithm alg = m_OverrideAlgorithm;

                if (alg == null)
                {
                    alg = FastAStarAlgorithm.Instance;
                    //if ( !alg.CheckCondition( m, map, start, goal ) )	// SlowAstar is still broken
                    //	alg = SlowAStarAlgorithm.Instance;		// TODO: Fix SlowAstar
                }

                if (alg != null && alg.CheckCondition(m, map, start, goal))
                    this.m_Directions = alg.Find(m, map, start, goal);
            }
            catch (Exception e)
            {
                Console.WriteLine("Warning: {0}: Pathing error from {1} to {2}", e.GetType().Name, start, goal);
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:34,代码来源:MovementPath.cs


示例10: RegisterToBoardGameControlItem

		public void RegisterToBoardGameControlItem( BoardGameControlItem boardgamecontrolitem, Point3D offset )
		{
			BoardGameControlItem = boardgamecontrolitem;
			Offset = offset;
			
			UpdatePosition();
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:GamePiece.cs


示例11: OnLocationChange

		public override void OnLocationChange( Point3D oldLocation )
		{
			base.OnLocationChange( oldLocation );
			
			if ( m_Parrot != null )
				m_Parrot.Location = new Point3D( X, Y, Z + 12 );
		}		
开发者ID:PepeBiondi,项目名称:runsa,代码行数:7,代码来源:ParrotPerchAddon.cs


示例12: ShimmeringEffusionActivationTrammel

		public ShimmeringEffusionActivationTrammel()
			: base( 0xE27 )
		{
			Hue = 0;
			Mapa = Map.Trammel;
			EnterPoint = new Point3D( 6523, 139, -20 );
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:7,代码来源:ShimmeringEffusionActivationTrammel.cs


示例13: DecoreItemInfo

 public DecoreItemInfo( string typestring, string name, int itemid, int hue, Point3D loc, Map map )
 {
     c_TypeString = typestring;
     c_ItemID = itemid;
     c_Location = loc;
     c_Map = map;
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:DecoreItemInfo.cs


示例14: SlimyOintmentTrammel

		public SlimyOintmentTrammel()
			: base( 0x318E )
		{
			Mapa = Map.Trammel;
			Hue = 1109;
			EnterPoint = new Point3D( 6519, 382, 0 );
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:7,代码来源:SlimyOintmentTrammel.cs


示例15: OnLocationChange

        public override void OnLocationChange(Point3D oldlocation)
        {
            base.OnLocationChange(oldlocation);

            if (Component != null)
                Component.Location = new Point3D(this.X - 1, this.Y, this.Z);
        }
开发者ID:Ravenwolfe,项目名称:ServUO,代码行数:7,代码来源:Beacon.cs


示例16: OnMovement

        public override void OnMovement( Mobile mobile, Point3D oldLocation )
        {
            if ( Alive )
            {
                DestroyerGargoyle mHeal = null;

                foreach ( Mobile m in this.GetMobilesInRange( 10 ) )
                {
                    if ( m is DestroyerGargoyle )
                    {
                        mHeal = (DestroyerGargoyle) m;
                        break;
                    }
                }

                if ( mHeal != null && mHeal.Mana >= 11 && ( this.Hits < ( this.HitsMax - 50 ) ) && !( this.Poisoned || Server.Items.MortalStrike.IsWounded( this ) ) && ( mHeal.CanSee( this ) ) )
                {
                    int toHeal = (int) ( mHeal.Skills[SkillName.Magery].Value * 0.4 );
                    toHeal += Utility.Random( 1, 10 );
                    mHeal.Mana -= 11;

                    this.Heal( toHeal );

                    this.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
                    this.PlaySound( 0x202 );
                }
            }

            base.OnMovement( mobile, oldLocation );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:30,代码来源:EnforcerGargoyle.cs


示例17: OnMoveInto

		public override bool OnMoveInto( Mobile m, Direction d, Point3D newLocation, Point3D oldLocation )
		{
			if ( m.AccessLevel > AccessLevel.Player || Contains( oldLocation ) )
				return true;

            // do they have enough faction to enter?
            XmlMobFactions a = (XmlMobFactions)XmlAttach.FindAttachment(m, typeof(XmlMobFactions));
            
            if(a == null) return false;
            
            int fac = a.GetFactionLevel(m_FactionType);
            
            if(fac < FactionLevel)
            {
                // throttle message display
                if(DateTime.Now - m_lastmsg > TimeSpan.FromSeconds(1))
                {
                    m.SendMessage("Your {0} faction is too low to enter here", FactionType);
                    m_lastmsg = DateTime.Now;
                }
                return false;
            }

			return true;
		}
开发者ID:jamison654321,项目名称:xmlspawner,代码行数:25,代码来源:MobFactionRegion.cs


示例18: OnMovement

		public override bool ClickTitle{ get{ return false; } } // Do not display title in OnSingleClick

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( InRange( m, 4 ) && !InRange( oldLocation, 4 ) )
			{
				CheckForNeeds ( m );
			}
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:9,代码来源:HealingFairy.cs


示例19: SpawnPixies

		public void SpawnPixies( Mobile target )
		{
			Map map = this.Map;

			if ( map == null )
				return;

			int newPixies = Utility.RandomMinMax( 3, 6 );

			for ( int i = 0; i < newPixies; ++i )
			{
				Pixie pixie = new Pixie();

				pixie.Team = this.Team;
				pixie.FightMode = FightMode.Closest;

				bool validLocation = false;
				Point3D loc = this.Location;

				for ( int j = 0; !validLocation && j < 10; ++j )
				{
					int x = X + Utility.Random( 3 ) - 1;
					int y = Y + Utility.Random( 3 ) - 1;
					int z = map.GetAverageZ( x, y );

					if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
						loc = new Point3D( x, y, Z );
					else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
						loc = new Point3D( x, y, z );
				}

				pixie.MoveToWorld( loc, map );
				pixie.Combatant = target;
			}
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:35,代码来源:Silvani.cs


示例20: FireWall

        public static void FireWall( Mobile from, Mobile target )
        {
            Effects.SendPacket( from.Location, from.Map, new FlashEffect( FlashType.LightFlash ) );
            Effects.PlaySound( from.Location, from.Map, 0x44B );

            Direction d = from.GetDirectionTo( target );

            int dx, dy;
            bool diagonal;

            GetDirectionOffset( d, out dx, out dy, out diagonal );

            int length = 1 + (int) Math.Min( from.GetDistanceToSqrt( target ), 10 );

            for ( int i = 0; i < length; i++ )
            {
                int x = from.Location.X + ( dx * i );
                int y = from.Location.Y + ( dy * i );

                Point3D loc = new Point3D( x, y, from.Location.Z );

                TimeSpan duration = TimeSpan.FromSeconds( 100.0 - ( i * 9.0 ) );

                if ( d == Direction.West || d == Direction.East || diagonal )
                    new FireFieldItem( from, loc, from.Map, 0x398C, duration );

                if ( d == Direction.North || d == Direction.South || diagonal )
                    new FireFieldItem( from, loc, from.Map, 0x3996, duration );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:30,代码来源:MonsterHelper.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Server.Poison类代码示例发布时间:2022-05-26
下一篇:
C# Server.Point2D类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap