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

@ -2,6 +2,7 @@ using System;
using System.Text;
using Server.Items;
using Server.Mobiles;
using Server.Engines.MLQuests;
namespace Server.Spells.Spellweaving
{
@ -64,24 +65,35 @@ namespace Server.Spells.Spellweaving
if( !base.CheckCast() )
return false;
if( !CheckExpansion( Caster ) )
Mobile caster = Caster;
if ( !CheckExpansion( caster ) )
{
Caster.SendLocalizedMessage( 1072176 ); // You must upgrade to the Mondain's Legacy Expansion Pack before using that ability
caster.SendLocalizedMessage( 1072176 ); // You must upgrade to the Mondain's Legacy Expansion Pack before using that ability
return false;
}
//TODO: Spellweaving quest completion
if ( caster is PlayerMobile )
{
MLQuestContext context = MLQuestSystem.GetContext( (PlayerMobile)caster );
if ( context == null || !context.Spellweaving )
{
caster.SendLocalizedMessage( 1073220 ); // You must have completed the epic arcanist quest to use this ability.
return false;
}
}
int mana = ScaleMana( RequiredMana );
if( Caster.Mana < mana )
if ( caster.Mana < mana )
{
Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
else if( Caster.Skills[CastSkill].Value < RequiredSkill )
else if ( caster.Skills[CastSkill].Value < RequiredSkill )
{
Caster.SendLocalizedMessage( 1063013, String.Format( "{0}\t{1}", RequiredSkill.ToString( "F1" ), "#1044114" ) ); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
caster.SendLocalizedMessage( 1063013, String.Format( "{0}\t{1}", RequiredSkill.ToString( "F1" ), "#1044114" ) ); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
return false;
}

View file

@ -1,5 +1,6 @@
using System;
using Server.Mobiles;
using Server.Engines.MLQuests;
namespace Server.Spells.Spellweaving
{
@ -21,5 +22,24 @@ namespace Server.Spells.Spellweaving
}
public override int Sound { get { return 0x217; } }
public override bool CheckSequence()
{
Mobile caster = Caster;
// This is done after casting completes
if ( caster is PlayerMobile )
{
MLQuestContext context = MLQuestSystem.GetContext( (PlayerMobile)caster );
if ( context == null || !context.SummonFey )
{
caster.SendLocalizedMessage( 1074563 ); // You haven't forged a friendship with the fey and are unable to summon their aid.
return false;
}
}
return base.CheckSequence();
}
}
}
}

View file

@ -1,5 +1,6 @@
using System;
using Server.Mobiles;
using Server.Engines.MLQuests;
namespace Server.Spells.Spellweaving
{
@ -21,5 +22,24 @@ namespace Server.Spells.Spellweaving
}
public override int Sound { get { return 0x216; } }
public override bool CheckSequence()
{
Mobile caster = Caster;
// This is done after casting completes
if ( caster is PlayerMobile )
{
MLQuestContext context = MLQuestSystem.GetContext( (PlayerMobile)caster );
if ( context == null || !context.SummonFiend )
{
caster.SendLocalizedMessage( 1074564 ); // You haven't demonstrated mastery to summon a fiend.
return false;
}
}
return base.CheckSequence();
}
}
}
}