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
|
|
@ -23,13 +23,12 @@ namespace Server.Items
|
|||
{
|
||||
get
|
||||
{
|
||||
if( Recipe.Recipes.ContainsKey( m_RecipeID ) )
|
||||
if ( Recipe.Recipes.ContainsKey( m_RecipeID ) )
|
||||
return Recipe.Recipes[m_RecipeID];
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -177,7 +177,11 @@ namespace Server.Items
|
|||
{
|
||||
Item item = (Item)targeted;
|
||||
|
||||
if ( item is IDyable && m_Tub.AllowDyables )
|
||||
if ( item.QuestItem )
|
||||
{
|
||||
from.SendLocalizedMessage( 1151836 ); // You may not dye toggled quest items.
|
||||
}
|
||||
else if ( item is IDyable && m_Tub.AllowDyables )
|
||||
{
|
||||
if ( !from.InRange( m_Tub.GetWorldLocation(), 1 ) || !from.InRange( item.GetWorldLocation(), 1 ) )
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
|
|
|
|||
|
|
@ -77,15 +77,15 @@ namespace Server.Items
|
|||
{
|
||||
IScissorable obj = (IScissorable) targeted;
|
||||
|
||||
if( obj.Scissor( from, m_Item ) )
|
||||
if ( CanScissor( from, obj ) && obj.Scissor( from, m_Item ) )
|
||||
from.PlaySound( 0x248 );
|
||||
}
|
||||
}
|
||||
else if( targeted is IScissorable )
|
||||
else if ( targeted is IScissorable )
|
||||
{
|
||||
IScissorable obj = (IScissorable)targeted;
|
||||
|
||||
if( obj.Scissor( from, m_Item ) )
|
||||
if ( CanScissor( from, obj ) && obj.Scissor( from, m_Item ) )
|
||||
from.PlaySound( 0x248 );
|
||||
}
|
||||
else
|
||||
|
|
@ -100,12 +100,25 @@ namespace Server.Items
|
|||
{
|
||||
IScissorable obj = (IScissorable) targeted;
|
||||
|
||||
if ( obj.Scissor( from, m_Item ) )
|
||||
if ( CanScissor( from, obj ) && obj.Scissor( from, m_Item ) )
|
||||
from.PlaySound( 0x248 );
|
||||
}
|
||||
else
|
||||
base.OnNonlocalTarget( from, targeted );
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CanScissor( Mobile from, IScissorable obj )
|
||||
{
|
||||
if ( obj is Item && ( (Item)obj ).Nontransferable )
|
||||
{
|
||||
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: Move other general checks from the different implementations here
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ namespace Server.Items
|
|||
set { m_UsesRemaining = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public virtual bool BreakOnDepletion { get { return true; } }
|
||||
|
||||
public void ScaleUses()
|
||||
{
|
||||
m_UsesRemaining = (m_UsesRemaining * GetUsesScalar()) / 100;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue