ML quest system; first SVN release.

Secondary changes:
- Region fixes, mainly for New Haven.
- Recipe system changes.
- Enabled ML craftables.
- Dyeing/cutting restrictions for quest items.
- Moved IsInvulnerable from BaseVendor to BaseCreature.
- Moved RandomBrightHue to Utility.
- Items no longer decay when attached to a spawner.
- Quest item hue is now faked through packets, instead of overriding Hue.
- Re-enabled item drag effects for SA clients.
- Fixed AssignRandomFacialHair bug in Utility.
- Added random hue comments to Utility.
This commit is contained in:
eos 2013-02-03 01:05:17 +00:00
parent 5c7af18dfb
commit 35fbffdb51
167 changed files with 23218 additions and 234 deletions

View file

@ -25,7 +25,7 @@ namespace Server.Mobiles
{
base.InitOutfit();
AddItem( new HalfApron( RandomBrightHue() ) );
AddItem( new HalfApron( Utility.RandomBrightHue() ) );
}
[Constructable]

View file

@ -59,7 +59,7 @@ namespace Server.Mobiles
public override int GetHairHue()
{
return RandomBrightHue();
return Utility.RandomBrightHue();
}
public override VendorShoeType ShoeType

View file

@ -37,32 +37,32 @@ namespace Server.Mobiles
Item item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.OuterTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.InnerTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.Shirt );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
}
public GypsyAnimalTrainer( Serial serial ) : base( serial )

View file

@ -27,45 +27,45 @@ namespace Server.Mobiles
switch ( Utility.Random( 4 ) )
{
case 0: AddItem( new JesterHat( RandomBrightHue() ) ); break;
case 1: AddItem( new Bandana( RandomBrightHue() ) ); break;
case 2: AddItem( new SkullCap( RandomBrightHue() ) ); break;
case 0: AddItem( new JesterHat( Utility.RandomBrightHue() ) ); break;
case 1: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
case 2: AddItem( new SkullCap( Utility.RandomBrightHue() ) ); break;
}
Item item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.Shoes );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.OuterTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.InnerTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.Shirt );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
}
public GypsyBanker( Serial serial ) : base( serial )

View file

@ -35,28 +35,28 @@ namespace Server.Mobiles
switch ( Utility.Random( 4 ) )
{
case 0: AddItem( new JesterHat( RandomBrightHue() ) ); break;
case 1: AddItem( new Bandana( RandomBrightHue() ) ); break;
case 2: AddItem( new SkullCap( RandomBrightHue() ) ); break;
case 0: AddItem( new JesterHat( Utility.RandomBrightHue() ) ); break;
case 1: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
case 2: AddItem( new SkullCap( Utility.RandomBrightHue() ) ); break;
}
if ( Utility.RandomBool() )
AddItem( new HalfApron( RandomBrightHue() ) );
AddItem( new HalfApron( Utility.RandomBrightHue() ) );
Item item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
}
public GypsyMaiden( Serial serial ) : base( serial )

View file

@ -62,12 +62,12 @@ namespace Server.Mobiles
switch ( Utility.Random( 3 ) )
{
case 0:
case 1: AddItem( new JesterHat( RandomBrightHue() ) ); break;
case 2: AddItem( new Bandana( RandomBrightHue() ) ); break;
case 1: AddItem( new JesterHat( Utility.RandomBrightHue() ) ); break;
case 2: AddItem( new Bandana( Utility.RandomBrightHue() ) ); break;
}
if ( item == null )
AddItem( new FullApron( RandomBrightHue() ) );
AddItem( new FullApron( Utility.RandomBrightHue() ) );
AddItem( new Bascinet() );
AddItem( new SmithHammer() );
@ -75,32 +75,32 @@ namespace Server.Mobiles
item = FindItemOnLayer( Layer.Pants );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.InnerLegs );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.OuterTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.InnerTorso );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
item = FindItemOnLayer( Layer.Shirt );
if ( item != null )
item.Hue = RandomBrightHue();
item.Hue = Utility.RandomBrightHue();
}
public IronWorker( Serial serial ) : base( serial )

View file

@ -11,6 +11,9 @@ namespace Server.Mobiles
public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } }
private DateTime m_NextShush;
public static readonly TimeSpan ShushDelay = TimeSpan.FromMinutes( 1 );
[Constructable]
public Scribe() : base( "the scribe" )
{
@ -35,6 +38,27 @@ namespace Server.Mobiles
AddItem( new Server.Items.Robe( Utility.RandomNeutralHue() ) );
}
public override bool HandlesOnSpeech( Mobile from )
{
return from.Player;
}
public override void OnSpeech( SpeechEventArgs e )
{
base.OnSpeech( e );
if ( !e.Handled && m_NextShush <= DateTime.Now && InLOS( e.Mobile ) )
{
Direction = GetDirectionTo( e.Mobile );
PlaySound( Female ? 0x32F : 0x441 );
PublicOverheadMessage( Network.MessageType.Regular, 0x3B2, 1073990 ); // Shhhh!
m_NextShush = DateTime.Now + ShushDelay;
e.Handled = true;
}
}
public Scribe( Serial serial ) : base( serial )
{
}

View file

@ -24,12 +24,12 @@ namespace Server.Mobiles
public override void InitOutfit()
{
AddItem( new FancyShirt( RandomBrightHue() ) );
AddItem( new FancyShirt( Utility.RandomBrightHue() ) );
AddItem( new Shoes( GetShoeHue() ) );
AddItem( new LongPants( GetRandomHue() ) );
if ( Utility.RandomBool() )
AddItem( new Cloak( RandomBrightHue() ) );
AddItem( new Cloak( Utility.RandomBrightHue() ) );
switch ( Utility.Random( 2 ) )
{