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
|
|
@ -2,65 +2,65 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Actor : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Actor () : base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( 31, 41, 51 );
|
||||
public class Actor : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Actor() : base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(31, 41, 51);
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
AddItem( new FancyDress( Utility.RandomDyedHue() ) );
|
||||
Title = "the actress";
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
AddItem( new LongPants( Utility.RandomNeutralHue() ) );
|
||||
AddItem( new FancyShirt( Utility.RandomDyedHue() ) );
|
||||
Title = "the actor";
|
||||
}
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
AddItem(new FancyDress(Utility.RandomDyedHue()));
|
||||
Title = "the actress";
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
AddItem(new LongPants(Utility.RandomNeutralHue()));
|
||||
AddItem(new FancyShirt(Utility.RandomDyedHue()));
|
||||
Title = "the actor";
|
||||
}
|
||||
|
||||
AddItem( new Boots( Utility.RandomNeutralHue() ) );
|
||||
AddItem(new Boots(Utility.RandomNeutralHue()));
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
Container pack = new Backpack();
|
||||
Container pack = new Backpack();
|
||||
|
||||
pack.DropItem( new Gold( 250, 300 ) );
|
||||
pack.DropItem(new Gold(250, 300));
|
||||
|
||||
pack.Movable = false;
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public Actor(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public Actor( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,70 +2,71 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Artist : BaseCreature
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public class Artist : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Artist()
|
||||
: base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(31, 41, 51);
|
||||
|
||||
[Constructible]
|
||||
public Artist()
|
||||
: base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( 31, 41, 51 );
|
||||
|
||||
SetSkill( SkillName.Healing, 36, 68 );
|
||||
SetSkill(SkillName.Healing, 36, 68);
|
||||
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Title = "the artist";
|
||||
Hue = Utility.RandomSkinHue();
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Title = "the artist";
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
}
|
||||
AddItem( new Doublet( Utility.RandomDyedHue() ) );
|
||||
AddItem( new Sandals( Utility.RandomNeutralHue() ) );
|
||||
AddItem( new ShortPants( Utility.RandomNeutralHue() ) );
|
||||
AddItem( new HalfApron( Utility.RandomDyedHue() ) );
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
AddItem(new Doublet(Utility.RandomDyedHue()));
|
||||
AddItem(new Sandals(Utility.RandomNeutralHue()));
|
||||
AddItem(new ShortPants(Utility.RandomNeutralHue()));
|
||||
AddItem(new HalfApron(Utility.RandomDyedHue()));
|
||||
|
||||
Container pack = new Backpack();
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
pack.DropItem( new Gold( 250, 300 ) );
|
||||
Container pack = new Backpack();
|
||||
|
||||
pack.Movable = false;
|
||||
pack.DropItem(new Gold(250, 300));
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
pack.Movable = false;
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
|
||||
public Artist( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public Artist(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override bool CanTeach => true;
|
||||
|
||||
writer.Write( (int)0 ); // version
|
||||
}
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,458 +1,433 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Server.Accounting;
|
||||
using Server.Items;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Banker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MerchantsGuild;
|
||||
|
||||
[Constructible]
|
||||
public Banker() : base( "the banker" )
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add( new SBBanker() );
|
||||
}
|
||||
|
||||
public static int GetBalance(Mobile m)
|
||||
{
|
||||
long balance = 0;
|
||||
|
||||
if (AccountGold.Enabled && m.Account != null)
|
||||
{
|
||||
balance = m.Account.GetTotalGold();
|
||||
if (balance >= int.MaxValue) { return int.MaxValue; }
|
||||
}
|
||||
|
||||
Container bank = m.FindBankNoCreate();
|
||||
|
||||
if (bank != null)
|
||||
{
|
||||
var gold = bank.FindItemsByType<Gold>();
|
||||
var checks = bank.FindItemsByType<BankCheck>();
|
||||
|
||||
balance += gold.Aggregate(0L, (c, t) => c + t.Amount);
|
||||
if (balance >= int.MaxValue) { return int.MaxValue; }
|
||||
balance += checks.Aggregate(0L, (c, t) => c + t.Worth);
|
||||
}
|
||||
|
||||
return Math.Max(0, (int)Math.Min(int.MaxValue, balance));
|
||||
}
|
||||
|
||||
public static int GetBalance(Mobile m, out Item[] gold, out Item[] checks)
|
||||
{
|
||||
long balance = 0;
|
||||
|
||||
if (AccountGold.Enabled && m.Account != null)
|
||||
{
|
||||
balance = m.Account.GetTotalGold();
|
||||
|
||||
if (balance > int.MaxValue)
|
||||
{
|
||||
gold = checks = new Item[0];
|
||||
return int.MaxValue;
|
||||
}
|
||||
}
|
||||
|
||||
Container bank = m.FindBankNoCreate();
|
||||
|
||||
if (bank != null)
|
||||
{
|
||||
gold = bank.FindItemsByType(typeof(Gold));
|
||||
checks = bank.FindItemsByType(typeof(BankCheck));
|
||||
|
||||
balance += gold.OfType<Gold>().Aggregate(0L, (c, t) => c + t.Amount);
|
||||
if (balance >= int.MaxValue) { return int.MaxValue; }
|
||||
balance += checks.OfType<BankCheck>().Aggregate(0L, (c, t) => c + t.Worth);
|
||||
}
|
||||
else
|
||||
{
|
||||
gold = checks = new Item[0];
|
||||
}
|
||||
|
||||
return Math.Max(0, (int)Math.Min(int.MaxValue, balance));
|
||||
}
|
||||
|
||||
public static bool Withdraw(Mobile from, int amount)
|
||||
{
|
||||
// If for whatever reason the TOL checks fail, we should still try old methods for withdrawing currency.
|
||||
if (AccountGold.Enabled && from.Account != null && from.Account.WithdrawGold(amount))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Item[] gold, checks;
|
||||
var balance = GetBalance(from, out gold, out checks);
|
||||
|
||||
if (balance < amount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; amount > 0 && i < gold.Length; ++i)
|
||||
{
|
||||
if (gold[i].Amount <= amount)
|
||||
{
|
||||
amount -= gold[i].Amount;
|
||||
gold[i].Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
gold[i].Amount -= amount;
|
||||
amount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; amount > 0 && i < checks.Length; ++i)
|
||||
{
|
||||
var check = (BankCheck)checks[i];
|
||||
|
||||
if (check.Worth <= amount)
|
||||
{
|
||||
amount -= check.Worth;
|
||||
check.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
check.Worth -= amount;
|
||||
amount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Deposit(Mobile from, int amount)
|
||||
{
|
||||
// If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
|
||||
if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var box = from.FindBankNoCreate();
|
||||
|
||||
if (box == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var items = new List<Item>();
|
||||
|
||||
while (amount > 0)
|
||||
{
|
||||
Item item;
|
||||
if (amount < 5000)
|
||||
{
|
||||
item = new Gold(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else if (amount <= 1000000)
|
||||
{
|
||||
item = new BankCheck(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new BankCheck(1000000);
|
||||
amount -= 1000000;
|
||||
}
|
||||
|
||||
if (box.TryDropItem(from, item, false))
|
||||
{
|
||||
items.Add(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Delete();
|
||||
foreach (var curItem in items)
|
||||
{
|
||||
curItem.Delete();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int DepositUpTo(Mobile from, int amount)
|
||||
{
|
||||
// If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
|
||||
if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount))
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
var box = from.FindBankNoCreate();
|
||||
|
||||
if (box == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var amountLeft = amount;
|
||||
while (amountLeft > 0)
|
||||
{
|
||||
Item item;
|
||||
int amountGiven;
|
||||
|
||||
if (amountLeft < 5000)
|
||||
{
|
||||
item = new Gold(amountLeft);
|
||||
amountGiven = amountLeft;
|
||||
}
|
||||
else if (amountLeft <= 1000000)
|
||||
{
|
||||
item = new BankCheck(amountLeft);
|
||||
amountGiven = amountLeft;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new BankCheck(1000000);
|
||||
amountGiven = 1000000;
|
||||
}
|
||||
|
||||
if (box.TryDropItem(from, item, false))
|
||||
{
|
||||
amountLeft -= amountGiven;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Delete();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return amount - amountLeft;
|
||||
}
|
||||
|
||||
public static void Deposit(Container cont, int amount)
|
||||
{
|
||||
while (amount > 0)
|
||||
{
|
||||
Item item;
|
||||
|
||||
if (amount < 5000)
|
||||
{
|
||||
item = new Gold(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else if (amount <= 1000000)
|
||||
{
|
||||
item = new BankCheck(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new BankCheck(1000000);
|
||||
amount -= 1000000;
|
||||
}
|
||||
|
||||
cont.DropItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
public Banker( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech( Mobile from )
|
||||
{
|
||||
if ( from.InRange( Location, 12 ) )
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech( from );
|
||||
}
|
||||
|
||||
public override void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
if ( !e.Handled && e.Mobile.InRange( Location, 12 ) )
|
||||
{
|
||||
for ( int i = 0; i < e.Keywords.Length; ++i )
|
||||
{
|
||||
int keyword = e.Keywords[i];
|
||||
|
||||
switch ( keyword )
|
||||
{
|
||||
case 0x0000: // *withdraw*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if ( e.Mobile.Criminal )
|
||||
{
|
||||
Say( 500389 ); // I will not do business with a criminal!
|
||||
break;
|
||||
}
|
||||
|
||||
string[] split = e.Speech.Split( ' ' );
|
||||
|
||||
if ( split.Length >= 2 )
|
||||
{
|
||||
int amount;
|
||||
|
||||
Container pack = e.Mobile.Backpack;
|
||||
|
||||
if ( !int.TryParse( split[1], out amount ) )
|
||||
break;
|
||||
|
||||
if ( (!Core.ML && amount > 5000) || (Core.ML && amount > 60000) )
|
||||
{
|
||||
Say( 500381 ); // Thou canst not withdraw so much at one time!
|
||||
}
|
||||
else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) || !(pack.TotalItems < pack.MaxItems))
|
||||
{
|
||||
Say(1048147); // Your backpack can't hold anything else.
|
||||
}
|
||||
else if (amount > 0)
|
||||
{
|
||||
BankBox box = e.Mobile.FindBankNoCreate();
|
||||
|
||||
if (box == null || !Withdraw(e.Mobile, amount))
|
||||
{
|
||||
Say(500384); // Ah, art thou trying to fool me? Thou hast not so much gold!
|
||||
}
|
||||
else
|
||||
{
|
||||
pack.DropItem(new Gold(amount));
|
||||
|
||||
Say(1010005); // Thou hast withdrawn gold from thy account.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x0001: // *balance*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if ( e.Mobile.Criminal )
|
||||
{
|
||||
Say( 500389 ); // I will not do business with a criminal!
|
||||
break;
|
||||
}
|
||||
|
||||
if ( AccountGold.Enabled && e.Mobile.Account != null )
|
||||
{
|
||||
Say( 1155855, $"{e.Mobile.Account.TotalPlat:#,0}\t{e.Mobile.Account.TotalGold:#,0}"); // Thy current bank balance is ~1_AMOUNT~ platinum and ~2_AMOUNT~ gold.
|
||||
}
|
||||
else
|
||||
{
|
||||
Say( 1042759, GetBalance(e.Mobile).ToString("#,0") ); // Thy current bank balance is ~1_AMOUNT~ gold.
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x0002: // *bank*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if ( e.Mobile.Criminal )
|
||||
{
|
||||
Say( 500378 ); // Thou art a criminal and cannot access thy bank box.
|
||||
break;
|
||||
}
|
||||
|
||||
e.Mobile.BankBox.Open();
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x0003: // *check*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if ( AccountGold.Enabled )
|
||||
break;
|
||||
|
||||
if ( e.Mobile.Criminal )
|
||||
{
|
||||
Say( 500389 ); // I will not do business with a criminal!
|
||||
break;
|
||||
}
|
||||
|
||||
string[] split = e.Speech.Split( ' ' );
|
||||
|
||||
if ( split.Length >= 2 )
|
||||
{
|
||||
int amount;
|
||||
|
||||
if ( !int.TryParse( split[1], out amount ) )
|
||||
break;
|
||||
|
||||
if ( amount < 5000 )
|
||||
{
|
||||
Say( 1010006 ); // We cannot create checks for such a paltry amount of gold!
|
||||
}
|
||||
else if ( amount > 1000000 )
|
||||
{
|
||||
Say( 1010007 ); // Our policies prevent us from creating checks worth that much!
|
||||
}
|
||||
else
|
||||
{
|
||||
BankCheck check = new BankCheck( amount );
|
||||
|
||||
BankBox box = e.Mobile.BankBox;
|
||||
|
||||
if ( !box.TryDropItem( e.Mobile, check, false ) )
|
||||
{
|
||||
Say( 500386 ); // There's not enough room in your bankbox for the check!
|
||||
check.Delete();
|
||||
}
|
||||
else if ( !box.ConsumeTotal( typeof( Gold ), amount ) )
|
||||
{
|
||||
Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold!
|
||||
check.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
Say( 1042673, AffixType.Append, amount.ToString(), "" ); // Into your bank box I have placed a check in the amount of:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnSpeech( e );
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
if ( from.Alive )
|
||||
list.Add( new OpenBankEntry( from, this ) );
|
||||
|
||||
base.AddCustomContextEntries( from, list );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public class Banker : BaseVendor
|
||||
{
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
[Constructible]
|
||||
public Banker() : base("the banker")
|
||||
{
|
||||
}
|
||||
|
||||
public Banker(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override NpcGuild NpcGuild => NpcGuild.MerchantsGuild;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBBanker());
|
||||
}
|
||||
|
||||
public static int GetBalance(Mobile m)
|
||||
{
|
||||
long balance = 0;
|
||||
|
||||
if (AccountGold.Enabled && m.Account != null)
|
||||
{
|
||||
balance = m.Account.GetTotalGold();
|
||||
if (balance >= int.MaxValue) return int.MaxValue;
|
||||
}
|
||||
|
||||
Container bank = m.FindBankNoCreate();
|
||||
|
||||
if (bank != null)
|
||||
{
|
||||
List<Gold> gold = bank.FindItemsByType<Gold>();
|
||||
List<BankCheck> checks = bank.FindItemsByType<BankCheck>();
|
||||
|
||||
balance += gold.Aggregate(0L, (c, t) => c + t.Amount);
|
||||
if (balance >= int.MaxValue) return int.MaxValue;
|
||||
balance += checks.Aggregate(0L, (c, t) => c + t.Worth);
|
||||
}
|
||||
|
||||
return Math.Max(0, (int)Math.Min(int.MaxValue, balance));
|
||||
}
|
||||
|
||||
public static int GetBalance(Mobile m, out Item[] gold, out Item[] checks)
|
||||
{
|
||||
long balance = 0;
|
||||
|
||||
if (AccountGold.Enabled && m.Account != null)
|
||||
{
|
||||
balance = m.Account.GetTotalGold();
|
||||
|
||||
if (balance > int.MaxValue)
|
||||
{
|
||||
gold = checks = new Item[0];
|
||||
return int.MaxValue;
|
||||
}
|
||||
}
|
||||
|
||||
Container bank = m.FindBankNoCreate();
|
||||
|
||||
if (bank != null)
|
||||
{
|
||||
gold = bank.FindItemsByType(typeof(Gold));
|
||||
checks = bank.FindItemsByType(typeof(BankCheck));
|
||||
|
||||
balance += gold.OfType<Gold>().Aggregate(0L, (c, t) => c + t.Amount);
|
||||
if (balance >= int.MaxValue) return int.MaxValue;
|
||||
balance += checks.OfType<BankCheck>().Aggregate(0L, (c, t) => c + t.Worth);
|
||||
}
|
||||
else
|
||||
{
|
||||
gold = checks = new Item[0];
|
||||
}
|
||||
|
||||
return Math.Max(0, (int)Math.Min(int.MaxValue, balance));
|
||||
}
|
||||
|
||||
public static bool Withdraw(Mobile from, int amount)
|
||||
{
|
||||
// If for whatever reason the TOL checks fail, we should still try old methods for withdrawing currency.
|
||||
if (AccountGold.Enabled && from.Account != null && from.Account.WithdrawGold(amount)) return true;
|
||||
|
||||
Item[] gold, checks;
|
||||
int balance = GetBalance(from, out gold, out checks);
|
||||
|
||||
if (balance < amount) return false;
|
||||
|
||||
for (int i = 0; amount > 0 && i < gold.Length; ++i)
|
||||
if (gold[i].Amount <= amount)
|
||||
{
|
||||
amount -= gold[i].Amount;
|
||||
gold[i].Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
gold[i].Amount -= amount;
|
||||
amount = 0;
|
||||
}
|
||||
|
||||
for (int i = 0; amount > 0 && i < checks.Length; ++i)
|
||||
{
|
||||
BankCheck check = (BankCheck)checks[i];
|
||||
|
||||
if (check.Worth <= amount)
|
||||
{
|
||||
amount -= check.Worth;
|
||||
check.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
check.Worth -= amount;
|
||||
amount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Deposit(Mobile from, int amount)
|
||||
{
|
||||
// If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
|
||||
if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount)) return true;
|
||||
|
||||
BankBox box = from.FindBankNoCreate();
|
||||
|
||||
if (box == null) return false;
|
||||
|
||||
List<Item> items = new List<Item>();
|
||||
|
||||
while (amount > 0)
|
||||
{
|
||||
Item item;
|
||||
if (amount < 5000)
|
||||
{
|
||||
item = new Gold(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else if (amount <= 1000000)
|
||||
{
|
||||
item = new BankCheck(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new BankCheck(1000000);
|
||||
amount -= 1000000;
|
||||
}
|
||||
|
||||
if (box.TryDropItem(from, item, false))
|
||||
{
|
||||
items.Add(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Delete();
|
||||
foreach (Item curItem in items) curItem.Delete();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int DepositUpTo(Mobile from, int amount)
|
||||
{
|
||||
// If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
|
||||
if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount)) return amount;
|
||||
|
||||
BankBox box = from.FindBankNoCreate();
|
||||
|
||||
if (box == null) return 0;
|
||||
|
||||
int amountLeft = amount;
|
||||
while (amountLeft > 0)
|
||||
{
|
||||
Item item;
|
||||
int amountGiven;
|
||||
|
||||
if (amountLeft < 5000)
|
||||
{
|
||||
item = new Gold(amountLeft);
|
||||
amountGiven = amountLeft;
|
||||
}
|
||||
else if (amountLeft <= 1000000)
|
||||
{
|
||||
item = new BankCheck(amountLeft);
|
||||
amountGiven = amountLeft;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new BankCheck(1000000);
|
||||
amountGiven = 1000000;
|
||||
}
|
||||
|
||||
if (box.TryDropItem(from, item, false))
|
||||
{
|
||||
amountLeft -= amountGiven;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Delete();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return amount - amountLeft;
|
||||
}
|
||||
|
||||
public static void Deposit(Container cont, int amount)
|
||||
{
|
||||
while (amount > 0)
|
||||
{
|
||||
Item item;
|
||||
|
||||
if (amount < 5000)
|
||||
{
|
||||
item = new Gold(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else if (amount <= 1000000)
|
||||
{
|
||||
item = new BankCheck(amount);
|
||||
amount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new BankCheck(1000000);
|
||||
amount -= 1000000;
|
||||
}
|
||||
|
||||
cont.DropItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.InRange(Location, 12))
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
if (!e.Handled && e.Mobile.InRange(Location, 12))
|
||||
for (int i = 0; i < e.Keywords.Length; ++i)
|
||||
{
|
||||
int keyword = e.Keywords[i];
|
||||
|
||||
switch (keyword)
|
||||
{
|
||||
case 0x0000: // *withdraw*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if (e.Mobile.Criminal)
|
||||
{
|
||||
Say(500389); // I will not do business with a criminal!
|
||||
break;
|
||||
}
|
||||
|
||||
string[] split = e.Speech.Split(' ');
|
||||
|
||||
if (split.Length >= 2)
|
||||
{
|
||||
int amount;
|
||||
|
||||
Container pack = e.Mobile.Backpack;
|
||||
|
||||
if (!int.TryParse(split[1], out amount))
|
||||
break;
|
||||
|
||||
if (!Core.ML && amount > 5000 || Core.ML && amount > 60000)
|
||||
{
|
||||
Say(500381); // Thou canst not withdraw so much at one time!
|
||||
}
|
||||
else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) ||
|
||||
!(pack.TotalItems < pack.MaxItems))
|
||||
{
|
||||
Say(1048147); // Your backpack can't hold anything else.
|
||||
}
|
||||
else if (amount > 0)
|
||||
{
|
||||
BankBox box = e.Mobile.FindBankNoCreate();
|
||||
|
||||
if (box == null || !Withdraw(e.Mobile, amount))
|
||||
{
|
||||
Say(500384); // Ah, art thou trying to fool me? Thou hast not so much gold!
|
||||
}
|
||||
else
|
||||
{
|
||||
pack.DropItem(new Gold(amount));
|
||||
|
||||
Say(1010005); // Thou hast withdrawn gold from thy account.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x0001: // *balance*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if (e.Mobile.Criminal)
|
||||
{
|
||||
Say(500389); // I will not do business with a criminal!
|
||||
break;
|
||||
}
|
||||
|
||||
if (AccountGold.Enabled && e.Mobile.Account != null)
|
||||
Say(1155855,
|
||||
$"{e.Mobile.Account.TotalPlat:#,0}\t{e.Mobile.Account.TotalGold:#,0}"); // Thy current bank balance is ~1_AMOUNT~ platinum and ~2_AMOUNT~ gold.
|
||||
else
|
||||
Say(1042759,
|
||||
GetBalance(e.Mobile).ToString("#,0")); // Thy current bank balance is ~1_AMOUNT~ gold.
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x0002: // *bank*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if (e.Mobile.Criminal)
|
||||
{
|
||||
Say(500378); // Thou art a criminal and cannot access thy bank box.
|
||||
break;
|
||||
}
|
||||
|
||||
e.Mobile.BankBox.Open();
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x0003: // *check*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if (AccountGold.Enabled)
|
||||
break;
|
||||
|
||||
if (e.Mobile.Criminal)
|
||||
{
|
||||
Say(500389); // I will not do business with a criminal!
|
||||
break;
|
||||
}
|
||||
|
||||
string[] split = e.Speech.Split(' ');
|
||||
|
||||
if (split.Length >= 2)
|
||||
{
|
||||
int amount;
|
||||
|
||||
if (!int.TryParse(split[1], out amount))
|
||||
break;
|
||||
|
||||
if (amount < 5000)
|
||||
{
|
||||
Say(1010006); // We cannot create checks for such a paltry amount of gold!
|
||||
}
|
||||
else if (amount > 1000000)
|
||||
{
|
||||
Say(1010007); // Our policies prevent us from creating checks worth that much!
|
||||
}
|
||||
else
|
||||
{
|
||||
BankCheck check = new BankCheck(amount);
|
||||
|
||||
BankBox box = e.Mobile.BankBox;
|
||||
|
||||
if (!box.TryDropItem(e.Mobile, check, false))
|
||||
{
|
||||
Say(500386); // There's not enough room in your bankbox for the check!
|
||||
check.Delete();
|
||||
}
|
||||
else if (!box.ConsumeTotal(typeof(Gold), amount))
|
||||
{
|
||||
Say(500384); // Ah, art thou trying to fool me? Thou hast not so much gold!
|
||||
check.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
Say(1042673, AffixType.Append, amount.ToString(),
|
||||
""); // Into your bank box I have placed a check in the amount of:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnSpeech(e);
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
if (from.Alive)
|
||||
list.Add(new OpenBankEntry(from, this));
|
||||
|
||||
base.AddCustomContextEntries(from, list);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -3,76 +3,76 @@ using EDI = Server.Mobiles.EscortDestinationInfo;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class BrideGroom : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public BrideGroom()
|
||||
{
|
||||
if ( Female )
|
||||
Title = "the bride";
|
||||
else
|
||||
Title = "the groom";
|
||||
}
|
||||
public class BrideGroom : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public BrideGroom()
|
||||
{
|
||||
if (Female)
|
||||
Title = "the bride";
|
||||
else
|
||||
Title = "the groom";
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the groom' when single-clicking
|
||||
public BrideGroom(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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 bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the groom' when single-clicking
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if ( Female )
|
||||
AddItem( new FancyDress() );
|
||||
else
|
||||
AddItem( new FancyShirt() );
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
int lowHue = GetRandomHue();
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if (Female)
|
||||
AddItem(new FancyDress());
|
||||
else
|
||||
AddItem(new FancyShirt());
|
||||
|
||||
AddItem( new LongPants( lowHue ) );
|
||||
int lowHue = GetRandomHue();
|
||||
|
||||
if ( Female )
|
||||
AddItem( new Shoes( lowHue ) );
|
||||
else
|
||||
AddItem( new Boots( lowHue ) );
|
||||
AddItem(new LongPants(lowHue));
|
||||
|
||||
if ( Utility.RandomBool() )
|
||||
HairItemID = 0x203B;
|
||||
else
|
||||
HairItemID = 0x203C;
|
||||
if (Female)
|
||||
AddItem(new Shoes(lowHue));
|
||||
else
|
||||
AddItem(new Boots(lowHue));
|
||||
|
||||
HairHue = Race.RandomHairHue();
|
||||
if (Utility.RandomBool())
|
||||
HairItemID = 0x203B;
|
||||
else
|
||||
HairItemID = 0x203C;
|
||||
|
||||
PackGold( 200, 250 );
|
||||
}
|
||||
HairHue = Race.RandomHairHue();
|
||||
|
||||
public BrideGroom( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
PackGold(200, 250);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,70 +3,70 @@ using EDI = Server.Mobiles.EscortDestinationInfo;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class EscortableMage : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public EscortableMage()
|
||||
{
|
||||
Title = "the mage";
|
||||
public class EscortableMage : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public EscortableMage()
|
||||
{
|
||||
Title = "the mage";
|
||||
|
||||
SetSkill( SkillName.EvalInt, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Inscribe, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Magery, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Meditation, 80.0, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 80.0, 100.0 );
|
||||
}
|
||||
SetSkill(SkillName.EvalInt, 80.0, 100.0);
|
||||
SetSkill(SkillName.Inscribe, 80.0, 100.0);
|
||||
SetSkill(SkillName.Magery, 80.0, 100.0);
|
||||
SetSkill(SkillName.Meditation, 80.0, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 80.0, 100.0);
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the mage' when single-clicking
|
||||
public EscortableMage(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
private static int GetRandomHue()
|
||||
{
|
||||
switch ( Utility.Random( 5 ) )
|
||||
{
|
||||
default:
|
||||
case 0: return Utility.RandomBlueHue();
|
||||
case 1: return Utility.RandomGreenHue();
|
||||
case 2: return Utility.RandomRedHue();
|
||||
case 3: return Utility.RandomYellowHue();
|
||||
case 4: return Utility.RandomNeutralHue();
|
||||
}
|
||||
}
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the mage' when single-clicking
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new Robe( GetRandomHue() ) );
|
||||
private static int GetRandomHue()
|
||||
{
|
||||
switch (Utility.Random(5))
|
||||
{
|
||||
default:
|
||||
case 0: return Utility.RandomBlueHue();
|
||||
case 1: return Utility.RandomGreenHue();
|
||||
case 2: return Utility.RandomRedHue();
|
||||
case 3: return Utility.RandomYellowHue();
|
||||
case 4: return Utility.RandomNeutralHue();
|
||||
}
|
||||
}
|
||||
|
||||
int lowHue = GetRandomHue();
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Robe(GetRandomHue()));
|
||||
|
||||
AddItem( new ShortPants( lowHue ) );
|
||||
int lowHue = GetRandomHue();
|
||||
|
||||
if ( Female )
|
||||
AddItem( new ThighBoots( lowHue ) );
|
||||
else
|
||||
AddItem( new Boots( lowHue ) );
|
||||
AddItem(new ShortPants(lowHue));
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
if (Female)
|
||||
AddItem(new ThighBoots(lowHue));
|
||||
else
|
||||
AddItem(new Boots(lowHue));
|
||||
|
||||
PackGold( 200, 250 );
|
||||
}
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
public EscortableMage( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
PackGold(200, 250);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,78 +2,76 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Gypsy : BaseCreature
|
||||
{
|
||||
public class Gypsy : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Gypsy()
|
||||
: base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(31, 41, 51);
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
SetSkill(SkillName.Cooking, 65, 88);
|
||||
SetSkill(SkillName.Snooping, 65, 88);
|
||||
SetSkill(SkillName.Stealing, 65, 88);
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
AddItem(new Kilt(Utility.RandomDyedHue()));
|
||||
AddItem(new Shirt(Utility.RandomDyedHue()));
|
||||
AddItem(new ThighBoots());
|
||||
Title = "the gypsy";
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
AddItem(new ShortPants(Utility.RandomNeutralHue()));
|
||||
AddItem(new Shirt(Utility.RandomDyedHue()));
|
||||
AddItem(new Sandals());
|
||||
Title = "the gypsy";
|
||||
}
|
||||
|
||||
AddItem(new Bandana(Utility.RandomDyedHue()));
|
||||
AddItem(new Dagger());
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
Container pack = new Backpack();
|
||||
|
||||
pack.DropItem(new Gold(250, 300));
|
||||
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public Gypsy(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
[Constructible]
|
||||
public Gypsy()
|
||||
: base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( 31, 41, 51 );
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
SetSkill( SkillName.Cooking, 65, 88 );
|
||||
SetSkill( SkillName.Snooping, 65, 88 );
|
||||
SetSkill( SkillName.Stealing, 65, 88 );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
AddItem( new Kilt( Utility.RandomDyedHue() ) );
|
||||
AddItem( new Shirt( Utility.RandomDyedHue() ) );
|
||||
AddItem( new ThighBoots() );
|
||||
Title = "the gypsy";
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
AddItem( new ShortPants( Utility.RandomNeutralHue() ) );
|
||||
AddItem( new Shirt( Utility.RandomDyedHue() ) );
|
||||
AddItem( new Sandals() );
|
||||
Title = "the gypsy";
|
||||
}
|
||||
|
||||
AddItem( new Bandana( Utility.RandomDyedHue() ) );
|
||||
AddItem( new Dagger() );
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
|
||||
Container pack = new Backpack();
|
||||
|
||||
pack.DropItem( new Gold( 250, 300 ) );
|
||||
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public Gypsy( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,72 +2,73 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HarborMaster : BaseCreature
|
||||
{
|
||||
public override bool CanTeach => false;
|
||||
public class HarborMaster : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public HarborMaster()
|
||||
: base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(31, 41, 51);
|
||||
|
||||
[Constructible]
|
||||
public HarborMaster()
|
||||
: base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( 31, 41, 51 );
|
||||
|
||||
SetSkill( SkillName.Mining, 36, 68 );
|
||||
SetSkill(SkillName.Mining, 36, 68);
|
||||
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Blessed = true;
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Blessed = true;
|
||||
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
Title = "the Harbor Mistress";
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
Title = "the Harbor Master";
|
||||
}
|
||||
AddItem( new Shirt( Utility.RandomDyedHue() ) );
|
||||
AddItem( new Boots() );
|
||||
AddItem( new LongPants( Utility.RandomNeutralHue() ) );
|
||||
AddItem( new QuarterStaff() );
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
Title = "the Harbor Mistress";
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
Title = "the Harbor Master";
|
||||
}
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
AddItem(new Shirt(Utility.RandomDyedHue()));
|
||||
AddItem(new Boots());
|
||||
AddItem(new LongPants(Utility.RandomNeutralHue()));
|
||||
AddItem(new QuarterStaff());
|
||||
|
||||
Container pack = new Backpack();
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
pack.DropItem( new Gold( 250, 300 ) );
|
||||
Container pack = new Backpack();
|
||||
|
||||
pack.Movable = false;
|
||||
pack.DropItem(new Gold(250, 300));
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
pack.Movable = false;
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
|
||||
public HarborMaster( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public HarborMaster(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override bool CanTeach => false;
|
||||
|
||||
writer.Write( (int)0 ); // version
|
||||
}
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,83 +1,81 @@
|
|||
using Server.Items;
|
||||
using EDI=Server.Mobiles.EscortDestinationInfo;
|
||||
using EDI = Server.Mobiles.EscortDestinationInfo;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Merchant : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Merchant()
|
||||
{
|
||||
Title = "the merchant";
|
||||
SetSkill( SkillName.ItemID, 55.0, 78.0 );
|
||||
SetSkill( SkillName.ArmsLore, 55, 78 );
|
||||
}
|
||||
public class Merchant : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Merchant()
|
||||
{
|
||||
Title = "the merchant";
|
||||
SetSkill(SkillName.ItemID, 55.0, 78.0);
|
||||
SetSkill(SkillName.ArmsLore, 55, 78);
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the merchant' when single-clicking
|
||||
public Merchant(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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 bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the merchant' 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();
|
||||
}
|
||||
}
|
||||
|
||||
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 ThighBoots() );
|
||||
AddItem(new ThighBoots());
|
||||
|
||||
if ( Female )
|
||||
AddItem( new FancyDress( lowHue ) );
|
||||
else
|
||||
AddItem( new FancyShirt( lowHue ) );
|
||||
AddItem( new LongPants( lowHue ) );
|
||||
if (Female)
|
||||
AddItem(new FancyDress(lowHue));
|
||||
else
|
||||
AddItem(new FancyShirt(lowHue));
|
||||
AddItem(new LongPants(lowHue));
|
||||
|
||||
if ( !Female )
|
||||
AddItem( new BodySash( lowHue ) );
|
||||
if (!Female)
|
||||
AddItem(new BodySash(lowHue));
|
||||
|
||||
|
||||
//if ( !Female )
|
||||
//AddItem( new Longsword() );
|
||||
|
||||
//if ( !Female )
|
||||
//AddItem( new Longsword() );
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
PackGold(200, 250);
|
||||
}
|
||||
|
||||
PackGold( 200, 250 );
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public Merchant( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
writer.Write( (int)0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,82 +3,90 @@ using EDI = Server.Mobiles.EscortDestinationInfo;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Messenger : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Messenger()
|
||||
{
|
||||
Title = "the messenger";
|
||||
}
|
||||
public class Messenger : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Messenger()
|
||||
{
|
||||
Title = "the messenger";
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the messenger' when single-clicking
|
||||
public Messenger(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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 bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the messenger' when single-clicking
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if ( Female )
|
||||
AddItem( new PlainDress() );
|
||||
else
|
||||
AddItem( new Shirt( GetRandomHue() ) );
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
int lowHue = GetRandomHue();
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if (Female)
|
||||
AddItem(new PlainDress());
|
||||
else
|
||||
AddItem(new Shirt(GetRandomHue()));
|
||||
|
||||
AddItem( new ShortPants( lowHue ) );
|
||||
int lowHue = GetRandomHue();
|
||||
|
||||
if ( Female )
|
||||
AddItem( new Boots( lowHue ) );
|
||||
else
|
||||
AddItem( new Shoes( lowHue ) );
|
||||
AddItem(new ShortPants(lowHue));
|
||||
|
||||
//if ( !Female )
|
||||
//AddItem( new BodySash( lowHue ) );
|
||||
if (Female)
|
||||
AddItem(new Boots(lowHue));
|
||||
else
|
||||
AddItem(new Shoes(lowHue));
|
||||
|
||||
//AddItem( new Cloak( GetRandomHue() ) );
|
||||
//if ( !Female )
|
||||
//AddItem( new BodySash( lowHue ) );
|
||||
|
||||
//if ( !Female )
|
||||
//AddItem( new Longsword() );
|
||||
//AddItem( new Cloak( GetRandomHue() ) );
|
||||
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: AddItem( new ShortHair( Utility.RandomHairHue() ) ); break;
|
||||
case 1: AddItem( new TwoPigTails( Utility.RandomHairHue() ) ); break;
|
||||
case 2: AddItem( new ReceedingHair( Utility.RandomHairHue() ) ); break;
|
||||
case 3: AddItem( new KrisnaHair( Utility.RandomHairHue() ) ); break;
|
||||
}
|
||||
//if ( !Female )
|
||||
//AddItem( new Longsword() );
|
||||
|
||||
PackGold( 200, 250 );
|
||||
}
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new ShortHair(Utility.RandomHairHue()));
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new TwoPigTails(Utility.RandomHairHue()));
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new ReceedingHair(Utility.RandomHairHue()));
|
||||
break;
|
||||
case 3:
|
||||
AddItem(new KrisnaHair(Utility.RandomHairHue()));
|
||||
break;
|
||||
}
|
||||
|
||||
public Messenger( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
PackGold(200, 250);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +1,31 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Minter : Banker
|
||||
{
|
||||
public override NpcGuild NpcGuild => NpcGuild.MerchantsGuild;
|
||||
public class Minter : Banker
|
||||
{
|
||||
[Constructible]
|
||||
public Minter()
|
||||
{
|
||||
Title = "the minter";
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Minter()
|
||||
{
|
||||
Title = "the minter";
|
||||
}
|
||||
public Minter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public Minter( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override NpcGuild NpcGuild => NpcGuild.MerchantsGuild;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,75 +2,75 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Ninja : BaseCreature
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
public class Ninja : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Ninja() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Title = "the ninja";
|
||||
|
||||
[Constructible]
|
||||
public Ninja() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Title = "the ninja";
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
InitStats( 100, 100, 25 );
|
||||
SetSkill(SkillName.Fencing, 64.0, 80.0);
|
||||
SetSkill(SkillName.Macing, 64.0, 80.0);
|
||||
SetSkill(SkillName.Ninjitsu, 60.0, 80.0);
|
||||
SetSkill(SkillName.Parry, 64.0, 80.0);
|
||||
SetSkill(SkillName.Tactics, 64.0, 85.0);
|
||||
SetSkill(SkillName.Swords, 64.0, 85.0);
|
||||
|
||||
SetSkill( SkillName.Fencing, 64.0, 80.0 );
|
||||
SetSkill( SkillName.Macing, 64.0, 80.0 );
|
||||
SetSkill( SkillName.Ninjitsu, 60.0, 80.0 );
|
||||
SetSkill( SkillName.Parry, 64.0, 80.0 );
|
||||
SetSkill( SkillName.Tactics, 64.0, 85.0 );
|
||||
SetSkill( SkillName.Swords, 64.0, 85.0 );
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
}
|
||||
if (!Female)
|
||||
AddItem(new LeatherNinjaHood());
|
||||
|
||||
if ( !Female )
|
||||
AddItem( new LeatherNinjaHood() );
|
||||
AddItem(new LeatherNinjaPants());
|
||||
AddItem(new LeatherNinjaBelt());
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new NinjaTabi());
|
||||
|
||||
AddItem( new LeatherNinjaPants() );
|
||||
AddItem( new LeatherNinjaBelt() );
|
||||
AddItem( new LeatherNinjaJacket() );
|
||||
AddItem( new NinjaTabi() );
|
||||
|
||||
int hairHue = Utility.RandomNondyedHue();
|
||||
int hairHue = Utility.RandomNondyedHue();
|
||||
|
||||
|
||||
Utility.AssignRandomHair( this, hairHue );
|
||||
Utility.AssignRandomHair(this, hairHue);
|
||||
|
||||
if ( Utility.Random( 7 ) != 0 )
|
||||
Utility.AssignRandomFacialHair( this, hairHue );
|
||||
if (Utility.Random(7) != 0)
|
||||
Utility.AssignRandomFacialHair(this, hairHue);
|
||||
|
||||
PackGold( 250, 300 );
|
||||
}
|
||||
PackGold(250, 300);
|
||||
}
|
||||
|
||||
public Ninja( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public Ninja(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,80 +3,80 @@ using EDI = Server.Mobiles.EscortDestinationInfo;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Noble : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Noble()
|
||||
{
|
||||
Title = "the noble";
|
||||
public class Noble : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Noble()
|
||||
{
|
||||
Title = "the noble";
|
||||
|
||||
SetSkill( SkillName.Parry, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Swords, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 80.0, 100.0 );
|
||||
}
|
||||
SetSkill(SkillName.Parry, 80.0, 100.0);
|
||||
SetSkill(SkillName.Swords, 80.0, 100.0);
|
||||
SetSkill(SkillName.Tactics, 80.0, 100.0);
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the noble' when single-clicking
|
||||
public Noble(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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 bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the noble' when single-clicking
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if ( Female )
|
||||
AddItem( new FancyDress() );
|
||||
else
|
||||
AddItem( new FancyShirt( GetRandomHue() ) );
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
int lowHue = GetRandomHue();
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if (Female)
|
||||
AddItem(new FancyDress());
|
||||
else
|
||||
AddItem(new FancyShirt(GetRandomHue()));
|
||||
|
||||
AddItem( new ShortPants( lowHue ) );
|
||||
int lowHue = GetRandomHue();
|
||||
|
||||
if ( Female )
|
||||
AddItem( new ThighBoots( lowHue ) );
|
||||
else
|
||||
AddItem( new Boots( lowHue ) );
|
||||
AddItem(new ShortPants(lowHue));
|
||||
|
||||
if ( !Female )
|
||||
AddItem( new BodySash( lowHue ) );
|
||||
if (Female)
|
||||
AddItem(new ThighBoots(lowHue));
|
||||
else
|
||||
AddItem(new Boots(lowHue));
|
||||
|
||||
AddItem( new Cloak( GetRandomHue() ) );
|
||||
if (!Female)
|
||||
AddItem(new BodySash(lowHue));
|
||||
|
||||
if ( !Female )
|
||||
AddItem( new Longsword() );
|
||||
AddItem(new Cloak(GetRandomHue()));
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
if (!Female)
|
||||
AddItem(new Longsword());
|
||||
|
||||
PackGold( 200, 250 );
|
||||
}
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
public Noble( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
PackGold(200, 250);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,82 +1,82 @@
|
|||
using Server.Items;
|
||||
using Server.Engines.MLQuests;
|
||||
using Server.Engines.MLQuests;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles.Townfolk
|
||||
{
|
||||
public class Prisoner : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Prisoner()
|
||||
{
|
||||
Title = Female ? "the noblewoman" : "the nobleman";
|
||||
public class Prisoner : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Prisoner()
|
||||
{
|
||||
Title = Female ? "the noblewoman" : "the nobleman";
|
||||
|
||||
CantWalk = true;
|
||||
IsPrisoner = true;
|
||||
}
|
||||
CantWalk = true;
|
||||
IsPrisoner = true;
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
public Prisoner(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if ( Female )
|
||||
{
|
||||
AddItem( new FancyDress( Utility.RandomNondyedHue() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem( new FancyShirt( Utility.RandomNondyedHue() ) );
|
||||
AddItem( new LongPants( Utility.RandomNondyedHue() ) );
|
||||
}
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
if ( Utility.RandomBool() )
|
||||
AddItem( new Boots() );
|
||||
else
|
||||
AddItem( new ThighBoots() );
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if (Female)
|
||||
{
|
||||
AddItem(new FancyDress(Utility.RandomNondyedHue()));
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem(new FancyShirt(Utility.RandomNondyedHue()));
|
||||
AddItem(new LongPants(Utility.RandomNondyedHue()));
|
||||
}
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomFacialHair( this, HairHue );
|
||||
}
|
||||
if (Utility.RandomBool())
|
||||
AddItem(new Boots());
|
||||
else
|
||||
AddItem(new ThighBoots());
|
||||
|
||||
public override void Shout( PlayerMobile pm )
|
||||
{
|
||||
/*
|
||||
* 502261 - HELP!
|
||||
* 502262 - Help me!
|
||||
* 502263 - Canst thou aid me?!
|
||||
* 502264 - Help a poor prisoner!
|
||||
* 502265 - Help! Please!
|
||||
* 502266 - Aaah! Help me!
|
||||
* 502267 - Go and get some help!
|
||||
*/
|
||||
MLQuestSystem.Tell( this, pm, Utility.Random( 502261, 7 ) );
|
||||
}
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
}
|
||||
|
||||
public override void OnMovement( Mobile m, Point3D oldLocation )
|
||||
{
|
||||
base.OnMovement( m, oldLocation );
|
||||
public override void Shout(PlayerMobile pm)
|
||||
{
|
||||
/*
|
||||
* 502261 - HELP!
|
||||
* 502262 - Help me!
|
||||
* 502263 - Canst thou aid me?!
|
||||
* 502264 - Help a poor prisoner!
|
||||
* 502265 - Help! Please!
|
||||
* 502266 - Aaah! Help me!
|
||||
* 502267 - Go and get some help!
|
||||
*/
|
||||
MLQuestSystem.Tell(this, pm, Utility.Random(502261, 7));
|
||||
}
|
||||
|
||||
if ( CantWalk && InRange( m, 1 ) && !InRange( oldLocation, 1 ) && ( !m.Hidden || m.AccessLevel == AccessLevel.Player ) )
|
||||
Say( 502268 ); // Quickly, I beg thee! Unlock my chains! If thou dost look at me close thou canst see them.
|
||||
}
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
public Prisoner( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
if (CantWalk && InRange(m, 1) && !InRange(oldLocation, 1) && (!m.Hidden || m.AccessLevel == AccessLevel.Player))
|
||||
Say(502268); // Quickly, I beg thee! Unlock my chains! If thou dost look at me close thou canst see them.
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,91 +2,111 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Samurai : BaseCreature
|
||||
{
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
public class Samurai : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Samurai() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Title = "the samurai";
|
||||
|
||||
[Constructible]
|
||||
public Samurai() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Title = "the samurai";
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
InitStats( 100, 100, 25 );
|
||||
SetSkill(SkillName.ArmsLore, 64.0, 80.0);
|
||||
SetSkill(SkillName.Bushido, 64.0, 85.0);
|
||||
SetSkill(SkillName.Parry, 64.0, 80.0);
|
||||
SetSkill(SkillName.Swords, 64.0, 85.0);
|
||||
|
||||
SetSkill( SkillName.ArmsLore, 64.0, 80.0 );
|
||||
SetSkill( SkillName.Bushido, 64.0, 85.0 );
|
||||
SetSkill( SkillName.Parry, 64.0, 80.0 );
|
||||
SetSkill( SkillName.Swords, 64.0, 85.0 );
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
}
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new Lajatang());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new Wakizashi());
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new NoDachi());
|
||||
break;
|
||||
}
|
||||
|
||||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0: AddItem( new Lajatang() ); break;
|
||||
case 1: AddItem( new Wakizashi() ); break;
|
||||
case 2: AddItem( new NoDachi() ); break;
|
||||
}
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new LeatherSuneate());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new PlateSuneate());
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new StuddedHaidate());
|
||||
break;
|
||||
}
|
||||
|
||||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0: AddItem( new LeatherSuneate() ); break;
|
||||
case 1: AddItem( new PlateSuneate() ); break;
|
||||
case 2: AddItem( new StuddedHaidate() ); break;
|
||||
}
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new LeatherJingasa());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new ChainHatsuburi());
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new HeavyPlateJingasa());
|
||||
break;
|
||||
case 3:
|
||||
AddItem(new DecorativePlateKabuto());
|
||||
break;
|
||||
}
|
||||
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: AddItem( new LeatherJingasa() ); break;
|
||||
case 1: AddItem( new ChainHatsuburi() ); break;
|
||||
case 2: AddItem( new HeavyPlateJingasa() ); break;
|
||||
case 3: AddItem( new DecorativePlateKabuto() ); break;
|
||||
}
|
||||
AddItem(new LeatherDo());
|
||||
AddItem(new LeatherHiroSode());
|
||||
AddItem(new SamuraiTabi(Utility.RandomNondyedHue())); // TODO: Hue
|
||||
|
||||
AddItem( new LeatherDo() );
|
||||
AddItem( new LeatherHiroSode() );
|
||||
AddItem( new SamuraiTabi( Utility.RandomNondyedHue() ) ); // TODO: Hue
|
||||
|
||||
int hairHue = Utility.RandomNondyedHue();
|
||||
int hairHue = Utility.RandomNondyedHue();
|
||||
|
||||
|
||||
Utility.AssignRandomHair( this, hairHue );
|
||||
Utility.AssignRandomHair(this, hairHue);
|
||||
|
||||
if ( Utility.Random( 7 ) != 0 )
|
||||
Utility.AssignRandomFacialHair( this, hairHue );
|
||||
if (Utility.Random(7) != 0)
|
||||
Utility.AssignRandomFacialHair(this, hairHue);
|
||||
|
||||
PackGold( 250, 300 );
|
||||
}
|
||||
PackGold(250, 300);
|
||||
}
|
||||
|
||||
public Samurai( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public Samurai(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,66 +2,65 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Sculptor : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Sculptor()
|
||||
: base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( 31, 41, 51 );
|
||||
public class Sculptor : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Sculptor()
|
||||
: base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(31, 41, 51);
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Title = "the sculptor";
|
||||
Hue = Utility.RandomSkinHue();
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Title = "the sculptor";
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
AddItem( new Kilt( Utility.RandomNeutralHue() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
AddItem( new LongPants( Utility.RandomNeutralHue() ) );
|
||||
}
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
AddItem(new Kilt(Utility.RandomNeutralHue()));
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
AddItem(new LongPants(Utility.RandomNeutralHue()));
|
||||
}
|
||||
|
||||
|
||||
AddItem(new Doublet(Utility.RandomNeutralHue()));
|
||||
AddItem(new HalfApron());
|
||||
|
||||
AddItem( new Doublet( Utility.RandomNeutralHue() ) );
|
||||
AddItem( new HalfApron() );
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Container pack = new Backpack();
|
||||
|
||||
Container pack = new Backpack();
|
||||
pack.DropItem(new Gold(250, 300));
|
||||
|
||||
pack.DropItem( new Gold( 250, 300 ) );
|
||||
pack.Movable = false;
|
||||
|
||||
pack.Movable = false;
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
public Sculptor(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public Sculptor( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,92 +3,94 @@ using EDI = Server.Mobiles.EscortDestinationInfo;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SeekerOfAdventure : BaseEscortable
|
||||
{
|
||||
private static string[] m_Dungeons = {
|
||||
"Covetous", "Deceit", "Despise",
|
||||
"Destard", "Hythloth", "Shame", // Old Code for Pre-ML shards.
|
||||
"Wrong"
|
||||
};
|
||||
public class SeekerOfAdventure : BaseEscortable
|
||||
{
|
||||
private static string[] m_Dungeons =
|
||||
{
|
||||
"Covetous", "Deceit", "Despise",
|
||||
"Destard", "Hythloth", "Shame", // Old Code for Pre-ML shards.
|
||||
"Wrong"
|
||||
};
|
||||
|
||||
private static string[] m_MLDestinations = {
|
||||
"Cove", "Serpent's Hold", "Jhelom", // ML List
|
||||
"Nujel'm"
|
||||
};
|
||||
private static string[] m_MLDestinations =
|
||||
{
|
||||
"Cove", "Serpent's Hold", "Jhelom", // ML List
|
||||
"Nujel'm"
|
||||
};
|
||||
|
||||
public override string[] GetPossibleDestinations()
|
||||
{
|
||||
if ( Core.ML )
|
||||
return m_MLDestinations;
|
||||
return m_Dungeons;
|
||||
}
|
||||
[Constructible]
|
||||
public SeekerOfAdventure()
|
||||
{
|
||||
Title = "the seeker of adventure";
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SeekerOfAdventure()
|
||||
{
|
||||
Title = "the seeker of adventure";
|
||||
}
|
||||
public SeekerOfAdventure(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ClickTitle => false; // Do not display 'the seeker of adventure' when single-clicking
|
||||
public override bool ClickTitle => false; // Do not display 'the seeker of adventure' 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();
|
||||
}
|
||||
}
|
||||
public override string[] GetPossibleDestinations()
|
||||
{
|
||||
if (Core.ML)
|
||||
return m_MLDestinations;
|
||||
return m_Dungeons;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if ( Female )
|
||||
AddItem( new FancyDress( GetRandomHue() ) );
|
||||
else
|
||||
AddItem( new FancyShirt( GetRandomHue() ) );
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
int lowHue = GetRandomHue();
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if (Female)
|
||||
AddItem(new FancyDress(GetRandomHue()));
|
||||
else
|
||||
AddItem(new FancyShirt(GetRandomHue()));
|
||||
|
||||
AddItem( new ShortPants( lowHue ) );
|
||||
int lowHue = GetRandomHue();
|
||||
|
||||
if ( Female )
|
||||
AddItem( new ThighBoots( lowHue ) );
|
||||
else
|
||||
AddItem( new Boots( lowHue ) );
|
||||
AddItem(new ShortPants(lowHue));
|
||||
|
||||
if ( !Female )
|
||||
AddItem( new BodySash( lowHue ) );
|
||||
if (Female)
|
||||
AddItem(new ThighBoots(lowHue));
|
||||
else
|
||||
AddItem(new Boots(lowHue));
|
||||
|
||||
AddItem( new Cloak( GetRandomHue() ) );
|
||||
if (!Female)
|
||||
AddItem(new BodySash(lowHue));
|
||||
|
||||
AddItem( new Longsword() );
|
||||
AddItem(new Cloak(GetRandomHue()));
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
AddItem(new Longsword());
|
||||
|
||||
PackGold( 100, 150 );
|
||||
}
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
public SeekerOfAdventure( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
PackGold(100, 150);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue