From 5227933c235898679baf31f307374415e6306d13 Mon Sep 17 00:00:00 2001 From: xavier Date: Mon, 19 Sep 2011 23:05:22 +0000 Subject: [PATCH] --- Scripts/Spells/Necromancy/AnimateDeadSpell.cs | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/Scripts/Spells/Necromancy/AnimateDeadSpell.cs b/Scripts/Spells/Necromancy/AnimateDeadSpell.cs index 3cce576b4..6d3e7a7cc 100644 --- a/Scripts/Spells/Necromancy/AnimateDeadSpell.cs +++ b/Scripts/Spells/Necromancy/AnimateDeadSpell.cs @@ -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 } ); } } }