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:
parent
5c7af18dfb
commit
35fbffdb51
167 changed files with 23218 additions and 234 deletions
72
Scripts/Engines/MLQuests/Items/PrismaticCrystal.cs
Normal file
72
Scripts/Engines/MLQuests/Items/PrismaticCrystal.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.MLQuests;
|
||||
using Server.Engines.MLQuests.Definitions;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PrismaticCrystal : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074269; } } // prismatic crystal
|
||||
|
||||
[Constructable]
|
||||
public PrismaticCrystal() : base( 0x2DA )
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 0x32;
|
||||
}
|
||||
|
||||
public PrismaticCrystal( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if ( pm == null || pm.Backpack == null )
|
||||
return;
|
||||
|
||||
if ( pm.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
MLQuestContext context = MLQuestSystem.GetContext( pm );
|
||||
|
||||
if ( context != null && context.IsDoingQuest( typeof( UnfadingMemoriesPartOne ) ) && pm.Backpack.FindItemByType( typeof( PrismaticAmber ), false ) == null )
|
||||
{
|
||||
Item amber = new PrismaticAmber();
|
||||
|
||||
if ( pm.PlaceInBackpack( amber ) )
|
||||
{
|
||||
MLQuestSystem.MarkQuestItem( pm, amber );
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage( 502385 ); // Your pack cannot hold this item.
|
||||
amber.Delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
pm.SendLocalizedMessage( 1075464 ); // You already have as many of those as you need.
|
||||
}
|
||||
else
|
||||
pm.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue