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

@ -7,10 +7,11 @@ namespace Server.Mobiles
[TypeAlias( "Server.Mobiles.Giantrat" )]
public class GiantRat : BaseCreature
{
public override string DefaultName => "a giant rat";
[Constructible]
public GiantRat() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a giant rat";
Body = 0xD7;
BaseSoundID = 0x188;
@ -70,4 +71,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -7,10 +7,11 @@ namespace Server.Mobiles
[TypeAlias( "Server.Mobiles.Jackrabbit" )]
public class JackRabbit : BaseCreature
{
public override string DefaultName => "a jack rabbit";
[Constructible]
public JackRabbit() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Name = "a jack rabbit";
Body = 0xCD;
Hue = 0x1BB;
@ -49,20 +50,20 @@ namespace Server.Mobiles
{
}
public override int GetAttackSound()
{
return 0xC9;
}
public override int GetAttackSound()
{
return 0xC9;
}
public override int GetHurtSound()
{
return 0xCA;
}
public override int GetHurtSound()
{
return 0xCA;
}
public override int GetDeathSound()
{
return 0xCB;
}
public override int GetDeathSound()
{
return 0xCB;
}
public override void Serialize(GenericWriter writer)
{
@ -78,4 +79,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -6,13 +6,14 @@ namespace Server.Mobiles
[CorpseName( "a hare corpse" )]
public class Rabbit : BaseCreature
{
public override string DefaultName => "a rabbit";
[Constructible]
public Rabbit() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Name = "a rabbit";
Body = 205;
if ( 0.5 >= Utility.RandomDouble() )
if ( Utility.RandomBool() )
Hue = Utility.RandomAnimalHue();
SetStr( 6, 10 );
@ -50,20 +51,20 @@ namespace Server.Mobiles
{
}
public override int GetAttackSound()
{
return 0xC9;
}
public override int GetAttackSound()
{
return 0xC9;
}
public override int GetHurtSound()
{
return 0xCA;
}
public override int GetHurtSound()
{
return 0xCA;
}
public override int GetDeathSound()
{
return 0xCB;
}
public override int GetDeathSound()
{
return 0xCB;
}
public override void Serialize(GenericWriter writer)
{
@ -79,4 +80,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,13 +3,15 @@ using Server.Mobiles;
namespace Server.Mobiles
{
[CorpseName( "a sewer rat corpse" )]
public class Sewerrat : BaseCreature
[CorpseName( "a rat corpse" )]
[TypeAlias("Server.Mobiles.Sewerrat")]
public class SewerRat : BaseCreature
{
public override string DefaultName => "a sewer rat";
[Constructible]
public Sewerrat() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
public SewerRat() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a sewer rat";
Body = 238;
BaseSoundID = 0xCC;
@ -47,10 +49,10 @@ namespace Server.Mobiles
AddLoot( LootPack.Poor );
}
public override int Meat{ get{ return 1; } }
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Eggs | FoodType.FruitsAndVegies; } }
public override int Meat => 1;
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Eggs | FoodType.FruitsAndVegies;
public Sewerrat(Serial serial) : base(serial)
public SewerRat(Serial serial) : base(serial)
{
}
@ -68,4 +70,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}