本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}