Add DefaultName property to Mobiles & Items (#18)

This commit is contained in:
Kamron Batman 2018-08-09 17:18:41 -07:00 • committed by GitHub
parent b06f5bf60d
commit 8ee42c8ea2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
713 changed files with 5112 additions and 4987 deletions

View file

@ -13,7 +13,7 @@ namespace Server.Items
public abstract int MinDamage{ get; }
public abstract int MaxDamage{ get; }
public override bool RequireFreeHand{ get{ return false; } }
public override bool RequireFreeHand => false;
public BaseConflagrationPotion( PotionEffect effect ) : base( 0xF06, effect )
{
@ -82,7 +82,7 @@ namespace Server.Items
return;
Consume();
// Check if any other players are using this potion
for ( int i = 0; i < m_Users.Count; i ++ )
{
@ -117,7 +117,7 @@ namespace Server.Items
if ( timer != null )
timer.Stop();
m_Delay[ m ] = Timer.DelayCall( TimeSpan.FromSeconds( 30 ), new TimerStateCallback( EndDelay_Callback ), m );
m_Delay[ m ] = Timer.DelayCall( TimeSpan.FromSeconds( 30 ), new TimerStateCallback( EndDelay_Callback ), m );
}
public static int GetDelay( Mobile m )
@ -166,7 +166,7 @@ namespace Server.Items
{
if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
return;
IPoint3D p = targeted as IPoint3D;
if ( p == null || from.Map == null )
@ -201,7 +201,7 @@ namespace Server.Items
public Mobile From{ get{ return m_From; } }
public override bool BlocksFit{ get{ return true; } }
public override bool BlocksFit => true;
public InternalItem( Mobile from, Point3D loc, Map map, int min, int max ) : base( 0x398C )
{
@ -269,7 +269,7 @@ namespace Server.Items
base.Deserialize( reader );
int version = reader.ReadInt();
m_From = reader.ReadMobile();
m_End = reader.ReadDateTime();
m_MinDamage = reader.ReadInt();
@ -321,7 +321,7 @@ namespace Server.Items
if ( m_Item.Map == null || from == null )
return;
List<Mobile> mobiles = new List<Mobile>();
foreach( Mobile mobile in m_Item.GetMobilesInRange( 0 ) )
@ -330,15 +330,15 @@ namespace Server.Items
for( int i = 0; i < mobiles.Count; i++ )
{
Mobile m = mobiles[i];
if ( (m.Z + 16) > m_Item.Z && (m_Item.Z + 12) > m.Z && (!Core.AOS || m != from) && SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false ) )
{
if ( from != null )
from.DoHarmful( m );
AOS.Damage( m, from, m_Item.GetDamage(), 0, 100, 0, 0, 0 );
m.PlaySound( 0x208 );
}
}
}
}
}