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


C# Server.Region类代码示例

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


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


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