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


C# InternalItem.ProcessDelta方法代码示例

本文整理汇总了C#中InternalItem.ProcessDelta方法的典型用法代码示例。如果您正苦于以下问题:C# InternalItem.ProcessDelta方法的具体用法?C# InternalItem.ProcessDelta怎么用?C# InternalItem.ProcessDelta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在InternalItem的用法示例。


在下文中一共展示了InternalItem.ProcessDelta方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Target

		public void Target( IPoint3D p )
		{
			if ( !Caster.CanSee( p ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
			{
				SpellHelper.Turn( Caster, p );

				SpellHelper.GetSurfaceTop( ref p );

				int dx = Caster.Location.X - p.X;
				int dy = Caster.Location.Y - p.Y;
				int rx = (dx - dy) * 44;
				int ry = (dx + dy) * 44;

				bool eastToWest;

				if ( rx >= 0 && ry >= 0 )
				{
					eastToWest = false;
				}
				else if ( rx >= 0 )
				{
					eastToWest = true;
				}
				else if ( ry >= 0 )
				{
					eastToWest = true;
				}
				else
				{
					eastToWest = false;
				}

				Effects.PlaySound( p, Caster.Map, 0x20B );

				TimeSpan duration = TimeSpan.FromSeconds( Caster.Skills[SkillName.Magery].Value * 0.28 + 2.0 ); // (28% of magery) + 2.0 seconds

				int itemID = eastToWest ? 0x3946 : 0x3956;

				for ( int i = -2; i <= 2; ++i )
				{
					Point3D loc = new Point3D( eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z );
					bool canFit = SpellHelper.AdjustField( ref loc, Caster.Map, 12, false );

					if ( !canFit )
						continue;

					Item item = new InternalItem( loc, Caster.Map, duration, itemID, Caster );
					item.ProcessDelta();

					Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5051 );
				}
			}

			FinishSequence();
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:59,代码来源:EnergyField.cs

示例2: Target

        public void Target( IPoint3D p )
        {
            if ( !Caster.CanSee( p ) )
            {
                Caster.SendAsciiMessage( "Target can not be seen." ); // Target can not be seen.
            }
            else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
            {
                SpellHelper.Turn( Caster, p );

                SpellHelper.GetSurfaceTop( ref p );

                int dx = Caster.Location.X - p.X;
                int dy = Caster.Location.Y - p.Y;
                int rx = (dx - dy) * 44;
                int ry = (dx + dy) * 44;

                bool eastToWest;

                if ( rx >= 0 && ry >= 0 )
                    eastToWest = false;
                else if ( rx >= 0 )
                    eastToWest = true;
                else if ( ry >= 0 )
                    eastToWest = true;
                else
                    eastToWest = false;

                Effects.PlaySound( p, Caster.Map, 0x20B );

                int itemID = eastToWest ? 0x3967 : 0x3979;

                //TimeSpan duration = TimeSpan.FromSeconds( 3.0 + (Caster.Skills[SkillName.Magery].Value / 3.0) );
                //preliminary equation
                int SpellNum = 47;
                TimeSpan duration = TimeSpan.FromSeconds(15 + ((Caster.Skills[SkillName.Magery].Value * 2) / ((SpellNum - 1) / 8) + 1));

                for ( int i = -2; i <= 2; ++i )
                {
                    Point3D loc = new Point3D( eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z );
                    bool canFit = SpellHelper.AdjustField( ref loc, Caster.Map, 12, false );

                    if ( !canFit )
                        continue;

                    Item item = new InternalItem( Caster, itemID, loc, Caster.Map, duration );
                    item.ProcessDelta();

                    Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5048 );
                }
            }

            FinishSequence();
        }
开发者ID:Godkong,项目名称:Origins,代码行数:54,代码来源:ParalyzeField.cs

示例3: Target

		public void Target(IPoint3D p)
		{
			if ( !Caster.CanSee( p ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if (SphereSpellTarget is BaseWand)
            {
                BaseWand bw = SphereSpellTarget as BaseWand;
                bw.RechargeWand(Caster, this);
            }
			else if (CheckSequence())
			{
				SpellHelper.GetSurfaceTop(ref p);

				int dx = Caster.Location.X - p.X;
				int dy = Caster.Location.Y - p.Y;
				int rx = (dx - dy) * 44;
				int ry = (dx + dy) * 44;

				bool eastToWest;

				if (rx >= 0 && ry >= 0)
					eastToWest = false;
				else if (rx >= 0)
					eastToWest = true;
				else if (ry >= 0)
					eastToWest = true;
				else
					eastToWest = false;

				Effects.PlaySound(p, Caster.Map, Sound);

				int itemID = eastToWest ? 0x3967 : 0x3979;

				TimeSpan duration = TimeSpan.FromSeconds(3.0 + (Caster.Skills[SkillName.Magery].Value / 3.0));

				List<Item> itemList = new List<Item>();
				for (int i = -3; i <= 3; ++i)
				{
					Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z);
                    //bool canFit = SpellHelper.AdjustField(ref loc, Caster.Map, 12, false);

                    //if (!canFit)
                    //    continue;

                    IPooledEnumerable eable = Caster.Map.GetMobilesInRange(loc, 0);

                    foreach (Mobile m in eable)
                    {
                        if (m.AccessLevel != AccessLevel.Player || !m.Alive || (m is PlayerMobile && ((PlayerMobile)m).Young))
                            continue;

                        //Taran: The whole field counts as a harmful action, not just the target
                        if (m.Location.Z - loc.Z < 18 && m.Location.Z - loc.Z > -10)
                            Caster.DoHarmful(m);

                        if (m is BaseCreature)
                            ((BaseCreature)m).OnHarmfulSpell(Caster);
                    }

					Item item = new InternalItem(Caster, itemID, loc, Caster.Map, duration);
					itemList.Add(item);
					item.ProcessDelta();
				}

				if (itemList.Count > 0)
					new FreezeTimer(itemList, Sound, duration.Seconds).Start();

                if (SphereSpellTarget is Mobile)
                {
                    InternalItem castItem = new InternalItem(Caster, itemID, (SphereSpellTarget as Mobile).Location, Caster.Map, duration);
                    castItem.OnMoveOver(SphereSpellTarget as Mobile);
                    //Caster.DoHarmful(SphereSpellTarget as Mobile); - This check is now made for each field tile
                    castItem.Delete();
                    if (SphereSpellTarget is BaseCreature && ((BaseCreature)SphereSpellTarget).ParalyzeImmune)
                        ((Mobile)SphereSpellTarget).PublicOverheadMessage(MessageType.Emote, 0x3B2, true, "The paralyze spell seems to have no effect");
                }

				//Mobile mob = SphereSpellTarget as Mobile;

				/*if (mob != null)
				{
					InternalItem castItem = new InternalItem(Caster, itemID, mob.Location, Caster.Map, duration);
					castItem.OnMoveOver(mob);
					Caster.DoHarmful(mob);


					castItem.Delete();
				}*/
			}

			FinishSequence();
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:94,代码来源:ParalyzeField.cs

示例4: Target

		public void Target( IPoint3D p )
		{
			if ( !Caster.CanSee( p ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
            else if (SphereSpellTarget is BaseWand)
            {
                BaseWand bw = SphereSpellTarget as BaseWand;
                bw.RechargeWand(Caster, this);
            }
			else if ( CheckSequence() )
			{

				SpellHelper.GetSurfaceTop( ref p );

				int dx = Caster.Location.X - p.X;
				int dy = Caster.Location.Y - p.Y;
				int rx = (dx - dy) * 44;
				int ry = (dx + dy) * 44;

				bool eastToWest;

				if ( rx >= 0 && ry >= 0 )
				{
					eastToWest = false;
				}
				else if ( rx >= 0 )
				{
					eastToWest = true;
				}
				else if ( ry >= 0 )
				{
					eastToWest = true;
				}
				else
				{
					eastToWest = false;
				}

				Effects.PlaySound( p, Caster.Map, Sound );

				TimeSpan duration;

				if ( Core.AOS )
					duration = TimeSpan.FromSeconds( (15 + (Caster.Skills.Magery.Fixed / 5)) / 7 );
				else
					duration = TimeSpan.FromSeconds( Caster.Skills[SkillName.Magery].Value * 0.28 + 2.0 ); // (28% of magery) + 2.0 seconds

				int itemID = eastToWest ? 0x3946 : 0x3956;

                List<Item> itemList = new List<Item>();
				for ( int i = -3; i <= 3; ++i )
				{
                    Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z);
                    bool canFit = SpellHelper.AdjustField(ref loc, Caster.Map, 12, false);

                    if (!canFit)
                        continue;

					Item item = new InternalItem( loc, Caster.Map, duration, itemID, Caster );
				    itemList.Add(item);
					item.ProcessDelta();

					Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5051 );
				}

                if (itemList.Count > 0)
                    new SoundTimer(itemList, Sound).Start();
			}

			FinishSequence();
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:73,代码来源:EnergyField.cs

示例5: Target

		public void Target( IPoint3D p )
		{
			if ( !Caster.CanSee( p ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
			{
				SpellHelper.Turn( Caster, p );

				SpellHelper.GetSurfaceTop( ref p );

				int dx = Caster.Location.X - p.X;
				int dy = Caster.Location.Y - p.Y;
				int rx = (dx - dy) * 44;
				int ry = (dx + dy) * 44;

				bool eastToWest;

				if ( rx >= 0 && ry >= 0 )
					eastToWest = false;
				else if ( rx >= 0 )
					eastToWest = true;
				else if ( ry >= 0 )
					eastToWest = true;
				else
					eastToWest = false;

				Effects.PlaySound( p, Caster.Map, 0x20B );

				int itemID = eastToWest ? 0x3967 : 0x3979;

				TimeSpan duration = TimeSpan.FromSeconds( 3.0 + (Caster.Skills[SkillName.Magery].Value / 3.0) );

				for ( int i = -2; i <= 2; ++i )
				{
					Point3D loc = new Point3D( eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z );
					bool canFit = SpellHelper.AdjustField( ref loc, Caster.Map, 12, false );

					if ( !canFit )
						continue;

					Item item = new InternalItem( Caster, itemID, loc, Caster.Map, duration );
				
					int hours, minutes;

					Server.Items.Clock.GetTime( Caster.Map, loc.X, loc.Y, out hours, out minutes );

					if(hours >= 6 && hours < 22 && item.Light != LightType.Empty && !SpellHelper.IsFeluccaDungeon(item.Map, item.Location)) //its daytime disable light
						item.Light = LightType.Empty;
					else
						item.Light = LightType.Circle300;
					item.ProcessDelta();

					Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5048 );
				}
			}

			FinishSequence();
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:60,代码来源:ParalyzeField.cs


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