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

C# Server.Region类代码示例

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

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



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

示例1: CraftShopRegion

 public CraftShopRegion( XmlElement xml, Map map, Region parent )
     : base(xml, map, parent)
 {
     int skill = 0;
     ReadInt32( xml, "skill", ref skill, true );
     m_Skills = (CraftSkillType)skill;
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:7,代码来源:CraftShopRegion.cs


示例2: CanSpawn

		public static bool CanSpawn( Region region, params Type[] types )
		{
			while ( region != null )
			{
				if ( !region.AllowSpawn() )
					return false;

				BaseRegion br = region as BaseRegion;

				if ( br != null )
				{
					if ( br.Spawns != null )
					{
						for ( int i = 0; i < br.Spawns.Length; i++ )
						{
							SpawnEntry entry = br.Spawns[i];

							if ( entry.Definition.CanSpawn( types ) )
								return true;
						}
					}

					if ( br.ExcludeFromParentSpawns )
						return false;
				}

				region = region.Parent;
			}

			return false;
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:31,代码来源:BaseRegion.cs


示例3: QuestCompleteObjectiveRegion

		public QuestCompleteObjectiveRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
		{
			XmlElement questEl = xml["quest"];

			ReadType( questEl, "type", ref m_Quest );
			ReadType( questEl, "complete", ref m_Objective );
		}
开发者ID:Godkong,项目名称:Origins,代码行数:7,代码来源:QuestCompleteObjectiveRegion.cs


示例4: CampfireRegion

		public CampfireRegion( Campfire campfire, Region existingRegion ) : base( "", "", campfire.Map )
		{
			Priority = Region.HousePriority;
			LoadFromXml = false;
			m_Campfire = campfire;
			m_ExistingRegion = existingRegion;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:7,代码来源:CampfireRegion.cs


示例5: GuardedRegion

        public GuardedRegion( XmlElement xml, Map map, Region parent )
            : base(xml, map, parent)
        {
            XmlElement el = xml["guards"];

            if ( ReadType( el, "type", ref m_GuardType, false ) )
            {
                if ( !typeof( Mobile ).IsAssignableFrom( m_GuardType ) )
                {
                    Console.WriteLine( "Invalid guard type for region '{0}'", this );
                    m_GuardType = DefaultGuardType;
                }
            }
            else
            {
                m_GuardType = DefaultGuardType;
            }

            bool disabled = false;
            if ( ReadBoolean( el, "disabled", ref disabled, false ) )
                this.Disabled = disabled;

            if ( Name != null )
                RuneName = String.Format( "the city of {0}", Name );
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:25,代码来源:GuardedRegion.cs


示例6: RegionContains

 public static bool RegionContains(Region region, Mobile m)
 {
     #if(RunUO_1_Final)
         return region.Mobiles.Contains(m);
     #elif(RunUO_2_RC1)
         return region.GetMobiles().Contains(m);
     #endif
 }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:8,代码来源:RUOVersion.cs


示例7: QuestNoEntryRegion

		public QuestNoEntryRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
		{
			XmlElement questEl = xml["quest"];

			ReadType( questEl, "type", ref m_Quest );
			ReadType( questEl, "min", ref m_MinObjective, false );
			ReadType( questEl, "max", ref m_MaxObjective, false );
			ReadInt32( questEl, "message", ref m_Message, false );
		}
开发者ID:Godkong,项目名称:RunUO,代码行数:9,代码来源:QuestNoEntryRegion.cs


示例8: DungeonRegion

		public DungeonRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
		{
			XmlElement entrEl = xml["entrance"];

			Map entrMap = map;
			ReadMap( entrEl, "map", ref entrMap, false );

			if ( ReadPoint3D( entrEl, entrMap, ref m_EntranceLocation, false ) )
				m_EntranceMap = entrMap;
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:10,代码来源:DungeonRegion.cs


示例9: ShowRegionBounds

        public static void ShowRegionBounds(Region r, Mobile from, bool control, bool active)
        {
            if (r == null)
                return;

            foreach (Rectangle3D rect in r.Area)
            {
                ShowRectBounds(rect, r.Map, from, control, active);
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:10,代码来源:RegionBounds.cs


示例10: IsMLRegion

		public static bool IsMLRegion( Region region )
		{
			return region.IsPartOf( "Twisted Weald" )
				|| region.IsPartOf( "Sanctuary" )
				|| region.IsPartOf( "The Prism of Light" )
				|| region.IsPartOf( "The Citadel" )
				|| region.IsPartOf( "Bedlam" )
				|| region.IsPartOf( "Blighted Grove" )
				|| region.IsPartOf( "The Painted Caves" )
				|| region.IsPartOf( "The Palace of Paroxysmus" )
				|| region.IsPartOf( "Labyrinth" );
		}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:12,代码来源:MondainsLegacy.cs


示例11: RegionCategory

		//----------------------------------------------------------------------
		//
		//----------------------------------------------------------------------
		public static string RegionCategory( Region currentRegion )
		{
			string str;

			if( currentRegion is GuardedRegion ) { str = "Guarded"; }
			else if( currentRegion is HouseRegion ) { str = "House"; }
			else if( currentRegion is DungeonRegion ) { str = "Dungeon"; }
			else if( currentRegion is Jail ) { str = "Jail"; }
			else if( currentRegion is GreenAcres ) { str = "GreenAcres"; }
			else { str = "Wilderness"; }

			return str;
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:16,代码来源:Helpers.cs


示例12: ShowRegionBounds

        public static void ShowRegionBounds( Region r )
        {
            if( r == null || r.Coords == null || r.Coords.Count == 0)
                return;

            ArrayList c = r.Coords;

            for( int i = 0; i < c.Count; i++ )
            {
                if( c[i] is Rectangle2D )
                    ShowRectBounds( (Rectangle2D)c[i], r.Map );
            }
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:13,代码来源:RegionBounds.cs


示例13: GetRegionCollection

		public static LootCollection GetRegionCollection( Type type, Region region )
		{
			if ( region is BaseRegion )
			{
				LootCollection coll;

				((BaseRegion)region).LootTable.TryGetValue( type, out coll );

				return coll;
			}

			return null;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:13,代码来源:LootSystem.cs


示例14: GetRuneNameFor

		public static string GetRuneNameFor( Region region )
		{
			while ( region != null )
			{
				BaseRegion br = region as BaseRegion;

				if ( br != null && br.m_RuneName != null )
					return br.m_RuneName;

				region = region.Parent;
			}

			return null;
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:14,代码来源:BaseRegion.cs


示例15: ApprenticeObjective

        public ApprenticeObjective( SkillName skill, int cap, string region, object enterRegion, object leaveRegion )
            : base(cap)
        {
            m_Skill = skill;

            if ( region != null )
            {
                m_Region = QuestHelper.FindRegion( region );
                m_Enter = enterRegion;
                m_Leave = leaveRegion;

                if ( m_Region == null )
                    Console.WriteLine( String.Format( "Invalid region name ('{0}') in '{1}' objective!", region, GetType() ) );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:15,代码来源:QuestObjectives.cs


示例16: FromRegion

		public static Town FromRegion( Region reg )
		{
			if ( reg.Map != Faction.Facet )
				return null;

			List<Town> towns = Towns;

			for ( int i = 0; i < towns.Count; ++i )
			{
				Town town = towns[i];

				if ( reg.IsPartOf( town.Definition.Region ) )
					return town;
			}

			return null;
		}
开发者ID:Godkong,项目名称:RunUO,代码行数:17,代码来源:Town.cs


示例17: FromRegion

		public static Town FromRegion( Region reg )
		{
			if ( reg.Map != Faction.Facet )
				return null;

			TownCollection towns = Towns;

			for ( int i = 0; i < towns.Count; ++i )
			{
				Town town = towns[i];

				if ( town.Definition.Region == reg.Name )
					return town;
			}

			return null;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:17,代码来源:Town.cs


示例18: RegionArea

        public static Rectangle3D[] RegionArea(Region region)
        {
            #if(RunUO_1_Final)

                Rectangle3D[] rects = new Rectangle3D[region.Coords.Count];
                Rectangle2D rect = new Rectangle2D(Point2D.Zero, Point2D.Zero);

                for (int i = 0; i < rects.Length && i < region.Coords.Count; ++i)
                {
                    rect = (Rectangle2D)region.Coords[i];
                    rects[i] = new Rectangle3D(new Point3D(rect.Start.X, rect.Start.Y, region.MinZ), new Point3D(rect.End.X, rect.End.Y, region.MaxZ));
                }

                return rects;

            #elif(RunUO_2_RC1)
                return region.Area;
            #endif
        }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:19,代码来源:RUOVersion.cs


示例19: TownRegion

        public TownRegion( XmlElement xml, Map map, Region parent )
            : base(xml, map, parent)
        {
            string frag = Name.ToLower();
            if (frag == "serpent's hold")
                frag = "serphold";
            else if (frag == "skara brae")
                frag = "skara";
            else if (frag == "nujel'm")
                frag = "nujelm";
            else if (frag == "buccaneer's den")
                frag = "bucden";

            try
            {
                m_Frag = (RegionFragment)Enum.Parse(typeof(RegionFragment), frag, true);
            }
            catch (Exception)
            {
                m_Frag = RegionFragment.Wilderness;
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:22,代码来源:TownRegion.cs


示例20: HasRegionPoints

		public bool HasRegionPoints(Region r)
		{
			if (r != null && r.Coords.Count > 0) return true;
			else
				return false;
		}
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:6,代码来源:XmlSpawner2.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Server.ResistanceMod类代码示例发布时间:2022-05-26
下一篇:
C# Server.Rectangle2D类代码示例发布时间: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