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


C# CannedEvil.ChampionSpawn类代码示例

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


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

示例1: ChampionPlatform

        public ChampionPlatform(ChampionSpawn spawn)
        {
            m_Spawn = spawn;

            for (var x = -2; x <= 2; ++x)
                for (var y = -2; y <= 2; ++y)
                    AddComponent(0x750, x, y, -5);

            for (var x = -1; x <= 1; ++x)
                for (var y = -1; y <= 1; ++y)
                    AddComponent(0x750, x, y, 0);

            for (var i = -1; i <= 1; ++i)
            {
                AddComponent(0x751, i, 2, 0);
                AddComponent(0x752, 2, i, 0);

                AddComponent(0x753, i, -2, 0);
                AddComponent(0x754, -2, i, 0);
            }

            AddComponent(0x759, -2, -2, 0);
            AddComponent(0x75A, 2, 2, 0);
            AddComponent(0x75B, -2, 2, 0);
            AddComponent(0x75C, 2, -2, 0);
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:26,代码来源:ChampionPlatform.cs

示例2: ChampionPlatform

        public ChampionPlatform( ChampionSpawn spawn )
        {
            m_Spawn = spawn;

            // Base
            for ( int x = -2; x <= 2; ++x )
                for ( int y = -2; y <= 2; ++y )
                    AddComponent( 0x3EE, 0x452, x, y, -5 );

            // Base Superior
            for ( int x = -1; x <= 1; ++x )
                for ( int y = -1; y <= 1; ++y )
                    AddComponent( 0x3EE, 0x454, x, y, 0 );

            // Escalones
            for ( int i = -1; i <= 1; ++i )
            {
                AddComponent( 0x3EF, 0x452, i, 2, 0 );
                AddComponent( 0x3F0, 0x452, 2, i, 0 );

                AddComponent( 0x3F1, 0x452, i, -2, 0 );
                AddComponent( 0x3F2, 0x452, -2, i, 0 );
            }

            // Esquinas
            AddComponent( 0x3F7, 0x452, -2, -2, 0 );
            AddComponent( 0x3F8, 0x452, 2, 2, 0 );
            AddComponent( 0x3F9, 0x452, -2, 2, 0 );
            AddComponent( 0x3FA, 0x452, 2, -2, 0 );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:30,代码来源:ChampionPlatform.cs

示例3: ChampionPlatform

        public ChampionPlatform(ChampionSpawn spawn)
        {
            this.m_Spawn = spawn;

            for (int x = -2; x <= 2; ++x)
                for (int y = -2; y <= 2; ++y)
                    this.AddComponent(0x750, x, y, -5);

            for (int x = -1; x <= 1; ++x)
                for (int y = -1; y <= 1; ++y)
                    this.AddComponent(0x750, x, y, 0);

            for (int i = -1; i <= 1; ++i)
            {
                this.AddComponent(0x751, i, 2, 0);
                this.AddComponent(0x752, 2, i, 0);

                this.AddComponent(0x753, i, -2, 0);
                this.AddComponent(0x754, -2, i, 0);
            }

            this.AddComponent(0x759, -2, -2, 0);
            this.AddComponent(0x75A, 2, 2, 0);
            this.AddComponent(0x75B, -2, 2, 0);
            this.AddComponent(0x75C, 2, -2, 0);
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:26,代码来源:ChampionPlatform.cs

示例4: ChampionIdol

		public ChampionIdol( ChampionSpawn spawn ) : base( 0x1F18 )
		{
			m_Spawn = spawn;

			Name = "Idol of Champion";

			Movable = false;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:8,代码来源:ChampionIdol.cs

示例5: CheckValor

		public static bool CheckValor( ChampionSpawn spawn, Mobile from )
		{
			VirtueLevel level = VirtueHelper.GetLevel( from, VirtueName.Valor );

			if ( spawn != null && VirtueHelper.HasAny( from, VirtueName.Valor ) )
			{
				if ( level >= VirtueLevel.Seeker && spawn.Level < 5 )
					return true;
				else if ( level >= VirtueLevel.Follower && spawn.Level < 10 )
					return true;
				else if ( level >= VirtueLevel.Knight )
					return true;
			}

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

示例6: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Spawn = reader.ReadItem() as ChampionSpawn;

					if ( m_Spawn == null )
						Delete();

					break;
				}
			}
		}
开发者ID:Godkong,项目名称:Origins,代码行数:19,代码来源:ChampionAltar.cs

示例7: ChampionAltar

		public ChampionAltar( ChampionSpawn spawn )
		{
			m_Spawn = spawn;

			Hue = 0x455;
		}
开发者ID:greeduomacro,项目名称:xrunuo,代码行数:6,代码来源:ChampionAltar.cs

示例8: ChampionSpawnInfoGump

			public ChampionSpawnInfoGump(ChampionSpawn spawn)
				: base(40, 40)
			{
				m_Spawn = spawn;

				AddBackground(0, 0, gWidth, gBoarder * 2 + gRowHeight * (8 + spawn.m_DamageEntries.Count), 0x13BE);

				int top = gBoarder;
				AddLabel(gBoarder, top, gFontHue, "Champion Spawn Info Gump");
				top += gRowHeight;

				AddLabel(gTab[1], top, gFontHue, "Kills");
				AddLabel(gTab[2], top, gFontHue, spawn.Kills.ToString());
				top += gRowHeight;

				AddLabel(gTab[1], top, gFontHue, "Max Kills");
				AddLabel(gTab[2], top, gFontHue, spawn.MaxKills.ToString());
				top += gRowHeight;

				AddLabel(gTab[1], top, gFontHue, "Level");
				AddLabel(gTab[2], top, gFontHue, spawn.Level.ToString());
				top += gRowHeight;

				AddLabel(gTab[1], top, gFontHue, "Rank");
				AddLabel(gTab[2], top, gFontHue, spawn.Rank.ToString());
				top += gRowHeight;

				AddLabel(gTab[1], top, gFontHue, "Active");
				AddLabel(gTab[2], top, gFontHue, spawn.Active.ToString());
				top += gRowHeight;

				AddLabel(gTab[1], top, gFontHue, "Auto Restart");
				AddLabel(gTab[2], top, gFontHue, spawn.AutoRestart.ToString());
				top += gRowHeight;

				List<Damager> damagers = new List<Damager>();
				foreach (Mobile mob in spawn.m_DamageEntries.Keys)
				{
					damagers.Add(new Damager(mob, spawn.m_DamageEntries[mob]));
				}
				damagers = damagers.OrderByDescending(x => x.Damage).ToList<Damager>();

				foreach (Damager damager in damagers)
				{
					AddLabelCropped(gTab[1], top, 100, gRowHeight, gFontHue, damager.Mobile.RawName);
					AddLabelCropped(gTab[2], top, 80, gRowHeight, gFontHue, damager.Damage.ToString());
					top += gRowHeight;
				}

				AddButton(gWidth - (gBoarder + 30), top, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
				AddLabel(gWidth - (gBoarder + 100), top, gFontHue, "Refresh");
			}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:52,代码来源:ChampionSpawn.cs

示例9: ChampionSpawnRegion

 public ChampionSpawnRegion(ChampionSpawn spawn)
     : base(null, spawn.Map, Region.Find(spawn.Location, spawn.Map), spawn.SpawnArea)
 {
     m_Spawn = spawn;
 }
开发者ID:PepeBiondi,项目名称:runsa,代码行数:5,代码来源:ChampionSpawn.cs

示例10: CreateAltar

        private ChampionSpawn CreateAltar( SpawnRecord r, Map m, bool restartdisable )
        {
            ChampionSpawn cs = new ChampionSpawn();

            Point3D loc = new Point3D( r.x, r.y, r.z );

            if ( r.type == 0xff )
            {
                cs.RandomizeType = true;

                switch ( Utility.Random( 5 ) )
                {
                    case 0: cs.Type = ChampionSpawnType.VerminHorde; break;
                    case 1: cs.Type = ChampionSpawnType.UnholyTerror; break;
                    case 2: cs.Type = ChampionSpawnType.ColdBlood; break;
                    case 3: cs.Type = ChampionSpawnType.Abyss; break;
                    case 4: cs.Type = ChampionSpawnType.Arachnid; break;
                }
            }
            else
            {
                cs.RandomizeType = false;
                cs.Type = (ChampionSpawnType)r.type;
            }

            // Prevent autorestart of felucca & t2a the spawns

            if ( restartdisable )
                cs.RestartDelay = TimeSpan.FromDays( 9999 );

            cs.MoveToWorld( loc, m );

            return cs;
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:34,代码来源:ChampionSpawnController.cs

示例11: UpdatePuzzleState

 // internal code to update the puzzle state
 private void UpdatePuzzleState(ChampionSpawn altar)
 {
     if (!this.Deleted && null != altar && altar == this.m_Altar)
     {
         if (ChampionSpawnType.Infuse != this.m_Altar.Type || !this.Active)
             this.RemovePuzzleLevers();
         else if (0 == this.m_Levers.Count)
             this.CreatePuzzleLevers();
     }
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:11,代码来源:PrimevalLichPuzzle.cs

示例12: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                    m_Instance = reader.ReadItem() as PrimevalLichPuzzle;
                    this.m_Altar = reader.ReadItem() as ChampionSpawn;
                    this.m_Key = reader.ReadLong();
                    this.m_Successful = reader.ReadMobile();
                    this.m_Levers = reader.ReadStrongItemList<PrimevalLichPuzzleLever>();
                    break;
            }

            if (null == this.m_Levers)
                this.m_Levers = new List<PrimevalLichPuzzleLever>();
            //            if ( null != m_Instance && m_Instance.Deleted && this == m_Instance )
            //            {
            //                m_Instance = null;
            //                return;
            //            }
            //            // remove if no altar exists
            //            if ( null == m_Altar )
            //                Timer.DelayCall( TimeSpan.FromSeconds( 0.0 ), new TimerCallback( Delete ) );
            //            ResetLevers();
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:29,代码来源:PrimevalLichPuzzle.cs

示例13: Update

 // static hook for the ChampionSpawn code to update the puzzle state
 public static void Update(ChampionSpawn altar)
 {
     if (null != m_Instance)
     {
         if (m_Instance.Deleted)
             m_Instance = null;
         else if (m_Instance.ChampionAltar == altar)
             m_Instance.UpdatePuzzleState(altar);
     }
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:11,代码来源:PrimevalLichPuzzle.cs

示例14: UpdatePuzzleState

 // internal code to update the puzzle state
 private void UpdatePuzzleState( ChampionSpawn altar)
 {
     if ( !Deleted && null != altar && altar == m_Altar )
     {
         if ( ChampionSpawnType.LichLand != m_Altar.Type || !Active )
             RemovePuzzleLevers();
         else if ( 0 == m_Levers.Count )
             CreatePuzzleLevers();
     }
 }
开发者ID:suiy187,项目名称:runuocustom,代码行数:11,代码来源:PrimevalLichPuzzle.cs

示例15: Initialize

		public static void Initialize()
		{
			CommandSystem.Register("ChampionInfo", AccessLevel.GameMaster, new CommandEventHandler(ChampionInfo_OnCommand));

			if (!m_Enabled)
			{
				foreach (ChampionSpawn s in m_AllSpawns)
				{
					s.Delete();
				}
				m_Initialized = false;
				return;
			}

			m_Timer = new InternalTimer();

			if (m_Initialized)
				return;

			Utility.PushColor(ConsoleColor.White);
			Console.WriteLine("Generating Champion Spawns");
			Utility.PopColor();

			ChampionSpawn spawn;

			XmlDocument doc = new XmlDocument();
			doc.Load(m_ConfigPath);
			foreach (XmlNode node in doc.GetElementsByTagName("championSystem")[0].ChildNodes)
			{
				if (node.Name.Equals("spawn"))
				{
					spawn = new ChampionSpawn();
					spawn.SpawnName = GetAttr(node, "name", "Unamed Spawner");
					string value = GetAttr(node, "type", null);
					if(value == null)
						spawn.RandomizeType = true;
					else
						spawn.Type = (ChampionSpawnType)Enum.Parse(typeof(ChampionSpawnType), value);
					value = GetAttr(node, "spawnMod", "1.0");
					spawn.SpawnMod = double.Parse(value);
					value = GetAttr(node, "killsMod", "1.0");
					spawn.KillsMod = double.Parse(value);
					foreach(XmlNode child in node.ChildNodes)
					{
						if (child.Name.Equals("location"))
						{
							int x = int.Parse(GetAttr(child, "x", "0"));
							int y = int.Parse(GetAttr(child, "y", "0"));
							int z = int.Parse(GetAttr(child, "z", "0"));
							int r = int.Parse(GetAttr(child, "radius", "0"));
							string mapName = GetAttr(child, "map", "Felucca");
							Map map = Map.Parse(mapName);

							spawn.SpawnRadius = r;
							spawn.MoveToWorld(new Point3D(x, y, z), map);
						}
					}
					spawn.GroupName = GetAttr(node, "group", null);
					m_AllSpawns.Add(spawn);
				}
			}

			Rotate();

			m_Initialized = true;
		}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:66,代码来源:ChampionSystem.cs


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