This commit is contained in:
xavier 2011-09-19 23:05:22 +00:00
parent 9bab3ea7a6
commit 5227933c23

View file

@ -185,7 +185,7 @@ namespace Server.Spells.Necromancy
Corpse c = obj as Corpse;
if ( c == null )
if( c == null )
{
Caster.SendLocalizedMessage( 1061084 ); // You cannot animate that.
}
@ -197,35 +197,31 @@ namespace Server.Spells.Necromancy
{
type = c.Owner.GetType();
}
if( c.ItemID != 0x2006 && !c.Animated )
if( c.ItemID != 0x2006 || c.Animated || type == typeof( PlayerMobile ) || type == null || ( c.Owner != null && c.Owner.Fame < 100 ) || ( ( c.Owner != null ) && ( c.Owner is BaseCreature ) && ( ( ( BaseCreature )c.Owner ).Summoned || ( ( BaseCreature )c.Owner ).IsBonded ) ) )
{
if( type == typeof( PlayerMobile ) || type == null || ( c.Owner != null && c.Owner.Fame < 100 ) || ( ( c.Owner != null ) && ( c.Owner is BaseCreature ) && ( ( ( BaseCreature )c.Owner ).Summoned || ( ( BaseCreature )c.Owner ).IsBonded ) ) )
{
Caster.SendLocalizedMessage( 1061085 ); // There's not enough life force there to animate.
}
else
{
CreatureGroup group = FindGroup( type );
Caster.SendLocalizedMessage( 1061085 ); // There's not enough life force there to animate.
}
else
{
CreatureGroup group = FindGroup( type );
if( group != null )
if( group != null )
{
if( group.m_Entries.Length == 0 || type == typeof( DemonKnight ) )
{
if( group.m_Entries.Length == 0 || type == typeof( DemonKnight ) )
{
Caster.SendLocalizedMessage( 1061086 ); // You cannot animate undead remains.
}
else if( CheckSequence() )
{
Point3D p = c.GetWorldLocation();
Map map = c.Map;
Caster.SendLocalizedMessage( 1061086 ); // You cannot animate undead remains.
}
else if( CheckSequence() )
{
Point3D p = c.GetWorldLocation();
Map map = c.Map;
if( map != null )
{
Effects.PlaySound( p, map, 0x1FB );
Effects.SendLocationParticles( EffectItem.Create( p, map, EffectItem.DefaultDuration ), 0x3789, 1, 40, 0x3F, 3, 9907, 0 );
if( map != null )
{
Effects.PlaySound( p, map, 0x1FB );
Effects.SendLocationParticles( EffectItem.Create( p, map, EffectItem.DefaultDuration ), 0x3789, 1, 40, 0x3F, 3, 9907, 0 );
Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerStateCallback( SummonDelay_Callback ), new object[] { Caster, c, p, map, group } );
}
Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerStateCallback( SummonDelay_Callback ), new object[] { Caster, c, p, map, group } );
}
}
}