Fixes casting checks
This commit is contained in:
parent
7ea00fbf4f
commit
03dd5f1926
431 changed files with 5616 additions and 6250 deletions
|
|
@ -24,7 +24,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( !IsValidLocation( Caster.Location, Caster.Map ) )
|
||||
if ( !IsValidLocation( Caster.Location, Caster.Map ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1072705 ); // You must be standing on an arcane circle, pentagram or abbatoir to use this spell.
|
||||
return false;
|
||||
|
|
@ -41,7 +41,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
if( CheckSequence() )
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.FixedParticles( 0x3779, 10, 20, 0x0, EffectLayer.Waist );
|
||||
Caster.PlaySound( 0x5C0 );
|
||||
|
|
@ -68,7 +68,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
LandTile lt = map.Tiles.GetLandTile( location.X, location.Y ); // Land Tiles
|
||||
|
||||
if( IsValidTile( lt.ID ) && lt.Z == location.Z )
|
||||
if ( IsValidTile( lt.ID ) && lt.Z == location.Z )
|
||||
return true;
|
||||
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles( location.X, location.Y ); // Static Tiles
|
||||
|
|
@ -80,9 +80,9 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
int tand = t.ID;
|
||||
|
||||
if( t.Z + id.CalcHeight != location.Z )
|
||||
if ( t.Z + id.CalcHeight != location.Z )
|
||||
continue;
|
||||
else if( IsValidTile( tand ) )
|
||||
else if ( IsValidTile( tand ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -92,9 +92,9 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
ItemData id = item.ItemData;
|
||||
|
||||
if( item == null || item.Z + id.CalcHeight != location.Z )
|
||||
if ( item == null || item.Z + id.CalcHeight != location.Z )
|
||||
continue;
|
||||
else if( IsValidTile( item.ItemID ) )
|
||||
else if ( IsValidTile( item.ItemID ) )
|
||||
{
|
||||
eable.Free();
|
||||
return true;
|
||||
|
|
@ -132,15 +132,15 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
private void GiveArcaneFocus( Mobile to, TimeSpan duration, int strengthBonus )
|
||||
{
|
||||
if( to == null ) //Sanity
|
||||
if ( to == null ) //Sanity
|
||||
return;
|
||||
|
||||
ArcaneFocus focus = FindArcaneFocus( to );
|
||||
|
||||
if( focus == null )
|
||||
if ( focus == null )
|
||||
{
|
||||
ArcaneFocus f = new ArcaneFocus( duration, strengthBonus );
|
||||
if( to.PlaceInBackpack( f ) )
|
||||
if ( to.PlaceInBackpack( f ) )
|
||||
{
|
||||
f.SendTimeRemainingMessage( to );
|
||||
to.SendLocalizedMessage( 1072740 ); // An arcane focus appears in your backpack.
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( !TransformationSpellHelper.CheckCast( Caster, this ) )
|
||||
if ( !TransformationSpellHelper.CheckCast( Caster, this ) )
|
||||
return false;
|
||||
|
||||
return base.CheckCast();
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( !base.CheckCast() )
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if( (Caster.Followers + 1) > Caster.FollowersMax )
|
||||
if ( (Caster.Followers + 1) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1074270 ); // You have too many followers to summon another one.
|
||||
return false;
|
||||
|
|
@ -29,7 +29,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
if( CheckSequence() )
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
TimeSpan duration = TimeSpan.FromMinutes( Caster.Skills.Spellweaving.Value /24 + FocusLevel*2 );
|
||||
int summons = Math.Min( 1+FocusLevel, Caster.FollowersMax - Caster.Followers );
|
||||
|
|
@ -48,4 +48,4 @@ namespace Server.Spells.Spellweaving
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
ArcaneFocus focus = FindArcaneFocus( from );
|
||||
|
||||
if( focus == null || focus.Deleted )
|
||||
if ( focus == null || focus.Deleted )
|
||||
return 0;
|
||||
|
||||
return focus.StrengthBonus;
|
||||
|
|
@ -40,7 +40,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public static ArcaneFocus FindArcaneFocus( Mobile from )
|
||||
{
|
||||
if( from == null || from.Backpack == null )
|
||||
if ( from == null || from.Backpack == null )
|
||||
return null;
|
||||
|
||||
if ( from.Holding is ArcaneFocus )
|
||||
|
|
@ -51,10 +51,10 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public static bool CheckExpansion( Mobile from )
|
||||
{
|
||||
if( !(from is PlayerMobile) )
|
||||
if ( !(from is PlayerMobile) )
|
||||
return true;
|
||||
|
||||
if( from.NetState == null )
|
||||
if ( from.NetState == null )
|
||||
return false;
|
||||
|
||||
return from.NetState.SupportsExpansion( Expansion.ML );
|
||||
|
|
@ -62,7 +62,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( !base.CheckCast() )
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
Mobile caster = Caster;
|
||||
|
|
@ -126,7 +126,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
base.OnDisturb( type, message );
|
||||
|
||||
if( message )
|
||||
if ( message )
|
||||
Caster.PlaySound( 0x1D6 );
|
||||
}
|
||||
|
||||
|
|
@ -147,10 +147,10 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
double percent = (50 + 2*(GetResistSkill( m ) - GetDamageSkill( Caster )))/100; //TODO: According to the guide this is it.. but.. is it correct per OSI?
|
||||
|
||||
if( percent <= 0 )
|
||||
if ( percent <= 0 )
|
||||
return false;
|
||||
|
||||
if( percent >= 1.0 )
|
||||
if ( percent >= 1.0 )
|
||||
return true;
|
||||
|
||||
return (percent >= Utility.RandomDouble());
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( m_Table.ContainsKey( Caster ) )
|
||||
if ( m_Table.ContainsKey( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501775 ); // This spell is already in effect.
|
||||
return false;
|
||||
}
|
||||
else if( !Caster.CanBeginAction( typeof( AttuneWeaponSpell ) ) )
|
||||
else if ( !Caster.CanBeginAction( typeof( AttuneWeaponSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1075124 ); // You must wait before casting that spell again.
|
||||
return false;
|
||||
|
|
@ -39,7 +39,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
if( CheckSequence() )
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.PlaySound( 0x5C3 );
|
||||
Caster.FixedParticles( 0x3728, 1, 13, 0x26B8, 0x455, 7, EffectLayer.Waist );
|
||||
|
|
@ -69,7 +69,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public static void TryAbsorb( Mobile defender, ref int damage )
|
||||
{
|
||||
if( damage == 0 || !IsAbsorbing( defender ) || defender.MeleeDamageAbsorb <= 0 )
|
||||
if ( damage == 0 || !IsAbsorbing( defender ) || defender.MeleeDamageAbsorb <= 0 )
|
||||
return;
|
||||
|
||||
int absorbed = Math.Min( damage, defender.MeleeDamageAbsorb );
|
||||
|
|
@ -79,7 +79,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
defender.SendLocalizedMessage( 1075127, String.Format( "{0}\t{1}", absorbed, defender.MeleeDamageAbsorb ) ); // ~1_damage~ point(s) of damage have been absorbed. A total of ~2_remaining~ point(s) of shielding remain.
|
||||
|
||||
if( defender.MeleeDamageAbsorb <= 0 )
|
||||
if ( defender.MeleeDamageAbsorb <= 0 )
|
||||
StopAbsorbing( defender, true );
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
m_Mobile.MeleeDamageAbsorb = 0;
|
||||
|
||||
if( message )
|
||||
if ( message )
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage( 1075126 ); // Your attunement fades.
|
||||
m_Mobile.PlaySound( 0x1F8 );
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
if( CheckSequence() )
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.PlaySound( 0x5C6 );
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
foreach( Mobile m in Caster.GetMobilesInRange( range ) )
|
||||
{
|
||||
if( Caster != m && Caster.InLOS( m ) && SpellHelper.ValidIndirectTarget( Caster, m ) && Caster.CanBeHarmful( m, false ) )
|
||||
if ( Caster != m && Caster.InLOS( m ) && SpellHelper.ValidIndirectTarget( Caster, m ) && Caster.CanBeHarmful( m, false ) )
|
||||
targets.Add( m );
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
SpellHelper.Damage( this, m, damage, 0, 0, 100, 0, 0 );
|
||||
|
||||
if( !CheckResisted( m ) ) //No message on resist
|
||||
if ( !CheckResisted( m ) ) //No message on resist
|
||||
{
|
||||
m_Table[m] = new EssenceOfWindInfo( m, fcMalus, ssiMalus, duration );
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
Stop();
|
||||
/*
|
||||
if( message )
|
||||
if ( message )
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
EventSink.AggressiveAction += new AggressiveActionEventHandler( delegate( AggressiveActionEventArgs e )
|
||||
{
|
||||
if( TransformationSpellHelper.UnderTransformation( e.Aggressor, typeof( EtherealVoyageSpell ) ) )
|
||||
if ( TransformationSpellHelper.UnderTransformation( e.Aggressor, typeof( EtherealVoyageSpell ) ) )
|
||||
{
|
||||
TransformationSpellHelper.RemoveContext( e.Aggressor, true );
|
||||
}
|
||||
|
|
@ -35,15 +35,15 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( TransformationSpellHelper.UnderTransformation( Caster, typeof( EtherealVoyageSpell ) ) )
|
||||
if ( TransformationSpellHelper.UnderTransformation( Caster, typeof( EtherealVoyageSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501775 ); // This spell is already in effect.
|
||||
}
|
||||
else if( !Caster.CanBeginAction( typeof( EtherealVoyageSpell ) ) )
|
||||
else if ( !Caster.CanBeginAction( typeof( EtherealVoyageSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1075124 ); // You must wait before casting that spell again.
|
||||
}
|
||||
else if( Caster.Combatant != null )
|
||||
else if ( Caster.Combatant != null )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1072586 ); // You cannot cast Ethereal Voyage while you are in combat.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,25 +41,25 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
BaseCreature bc = m as BaseCreature;
|
||||
|
||||
if( !Caster.CanSee( m ) )
|
||||
if ( !Caster.CanSee( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
||||
}
|
||||
else if( m.IsDeadBondedPet || !m.Alive )
|
||||
else if ( m.IsDeadBondedPet || !m.Alive )
|
||||
{
|
||||
// As per Osi: Nothing happens.
|
||||
}
|
||||
else if( m != Caster && (bc == null || !bc.IsBonded || bc.ControlMaster != Caster) )
|
||||
else if ( m != Caster && (bc == null || !bc.IsBonded || bc.ControlMaster != Caster) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1072077 ); // You may only cast this spell on yourself or a bonded pet.
|
||||
}
|
||||
else if( m_Table.ContainsKey( m ) )
|
||||
else if ( m_Table.ContainsKey( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501775 ); // This spell is already in effect.
|
||||
}
|
||||
else if( CheckBSequence( m ) )
|
||||
else if ( CheckBSequence( m ) )
|
||||
{
|
||||
if( Caster == m )
|
||||
if ( Caster == m )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1074774 ); // You weave powerful magic, protecting yourself from death.
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public static void HandleDeath( Mobile m )
|
||||
{
|
||||
if( m_Table.ContainsKey( m ) )
|
||||
if ( m_Table.ContainsKey( m ) )
|
||||
Timer.DelayCall<Mobile>( TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 4 ) ), new TimerStateCallback<Mobile>( HandleDeath_OnCallback ), m );
|
||||
}
|
||||
|
||||
|
|
@ -103,12 +103,12 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
double hitsScalar = timer.Spell.HitsScalar;
|
||||
|
||||
if( m is BaseCreature && m.IsDeadBondedPet )
|
||||
if ( m is BaseCreature && m.IsDeadBondedPet )
|
||||
{
|
||||
BaseCreature pet = (BaseCreature)m;
|
||||
Mobile master = pet.GetMaster();
|
||||
|
||||
if( master != null && master.NetState != null && Utility.InUpdateRange( pet, master ) )
|
||||
if ( master != null && master.NetState != null && Utility.InUpdateRange( pet, master ) )
|
||||
{
|
||||
master.CloseGump( typeof( PetResurrectGump ) );
|
||||
master.SendGump( new PetResurrectGump( master, pet, hitsScalar ) );
|
||||
|
|
@ -121,7 +121,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
Mobile friend = friends[i];
|
||||
|
||||
if( friend.NetState != null && Utility.InUpdateRange( pet, friend ) )
|
||||
if ( friend.NetState != null && Utility.InUpdateRange( pet, friend ) )
|
||||
{
|
||||
friend.CloseGump( typeof( PetResurrectGump ) );
|
||||
friend.SendGump( new PetResurrectGump( friend, pet ) );
|
||||
|
|
@ -148,7 +148,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
Mobile m = e.Mobile;
|
||||
|
||||
if( m == null || m.Alive || m_Table[m] == null )
|
||||
if ( m == null || m.Alive || m_Table[m] == null )
|
||||
return;
|
||||
|
||||
HandleDeath_OnCallback( m );
|
||||
|
|
@ -197,7 +197,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
protected override void OnTarget( Mobile m, object o )
|
||||
{
|
||||
if( o is Mobile )
|
||||
if ( o is Mobile )
|
||||
{
|
||||
m_Owner.Target( (Mobile)o );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,26 +29,26 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public void Target( Mobile m )
|
||||
{
|
||||
if( !Caster.CanSee( m ) )
|
||||
if ( !Caster.CanSee( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
||||
}
|
||||
if( m_Table.ContainsKey( m ) )
|
||||
if ( m_Table.ContainsKey( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501775 ); // This spell is already in effect.
|
||||
}
|
||||
else if( !Caster.CanBeginAction( typeof( GiftOfRenewalSpell ) ) )
|
||||
else if ( !Caster.CanBeginAction( typeof( GiftOfRenewalSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
|
||||
}
|
||||
else if( CheckBSequence( m ) )
|
||||
else if ( CheckBSequence( m ) )
|
||||
{
|
||||
SpellHelper.Turn( Caster, m );
|
||||
|
||||
Caster.FixedEffect( 0x374A, 10, 20 );
|
||||
Caster.PlaySound( 0x5C9 );
|
||||
|
||||
if( m.Poisoned )
|
||||
if ( m.Poisoned )
|
||||
{
|
||||
m.CurePoison( m );
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ namespace Server.Spells.Spellweaving
|
|||
Timer.DelayCall( duration,
|
||||
delegate
|
||||
{
|
||||
if( StopEffect( m ) )
|
||||
if ( StopEffect( m ) )
|
||||
{
|
||||
m.PlaySound( 0x455 );
|
||||
m.SendLocalizedMessage( 1075071 ); // The Gift of Renewal has faded.
|
||||
|
|
@ -118,20 +118,20 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
Mobile m = m_Info.m_Mobile;
|
||||
|
||||
if( !m_Table.ContainsKey( m ) )
|
||||
if ( !m_Table.ContainsKey( m ) )
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if( !m.Alive )
|
||||
if ( !m.Alive )
|
||||
{
|
||||
Stop();
|
||||
StopEffect( m );
|
||||
return;
|
||||
}
|
||||
|
||||
if( m.Hits >= m.HitsMax )
|
||||
if ( m.Hits >= m.HitsMax )
|
||||
return;
|
||||
|
||||
int toHeal = m_Info.m_HitsPerRound;
|
||||
|
|
@ -170,7 +170,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
protected override void OnTarget( Mobile m, object o )
|
||||
{
|
||||
if( o is Mobile )
|
||||
if ( o is Mobile )
|
||||
{
|
||||
m_Owner.Target( (Mobile)o );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Server.Items
|
|||
public override bool Nontransferable => true;
|
||||
public override void HandleInvalidTransfer( Mobile from )
|
||||
{
|
||||
if( InvalidTransferMessage != null )
|
||||
if ( InvalidTransferMessage != null )
|
||||
TextDefinition.SendMessageTo( from, InvalidTransferMessage );
|
||||
|
||||
this.Delete();
|
||||
|
|
@ -41,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public virtual void Expire( Mobile parent )
|
||||
{
|
||||
if( parent != null )
|
||||
if ( parent != null )
|
||||
parent.SendLocalizedMessage( 1072515, (this.Name == null ? String.Format( "#{0}", LabelNumber ): this.Name) ); // The ~1_name~ expired...
|
||||
|
||||
Effects.PlaySound( GetWorldLocation(), Map, 0x201 );
|
||||
|
|
@ -56,7 +56,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if( m_Timer != null )
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnDelete();
|
||||
|
|
@ -64,7 +64,7 @@ namespace Server.Items
|
|||
|
||||
public virtual void CheckExpiry()
|
||||
{
|
||||
if( (m_CreationTime + m_LifeSpan) < DateTime.UtcNow )
|
||||
if ( (m_CreationTime + m_LifeSpan) < DateTime.UtcNow )
|
||||
Expire( RootParent as Mobile );
|
||||
else
|
||||
InvalidateProperties();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace Server.Mobiles
|
|||
PlaySound( 0xE );
|
||||
PlaySound( 0x1BC );
|
||||
|
||||
if( Alive && !Deleted )
|
||||
if ( Alive && !Deleted )
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 7.0 ), DoEffects );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
TransformContext context = TransformationSpellHelper.GetContext( e.Mobile );
|
||||
|
||||
if( context != null && context.Type == typeof( ReaperFormSpell ) )
|
||||
if ( context != null && context.Type == typeof( ReaperFormSpell ) )
|
||||
e.Mobile.Send( SpeedControl.WalkSpeed );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
if( CheckSequence() )
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.PlaySound( 0x5CE );
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
foreach( Mobile m in Caster.GetMobilesInRange( range ) )
|
||||
{
|
||||
if( Caster != m && SpellHelper.ValidIndirectTarget( Caster, m ) && Caster.CanBeHarmful( m, false ) && Caster.InLOS( m ) )
|
||||
if ( Caster != m && SpellHelper.ValidIndirectTarget( Caster, m ) && Caster.CanBeHarmful( m, false ) && Caster.InLOS( m ) )
|
||||
targets.Add( m );
|
||||
}
|
||||
|
||||
|
|
@ -63,9 +63,9 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
SpellHelper.Damage( this, m, ( m.Player && Caster.Player ) ? pvpDamage : pvmDamage, 0, 0, 0, 0, 100 );
|
||||
|
||||
if( oldSpell != null && oldSpell != m.Spell )
|
||||
if ( oldSpell != null && oldSpell != m.Spell )
|
||||
{
|
||||
if( !CheckResisted( m ) )
|
||||
if ( !CheckResisted( m ) )
|
||||
{
|
||||
m_Table[m] = Timer.DelayCall<Mobile>( duration, DoExpire, m );
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public void Target( Mobile m )
|
||||
{
|
||||
if( !Caster.CanSee( m ) )
|
||||
if ( !Caster.CanSee( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
||||
}
|
||||
else if( CheckHSequence( m ) )
|
||||
else if ( CheckHSequence( m ) )
|
||||
{
|
||||
Point3D loc = m.Location;
|
||||
loc.Z += 50;
|
||||
|
|
@ -42,7 +42,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
int damage;
|
||||
|
||||
if( !m.Player && (((double)m.Hits / (double)m.HitsMax) < percentage ))
|
||||
if ( !m.Player && (((double)m.Hits / (double)m.HitsMax) < percentage ))
|
||||
{
|
||||
damage = 300;
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
protected override void OnTarget( Mobile m, object o )
|
||||
{
|
||||
if( o is Mobile )
|
||||
if ( o is Mobile )
|
||||
{
|
||||
m_Owner.Target( (Mobile)o );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue