當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。