Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,77 +3,76 @@ using EDI = Server.Mobiles.EscortDestinationInfo;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Peasant : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Peasant()
|
||||
{
|
||||
Title = "the peasant";
|
||||
public class Peasant : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Peasant()
|
||||
{
|
||||
Title = "the peasant";
|
||||
}
|
||||
|
||||
}
|
||||
public Peasant(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the peasant' when single-clicking
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the peasant' when single-clicking
|
||||
|
||||
private static int GetRandomHue()
|
||||
{
|
||||
switch ( Utility.Random( 6 ) )
|
||||
{
|
||||
default:
|
||||
case 0: return 0;
|
||||
case 1: return Utility.RandomBlueHue();
|
||||
case 2: return Utility.RandomGreenHue();
|
||||
case 3: return Utility.RandomRedHue();
|
||||
case 4: return Utility.RandomYellowHue();
|
||||
case 5: return Utility.RandomNeutralHue();
|
||||
}
|
||||
}
|
||||
private static int GetRandomHue()
|
||||
{
|
||||
switch (Utility.Random(6))
|
||||
{
|
||||
default:
|
||||
case 0: return 0;
|
||||
case 1: return Utility.RandomBlueHue();
|
||||
case 2: return Utility.RandomGreenHue();
|
||||
case 3: return Utility.RandomRedHue();
|
||||
case 4: return Utility.RandomYellowHue();
|
||||
case 5: return Utility.RandomNeutralHue();
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if ( Female )
|
||||
AddItem( new PlainDress() );
|
||||
else
|
||||
AddItem( new Shirt( GetRandomHue() ) );
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if (Female)
|
||||
AddItem(new PlainDress());
|
||||
else
|
||||
AddItem(new Shirt(GetRandomHue()));
|
||||
|
||||
int lowHue = GetRandomHue();
|
||||
int lowHue = GetRandomHue();
|
||||
|
||||
AddItem( new ShortPants( lowHue ) );
|
||||
AddItem(new ShortPants(lowHue));
|
||||
|
||||
if ( Female )
|
||||
AddItem( new Boots( lowHue ) );
|
||||
else
|
||||
AddItem( new Shoes( lowHue ) );
|
||||
if (Female)
|
||||
AddItem(new Boots(lowHue));
|
||||
else
|
||||
AddItem(new Shoes(lowHue));
|
||||
|
||||
//if ( !Female )
|
||||
//AddItem( new BodySash( lowHue ) );
|
||||
//if ( !Female )
|
||||
//AddItem( new BodySash( lowHue ) );
|
||||
|
||||
//AddItem( new Cloak( GetRandomHue() ) );
|
||||
//AddItem( new Cloak( GetRandomHue() ) );
|
||||
|
||||
//if ( !Female )
|
||||
//AddItem( new Longsword() );
|
||||
//if ( !Female )
|
||||
//AddItem( new Longsword() );
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
PackGold( 200, 250 );
|
||||
}
|
||||
PackGold(200, 250);
|
||||
}
|
||||
|
||||
public Peasant( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue