Fixed issue with secured dye tubs in houses
http://www.uodemise.com/forum/showthread.php?t=147193 Smith/Tailor PS should not be cursed http://www.uodemise.com/forum/showthread.php?t=148415 Large crafting system overhaul http://www.uodemise.com/forum/showthread.php?t=119342
This commit is contained in:
parent
f90c09ef55
commit
4df455f33c
132 changed files with 4914 additions and 1012 deletions
|
|
@ -19,6 +19,16 @@ namespace Server.Engines.Craft
|
|||
private int m_LastGroupIndex;
|
||||
private bool m_DoNotColor;
|
||||
private CraftMarkOption m_MarkOption;
|
||||
|
||||
#region Hue State Vars
|
||||
private bool m_CheckedHues;
|
||||
private List<int> m_Hues;
|
||||
private Item m_CompareHueTo;
|
||||
|
||||
public bool CheckedHues { get { return m_CheckedHues; } set { m_CheckedHues = value; } }
|
||||
public List<int> Hues { get { return m_Hues; } set { m_Hues = value; } }
|
||||
public Item CompareHueTo { get { return m_CompareHueTo; } set { m_CompareHueTo = value; } }
|
||||
#endregion
|
||||
|
||||
public List<CraftItem> Items { get { return m_Items; } }
|
||||
public int LastResourceIndex{ get{ return m_LastResourceIndex; } set{ m_LastResourceIndex = value; } }
|
||||
|
|
@ -33,6 +43,10 @@ namespace Server.Engines.Craft
|
|||
m_LastResourceIndex = -1;
|
||||
m_LastResourceIndex2 = -1;
|
||||
m_LastGroupIndex = -1;
|
||||
|
||||
m_CheckedHues = false;
|
||||
m_Hues = new List<int>();
|
||||
m_CompareHueTo = null;
|
||||
}
|
||||
|
||||
public CraftItem LastMade
|
||||
|
|
@ -55,5 +69,12 @@ namespace Server.Engines.Craft
|
|||
|
||||
m_Items.Insert( 0, item );
|
||||
}
|
||||
|
||||
public void ResetHueStateVars()
|
||||
{
|
||||
m_CheckedHues = false;
|
||||
m_Hues = new List<int>();
|
||||
m_CompareHueTo = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -125,25 +125,22 @@ namespace Server.Engines.Craft
|
|||
|
||||
nameString = subResource.NameString;
|
||||
nameNumber = subResource.NameNumber;
|
||||
resourceType = subResource.ItemType;
|
||||
resourceType = subResource.ItemType;
|
||||
}
|
||||
|
||||
int resourceCount = 0;
|
||||
|
||||
if ( from.Backpack != null )
|
||||
{
|
||||
Item[] items = from.Backpack.FindItemsByType( resourceType, true );
|
||||
|
||||
for ( int i = 0; i < items.Length; ++i )
|
||||
resourceCount += items[i].Amount;
|
||||
}
|
||||
int resourceCount = GetResourceAmount( resourceType );
|
||||
|
||||
AddButton( 15, 362, 4005, 4007, GetButtonID( 6, 0 ), GumpButtonType.Reply, 0 );
|
||||
|
||||
if ( nameNumber > 0 )
|
||||
AddHtmlLocalized( 50, 365, 250, 18, nameNumber, resourceCount.ToString(), LabelColor, false, false );
|
||||
{
|
||||
if ( context.DoNotColor )
|
||||
AddLabel( 50, 364, LabelHue, "*" );
|
||||
|
||||
AddHtmlLocalized( context.DoNotColor ? 61 : 50, 365, 250, 18, nameNumber, resourceCount.ToString(), LabelColor, false, false );
|
||||
}
|
||||
else
|
||||
AddLabel( 50, 362, LabelHue, String.Format( "{0} ({1} Available)", nameString, resourceCount ) );
|
||||
AddLabel( 50, 362, LabelHue, String.Format( "{0} ({1} Available)", nameString, resourceCount ) );
|
||||
}
|
||||
// ****************************************
|
||||
|
||||
|
|
@ -155,7 +152,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
int resIndex = ( context == null ? -1 : context.LastResourceIndex2 );
|
||||
|
||||
Type resourceType = craftSystem.CraftSubRes2.ResType;
|
||||
Type resourceType = craftSystem.CraftSubRes2.ResType;
|
||||
|
||||
if ( resIndex > -1 )
|
||||
{
|
||||
|
|
@ -163,25 +160,22 @@ namespace Server.Engines.Craft
|
|||
|
||||
nameString = subResource.NameString;
|
||||
nameNumber = subResource.NameNumber;
|
||||
resourceType = subResource.ItemType;
|
||||
resourceType = subResource.ItemType;
|
||||
}
|
||||
|
||||
int resourceCount = 0;
|
||||
|
||||
if ( from.Backpack != null )
|
||||
{
|
||||
Item[] items = from.Backpack.FindItemsByType( resourceType, true );
|
||||
|
||||
for ( int i = 0; i < items.Length; ++i )
|
||||
resourceCount += items[i].Amount;
|
||||
}
|
||||
int resourceCount = GetResourceAmount( resourceType );
|
||||
|
||||
AddButton( 15, 382, 4005, 4007, GetButtonID( 6, 7 ), GumpButtonType.Reply, 0 );
|
||||
|
||||
if ( nameNumber > 0 )
|
||||
AddHtmlLocalized( 50, 385, 250, 18, nameNumber, resourceCount.ToString(), LabelColor, false, false );
|
||||
{
|
||||
if ( context.DoNotColor )
|
||||
AddLabel( 50, 384, LabelHue, "*" );
|
||||
|
||||
AddHtmlLocalized( context.DoNotColor ? 61 : 50, 385, 250, 18, nameNumber, resourceCount.ToString(), LabelColor, false, false );
|
||||
}
|
||||
else
|
||||
AddLabel( 50, 385, LabelHue, String.Format( "{0} ({1} Available)", nameString, resourceCount ) );
|
||||
AddLabel( 50, 385, LabelHue, String.Format( "{0} ({1} Available)", nameString, resourceCount ) );
|
||||
}
|
||||
// ****************************************
|
||||
|
||||
|
|
@ -221,15 +215,7 @@ namespace Server.Engines.Craft
|
|||
AddHtmlLocalized( 255, 263, 200, 18, (context == null || !context.DoNotColor) ? 1061591 : 1061590, LabelColor, false, false );
|
||||
}
|
||||
|
||||
int resourceCount = 0;
|
||||
|
||||
if ( from.Backpack != null )
|
||||
{
|
||||
Item[] items = from.Backpack.FindItemsByType( subResource.ItemType, true );
|
||||
|
||||
for ( int j = 0; j < items.Length; ++j )
|
||||
resourceCount += items[j].Amount;
|
||||
}
|
||||
int resourceCount = GetResourceAmount( subResource.ItemType );
|
||||
|
||||
AddButton( 220, 60 + (index * 20), 4005, 4007, GetButtonID( 5, i ), GumpButtonType.Reply, 0 );
|
||||
|
||||
|
|
@ -364,6 +350,44 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
return 1 + type + (index * 7);
|
||||
}
|
||||
|
||||
public int GetResourceAmount( Type resourceType )
|
||||
{
|
||||
int resourceCount = 0;
|
||||
|
||||
Item[] items;
|
||||
|
||||
if ( m_From.Backpack != null )
|
||||
{
|
||||
if ( m_CraftSystem is DefCarpentry || m_CraftSystem is DefTailoring )
|
||||
{
|
||||
CraftResource resource = CraftResources.GetFromType( resourceType );
|
||||
CraftResourceInfo resourceInfo = CraftResources.GetInfo( resource );
|
||||
Type[] typeList = resourceInfo.ResourceTypes;
|
||||
|
||||
for ( int i = 0; i < typeList.Length; ++i )
|
||||
{
|
||||
items = m_From.Backpack.FindItemsByType( typeList[i], true );
|
||||
|
||||
for ( int j = 0; j < items.Length; ++j )
|
||||
{
|
||||
resourceCount += items[j].Amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
items = m_From.Backpack.FindItemsByType( resourceType, true );
|
||||
|
||||
for ( int i = 0; i < items.Length; ++i )
|
||||
{
|
||||
resourceCount += items[i].Amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resourceCount;
|
||||
}
|
||||
|
||||
public void CraftItem( CraftItem item )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace Server.Engines.Craft
|
|||
AddLabel( 330, 40, LabelHue, craftItem.NameString );
|
||||
|
||||
if ( craftItem.UseAllRes )
|
||||
AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1048176, LabelColor, false, false ); // Makes as many as possible at once
|
||||
AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, craftItem.UseAllMessage, LabelColor, false, false );
|
||||
|
||||
DrawItem();
|
||||
DrawSkill();
|
||||
|
|
@ -122,7 +122,10 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
Type type = m_CraftItem.ItemType;
|
||||
|
||||
AddItem( 20, 50, CraftItem.ItemIDOf( type ) );
|
||||
int itemID = m_CraftItem.ForceGumpItemID ? m_CraftItem.GumpItemID : CraftItem.ItemIDOf( type );
|
||||
|
||||
if ( !type.IsSubclassOf( typeof( BaseAddonDeed ) ) || type.IsDefined( typeof( CraftItemIDAttribute ), true ) )
|
||||
AddItem( 20, 50, itemID );
|
||||
|
||||
if ( m_CraftItem.IsMarkable( type ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Server.Items;
|
|||
using Server.Factions;
|
||||
using Server.Mobiles;
|
||||
using Server.Commands;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Engines.Craft
|
||||
{
|
||||
|
|
@ -24,6 +25,8 @@ namespace Server.Engines.Craft
|
|||
private CraftResCol m_arCraftRes;
|
||||
private CraftSkillCol m_arCraftSkill;
|
||||
private Type m_Type;
|
||||
|
||||
private object[] m_CraftArgs;
|
||||
|
||||
private string m_GroupNameString;
|
||||
private int m_GroupNameNumber;
|
||||
|
|
@ -36,6 +39,8 @@ namespace Server.Engines.Craft
|
|||
private int m_Stam;
|
||||
|
||||
private bool m_UseAllRes;
|
||||
private int m_UseAllMessage;
|
||||
private int m_MultiplyBy;
|
||||
|
||||
private bool m_NeedHeat;
|
||||
private bool m_NeedOven;
|
||||
|
|
@ -44,14 +49,42 @@ namespace Server.Engines.Craft
|
|||
private bool m_UseSubRes2;
|
||||
|
||||
private bool m_ForceNonExceptional;
|
||||
private bool m_ForceGumpItemID;
|
||||
private int m_GumpItemID;
|
||||
|
||||
private bool m_BeginHueSelector;
|
||||
private Type m_TypeToCompare;
|
||||
|
||||
public int UseAllMessage
|
||||
{
|
||||
get { return m_UseAllMessage; }
|
||||
set { m_UseAllMessage = value; }
|
||||
}
|
||||
|
||||
public int MultiplyBy
|
||||
{
|
||||
get { return m_MultiplyBy; }
|
||||
set { m_MultiplyBy = value; }
|
||||
}
|
||||
|
||||
public bool ForceNonExceptional
|
||||
{
|
||||
get { return m_ForceNonExceptional; }
|
||||
set { m_ForceNonExceptional = value; }
|
||||
}
|
||||
|
||||
|
||||
public bool ForceGumpItemID
|
||||
{
|
||||
get { return m_ForceGumpItemID; }
|
||||
set { m_ForceGumpItemID = value; }
|
||||
}
|
||||
|
||||
public int GumpItemID
|
||||
{
|
||||
get { return m_GumpItemID; }
|
||||
set { m_GumpItemID = value; }
|
||||
}
|
||||
|
||||
private Expansion m_RequiredExpansion;
|
||||
|
||||
public Expansion RequiredExpansion
|
||||
|
|
@ -133,6 +166,8 @@ namespace Server.Engines.Craft
|
|||
|
||||
m_GroupNameNumber = groupName;
|
||||
m_NameNumber = name;
|
||||
|
||||
m_MultiplyBy = 1;
|
||||
}
|
||||
|
||||
public void AddRes( Type type, TextDefinition name, int amount )
|
||||
|
|
@ -152,6 +187,12 @@ namespace Server.Engines.Craft
|
|||
CraftSkill craftSkill = new CraftSkill( skillToMake, minSkill, maxSkill );
|
||||
m_arCraftSkill.Add( craftSkill );
|
||||
}
|
||||
|
||||
public object[] CraftArgs
|
||||
{
|
||||
get { return m_CraftArgs; }
|
||||
set { m_CraftArgs = value; }
|
||||
}
|
||||
|
||||
public int Mana
|
||||
{
|
||||
|
|
@ -361,18 +402,37 @@ namespace Server.Engines.Craft
|
|||
typeof( Spellbook ), typeof( Runebook ),
|
||||
typeof( BaseQuiver )
|
||||
};
|
||||
private static Type[] m_MarkableAOSTable = new Type[]
|
||||
{
|
||||
typeof( BaseCraftableItem ),
|
||||
typeof( BasePlayerBB ),
|
||||
typeof( BaseLight ),
|
||||
typeof( BaseOtherEquipable ),
|
||||
typeof( BaseFurnitureContainer ),
|
||||
typeof( LockableContainer )
|
||||
};
|
||||
#endregion
|
||||
|
||||
public bool IsMarkable( Type type )
|
||||
{
|
||||
if( m_ForceNonExceptional ) //Don't even display the stuff for marking if it can't ever be exceptional.
|
||||
return false;
|
||||
|
||||
|
||||
for ( int i = 0; i < m_MarkableTable.Length; ++i )
|
||||
{
|
||||
if ( type == m_MarkableTable[i] || type.IsSubclassOf( m_MarkableTable[i] ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
// Carpentry prior to AOS did not have exceptional items.
|
||||
if ( Core.AOS )
|
||||
{
|
||||
for ( int i = 0; i < m_MarkableAOSTable.Length; ++i )
|
||||
{
|
||||
if ( type == m_MarkableAOSTable[i] || type.IsSubclassOf( m_MarkableAOSTable[i] ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -573,13 +633,19 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
return ConsumeRes( from, typeRes, craftSystem, ref resHue, ref maxAmount, consumeType, ref message, false );
|
||||
}
|
||||
|
||||
|
||||
public bool ConsumeRes( Mobile from, Type typeRes, CraftSystem craftSystem, ref int resHue, ref int maxAmount, ConsumeType consumeType, ref object message, bool isFailure )
|
||||
{
|
||||
Container ourPack = from.Backpack;
|
||||
Container c = from.Backpack;
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
m_System = craftSystem;
|
||||
|
||||
if ( ourPack == null )
|
||||
if ( c == null || !(c is BaseContainer) )
|
||||
return false;
|
||||
|
||||
BaseContainer ourPack = (BaseContainer)c;
|
||||
|
||||
if ( m_NeedHeat && !Find( from, m_HeatSources ) )
|
||||
{
|
||||
|
|
@ -637,10 +703,15 @@ namespace Server.Engines.Craft
|
|||
|
||||
amounts[i] = craftRes.Amount;
|
||||
|
||||
// For stackable items that can ben crafted more than one at a time
|
||||
// For stackable items that can be crafted more than one at a time
|
||||
if ( UseAllRes )
|
||||
{
|
||||
int tempAmount = ourPack.GetAmount( types[i] );
|
||||
if ( !context.CheckedHues )
|
||||
if ( RetainsColorFrom( m_System, types[i][0] ) )
|
||||
CheckMulitpleHues( from, types[i] );
|
||||
|
||||
int tempAmount = ourPack.GetAmountCompared( types[i], new CheckItemGroup( CheckHueGrouping ), context.CompareHueTo );
|
||||
|
||||
tempAmount /= amounts[i];
|
||||
if ( tempAmount < maxAmount )
|
||||
{
|
||||
|
|
@ -707,12 +778,12 @@ namespace Server.Engines.Craft
|
|||
// Consume ALL
|
||||
if ( consumeType == ConsumeType.All )
|
||||
{
|
||||
m_ResHue = 0; m_ResAmount = 0; m_System = craftSystem;
|
||||
|
||||
m_ResHue = 0; m_ResAmount = 0;
|
||||
|
||||
if ( IsQuantityType( types ) )
|
||||
index = ConsumeQuantity( ourPack, types, amounts );
|
||||
else
|
||||
index = ourPack.ConsumeTotalGrouped( types, amounts, true, new OnItemConsumed( OnResourceConsumed ), new CheckItemGroup( CheckHueGrouping ) );
|
||||
index = ourPack.ConsumeTotalGroupedCompared( types, amounts, true, new OnItemConsumed( OnResourceConsumed ), new CheckItemGroup( CheckHueGrouping ), context.CompareHueTo );
|
||||
|
||||
resHue = m_ResHue;
|
||||
}
|
||||
|
|
@ -728,12 +799,12 @@ namespace Server.Engines.Craft
|
|||
amounts[i] = 1;
|
||||
}
|
||||
|
||||
m_ResHue = 0; m_ResAmount = 0; m_System = craftSystem;
|
||||
m_ResHue = 0; m_ResAmount = 0;
|
||||
|
||||
if ( IsQuantityType( types ) )
|
||||
index = ConsumeQuantity( ourPack, types, amounts );
|
||||
else
|
||||
index = ourPack.ConsumeTotalGrouped( types, amounts, true, new OnItemConsumed( OnResourceConsumed ), new CheckItemGroup( CheckHueGrouping ) );
|
||||
index = ourPack.ConsumeTotalGroupedCompared( types, amounts, true, new OnItemConsumed( OnResourceConsumed ), new CheckItemGroup( CheckHueGrouping ), context.CompareHueTo );
|
||||
|
||||
resHue = m_ResHue;
|
||||
}
|
||||
|
|
@ -757,7 +828,21 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
for ( int i = 0; i < types.Length; i++ )
|
||||
{
|
||||
if ( ourPack.GetBestGroupAmount( types[i], true, new CheckItemGroup( CheckHueGrouping ) ) < amounts[i] )
|
||||
if ( !context.CheckedHues )
|
||||
if ( RetainsColorFrom( m_System, types[i][0] ) )
|
||||
CheckMulitpleHues( from, types[i] );
|
||||
|
||||
if ( craftSystem.UsesHueSelector( this, types[i][0] ) )
|
||||
{
|
||||
if ( context.CompareHueTo == null && context.Hues.Count > 1 )
|
||||
{
|
||||
m_BeginHueSelector = true;
|
||||
m_TypeToCompare = types[i][0];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ourPack.GetComparedGroupAmount( types[i], true, new CheckItemGroup( CheckHueGrouping ), context.CompareHueTo ) < amounts[i] )
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
|
|
@ -784,11 +869,106 @@ namespace Server.Engines.Craft
|
|||
message = res.MessageString;
|
||||
else
|
||||
message = 502925; // You don't have the resources required to make that item.
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private class SelectHuedTarget : Target
|
||||
{
|
||||
private CraftItem m_CraftItem;
|
||||
private CraftSystem m_CraftSystem;
|
||||
private Type m_TypeRes;
|
||||
private BaseTool m_Tool;
|
||||
|
||||
public SelectHuedTarget( CraftItem craftItem, CraftSystem craftSystem, Type typeRes, BaseTool tool ) : base( -1, true, TargetFlags.None )
|
||||
{
|
||||
m_CraftItem = craftItem;
|
||||
m_CraftSystem = craftSystem;
|
||||
m_TypeRes = typeRes;
|
||||
m_Tool = tool;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
CraftContext context = m_CraftSystem.GetContext( from );
|
||||
|
||||
if ( context == null )
|
||||
return;
|
||||
|
||||
if ( targeted is Item )
|
||||
{
|
||||
Item target = (Item)targeted;
|
||||
|
||||
Type targType = target.GetType();
|
||||
|
||||
List<Type> types = new List<Type>();
|
||||
|
||||
Type baseType = m_CraftItem.GetBaseResType( m_CraftSystem, m_TypeRes );
|
||||
|
||||
for ( int i = 0; i < m_TypesTable.Length; ++i )
|
||||
{
|
||||
if ( m_TypesTable[i][0] == baseType )
|
||||
{
|
||||
types.AddRange( m_TypesTable[i] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( types.Count <= 0 )
|
||||
types.Add( m_TypeRes );
|
||||
|
||||
for ( int i = 0; i < types.Count; ++i )
|
||||
{
|
||||
if ( target.IsChildOf( from.Backpack ) && targType == types[i] )
|
||||
{
|
||||
context.CompareHueTo = target;
|
||||
context.Hues = new List<int>( new int[] { target.Hue } );
|
||||
m_CraftItem.Craft( from, m_CraftSystem, m_TypeRes, m_Tool );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
from.Target = new SelectHuedTarget( m_CraftItem, m_CraftSystem, m_TypeRes, m_Tool );
|
||||
from.SendLocalizedMessage( 1046439 ); // That is not a valid target.
|
||||
from.SendLocalizedMessage( 1074794 ); // Target the material to use:
|
||||
}
|
||||
|
||||
protected override void OnTargetCancel( Mobile from, TargetCancelType cancelType )
|
||||
{
|
||||
CraftContext context = m_CraftSystem.GetContext( from );
|
||||
|
||||
if ( context != null )
|
||||
context.ResetHueStateVars();
|
||||
|
||||
if ( cancelType == TargetCancelType.Canceled )
|
||||
from.SendGump( new CraftGump( from, m_CraftSystem, m_Tool, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public Type GetBaseResType( CraftSystem craftSystem, Type typeRes )
|
||||
{
|
||||
CraftSubResCol resCol = ( UseSubRes2 ? craftSystem.CraftSubRes2 : craftSystem.CraftSubRes );
|
||||
CraftRes craftRes = Resources.GetAt( 0 );
|
||||
|
||||
foreach ( CraftRes res in Resources )
|
||||
{
|
||||
if ( res.ItemType == typeRes )
|
||||
{
|
||||
craftRes = res;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Type baseType = craftRes.ItemType;
|
||||
|
||||
if ( (baseType == resCol.ResType) && ( typeRes != null ) )
|
||||
baseType = typeRes;
|
||||
|
||||
return baseType;
|
||||
}
|
||||
|
||||
private int m_ResHue;
|
||||
private int m_ResAmount;
|
||||
private CraftSystem m_System;
|
||||
|
|
@ -804,6 +984,25 @@ namespace Server.Engines.Craft
|
|||
m_ResAmount = amount;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckMulitpleHues( Mobile from, Type[] types )
|
||||
{
|
||||
Item[] items = from.Backpack.FindItemsByType( types, true );
|
||||
|
||||
CraftContext context = m_System.GetContext( from );
|
||||
|
||||
if ( context == null || context.CheckedHues || items.Length < 1 )
|
||||
return;
|
||||
|
||||
for ( int i = 0; i < items.Length; ++i )
|
||||
if ( !context.Hues.Contains( items[i].Hue ) )
|
||||
context.Hues.Add( items[i].Hue );
|
||||
|
||||
context.CheckedHues = true;
|
||||
|
||||
if ( m_UseAllRes && !m_System.UsesHueSelector( this, types[0] ) )
|
||||
context.CompareHueTo = items[0];
|
||||
}
|
||||
|
||||
private int CheckHueGrouping( Item a, Item b )
|
||||
{
|
||||
|
|
@ -814,6 +1013,16 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
if( m_ForceNonExceptional )
|
||||
return 0.0;
|
||||
|
||||
// Carpentry prior to AOS did not have exceptional items
|
||||
if ( !Core.AOS )
|
||||
{
|
||||
for ( int i = 0; i < m_MarkableAOSTable.Length; ++i )
|
||||
{
|
||||
if ( m_Type == m_MarkableAOSTable[i] || m_Type.IsSubclassOf( m_MarkableAOSTable[i] ) )
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
switch ( system.ECA )
|
||||
{
|
||||
|
|
@ -891,7 +1100,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
return chance;
|
||||
}
|
||||
|
||||
|
||||
public void Craft( Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool )
|
||||
{
|
||||
if ( from.BeginAction( typeof( CraftSystem ) ) )
|
||||
|
|
@ -912,15 +1121,15 @@ namespace Server.Engines.Craft
|
|||
int resHue = 0;
|
||||
int maxAmount = 0;
|
||||
object message = null;
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if( ConsumeRes( from, typeRes, craftSystem, ref resHue, ref maxAmount, ConsumeType.None, ref message ) )
|
||||
{
|
||||
message = null;
|
||||
|
||||
|
||||
if( ConsumeAttributes( from, ref message, false ) )
|
||||
{
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if( context != null )
|
||||
context.OnMade( this );
|
||||
|
||||
|
|
@ -932,6 +1141,9 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( context != null )
|
||||
context.ResetHueStateVars();
|
||||
|
||||
from.EndAction( typeof( CraftSystem ) );
|
||||
from.SendGump( new CraftGump( from, craftSystem, tool, message ) );
|
||||
}
|
||||
|
|
@ -939,7 +1151,20 @@ namespace Server.Engines.Craft
|
|||
else
|
||||
{
|
||||
from.EndAction( typeof( CraftSystem ) );
|
||||
from.SendGump( new CraftGump( from, craftSystem, tool, message ) );
|
||||
|
||||
if ( m_BeginHueSelector )
|
||||
{
|
||||
m_BeginHueSelector = false;
|
||||
from.SendLocalizedMessage( 1074794 ); // Target the material to use:
|
||||
from.Target = new SelectHuedTarget( this, craftSystem, m_TypeToCompare, tool );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( context != null )
|
||||
context.ResetHueStateVars();
|
||||
|
||||
from.SendGump( new CraftGump( from, craftSystem, tool, message ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1064,26 +1289,31 @@ namespace Server.Engines.Craft
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
tool.UsesRemaining--;
|
||||
|
||||
if ( craftSystem is DefBlacksmithy )
|
||||
if ( context != null && context.Hues.Count <= 1 )
|
||||
{
|
||||
AncientSmithyHammer hammer = from.FindItemOnLayer( Layer.OneHanded ) as AncientSmithyHammer;
|
||||
if ( hammer != null && hammer != tool )
|
||||
tool.UsesRemaining--;
|
||||
|
||||
if ( craftSystem is DefBlacksmithy )
|
||||
{
|
||||
hammer.UsesRemaining--;
|
||||
if ( hammer.UsesRemaining < 1 )
|
||||
hammer.Delete();
|
||||
AncientSmithyHammer hammer = from.FindItemOnLayer( Layer.OneHanded ) as AncientSmithyHammer;
|
||||
if ( hammer != null && hammer != tool )
|
||||
{
|
||||
hammer.UsesRemaining--;
|
||||
if ( hammer.UsesRemaining < 1 )
|
||||
hammer.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
if ( tool.UsesRemaining < 1 )
|
||||
toolBroken = true;
|
||||
|
||||
if ( toolBroken )
|
||||
tool.Delete();
|
||||
}
|
||||
|
||||
if ( tool.UsesRemaining < 1 )
|
||||
toolBroken = true;
|
||||
|
||||
if ( toolBroken )
|
||||
tool.Delete();
|
||||
|
||||
int num = 0;
|
||||
|
||||
Item item;
|
||||
|
|
@ -1098,7 +1328,19 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
else
|
||||
{
|
||||
item = Activator.CreateInstance( ItemType ) as Item;
|
||||
if ( CraftArgs != null )
|
||||
{
|
||||
try{ item = Activator.CreateInstance( ItemType, CraftArgs ) as Item; }
|
||||
catch
|
||||
{
|
||||
item = null;
|
||||
//An internal error occurred, Please notify a game master that you received this message.
|
||||
from.SendGump( new CraftGump( from, craftSystem, tool, 1043288 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
item = Activator.CreateInstance( ItemType ) as Item;
|
||||
}
|
||||
|
||||
if ( item != null )
|
||||
|
|
@ -1115,6 +1357,8 @@ namespace Server.Engines.Craft
|
|||
else
|
||||
item.Amount = maxAmount;
|
||||
}
|
||||
|
||||
item.Amount *= m_MultiplyBy;
|
||||
|
||||
from.AddToBackpack( item );
|
||||
|
||||
|
|
@ -1197,13 +1441,18 @@ namespace Server.Engines.Craft
|
|||
return;
|
||||
}
|
||||
|
||||
tool.UsesRemaining--;
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( tool.UsesRemaining < 1 )
|
||||
toolBroken = true;
|
||||
if ( context != null && context.Hues.Count <= 1 )
|
||||
{
|
||||
tool.UsesRemaining--;
|
||||
|
||||
if ( toolBroken )
|
||||
tool.Delete();
|
||||
if ( tool.UsesRemaining < 1 )
|
||||
toolBroken = true;
|
||||
|
||||
if ( toolBroken )
|
||||
tool.Delete();
|
||||
}
|
||||
|
||||
// SkillCheck failed.
|
||||
int num = craftSystem.PlayEndingEffect( from, true, true, toolBroken, endquality, false, this );
|
||||
|
|
@ -1281,6 +1530,8 @@ namespace Server.Engines.Craft
|
|||
|
||||
if ( cc != null )
|
||||
cc.EndCraftAction();
|
||||
|
||||
context.ResetHueStateVars();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -1298,9 +1549,30 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
if ( context.MarkOption == CraftMarkOption.DoNotMark )
|
||||
makersMark = false;
|
||||
|
||||
m_CraftItem.CompleteCraft( quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool, null );
|
||||
|
||||
Type comparerResType = null;
|
||||
|
||||
if ( context.CompareHueTo != null )
|
||||
comparerResType = context.CompareHueTo.GetType();
|
||||
|
||||
Type baseType = m_CraftItem.GetBaseResType( m_CraftSystem, ( comparerResType != null ? comparerResType : m_TypeRes ) );
|
||||
|
||||
if ( context.Hues != null && context.Hues.Count > 0 && m_CraftItem.UseAllRes && !m_CraftSystem.UsesHueSelector( m_CraftItem, baseType ) )
|
||||
{
|
||||
while ( context.Hues.Count > 0 )
|
||||
{
|
||||
if ( context.CompareHueTo != null )
|
||||
context.CompareHueTo.Hue = context.Hues[0];
|
||||
|
||||
m_CraftItem.CompleteCraft( quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool, null );
|
||||
context.Hues.RemoveAt( 0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
m_CraftItem.CompleteCraft( quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool, null );
|
||||
}
|
||||
|
||||
context.ResetHueStateVars();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool UsesHueSelector( CraftItem item, Type type )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public CraftContext GetContext( Mobile m )
|
||||
{
|
||||
|
|
@ -145,6 +150,11 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
return AddCraft( typeItem, group, name, MainSkill, minSkill, maxSkill, typeRes, nameRes, amount, message );
|
||||
}
|
||||
|
||||
public int AddCraft( Type typeItem, TextDefinition group, TextDefinition name, double minSkill, double maxSkill, Type typeRes, TextDefinition nameRes, int amount, TextDefinition message, object[] args )
|
||||
{
|
||||
return AddCraft( typeItem, group, name, MainSkill, minSkill, maxSkill, typeRes, nameRes, amount, message, args );
|
||||
}
|
||||
|
||||
public int AddCraft( Type typeItem, TextDefinition group, TextDefinition name, SkillName skillToMake, double minSkill, double maxSkill, Type typeRes, TextDefinition nameRes, int amount )
|
||||
{
|
||||
|
|
@ -152,11 +162,17 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
|
||||
public int AddCraft( Type typeItem, TextDefinition group, TextDefinition name, SkillName skillToMake, double minSkill, double maxSkill, Type typeRes, TextDefinition nameRes, int amount, TextDefinition message )
|
||||
{
|
||||
return AddCraft( typeItem, group, name, skillToMake, minSkill, maxSkill, typeRes, nameRes, amount, "", null );
|
||||
}
|
||||
|
||||
public int AddCraft( Type typeItem, TextDefinition group, TextDefinition name, SkillName skillToMake, double minSkill, double maxSkill, Type typeRes, TextDefinition nameRes, int amount, TextDefinition message, object[] args )
|
||||
{
|
||||
CraftItem craftItem = new CraftItem( typeItem, group, name );
|
||||
craftItem.AddRes( typeRes, nameRes, amount, message );
|
||||
craftItem.AddSkill( skillToMake, minSkill, maxSkill );
|
||||
|
||||
craftItem.CraftArgs = args;
|
||||
|
||||
DoGroup( group, craftItem );
|
||||
return m_CraftItems.Add( craftItem );
|
||||
}
|
||||
|
|
@ -197,10 +213,16 @@ namespace Server.Engines.Craft
|
|||
craftItem.Hits = hits;
|
||||
}
|
||||
|
||||
public void SetUseAllRes( int index, bool useAll )
|
||||
public void SetUseAllRes( int index, bool useAll )
|
||||
{
|
||||
SetUseAllRes( index, useAll, 1048176); // Default message is "Makes as many as possible at once"
|
||||
}
|
||||
|
||||
public void SetUseAllRes( int index, bool useAll, int message )
|
||||
{
|
||||
CraftItem craftItem = m_CraftItems.GetAt( index );
|
||||
craftItem.UseAllRes = useAll;
|
||||
craftItem.UseAllMessage = message;
|
||||
}
|
||||
|
||||
public void SetNeedHeat( int index, bool needHeat )
|
||||
|
|
@ -255,6 +277,12 @@ namespace Server.Engines.Craft
|
|||
CraftItem craftItem = m_CraftItems.GetAt( index );
|
||||
craftItem.AddRecipe( id, this );
|
||||
}
|
||||
|
||||
public void MultiplyBy( int index, int multiple )
|
||||
{
|
||||
CraftItem craftItem = m_CraftItems.GetAt( index );
|
||||
craftItem.MultiplyBy = multiple;
|
||||
}
|
||||
|
||||
public void ForceNonExceptional( int index )
|
||||
{
|
||||
|
|
@ -262,6 +290,12 @@ namespace Server.Engines.Craft
|
|||
craftItem.ForceNonExceptional = true;
|
||||
}
|
||||
|
||||
public void ForceGumpItemID( int index, int itemID )
|
||||
{
|
||||
CraftItem craftItem = m_CraftItems.GetAt( index );
|
||||
craftItem.ForceGumpItemID = true;
|
||||
craftItem.GumpItemID = itemID;
|
||||
}
|
||||
|
||||
public void SetSubRes( Type type, string name )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Targeting;
|
||||
using Server.Items;
|
||||
|
|
@ -29,7 +30,7 @@ namespace Server.Engines.Craft
|
|||
if ( !item.IsChildOf( from.Backpack ) )
|
||||
return EnhanceResult.NotInBackpack;
|
||||
|
||||
if ( !(item is BaseArmor) && !(item is BaseWeapon) )
|
||||
if ( !(item is BaseArmor) && !(item is BaseWeapon) && !(item is BaseOtherEquipable) )
|
||||
return EnhanceResult.BadItem;
|
||||
|
||||
if ( item is IArcaneEquip )
|
||||
|
|
@ -85,19 +86,10 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
}
|
||||
|
||||
int phys = 0, fire = 0, cold = 0, pois = 0, nrgy = 0;
|
||||
int dura = 0, luck = 0, lreq = 0, dinc = 0;
|
||||
int baseChance = 0;
|
||||
|
||||
bool physBonus = false;
|
||||
bool fireBonus = false;
|
||||
bool coldBonus = false;
|
||||
bool nrgyBonus = false;
|
||||
bool poisBonus = false;
|
||||
bool duraBonus = false;
|
||||
bool luckBonus = false;
|
||||
bool lreqBonus = false;
|
||||
bool dincBonus = false;
|
||||
|
||||
BonusAttribute[] bonusAttrs = null;
|
||||
BonusAttribute[] randomAttrs = null;
|
||||
|
||||
if ( item is BaseWeapon )
|
||||
{
|
||||
|
|
@ -107,23 +99,15 @@ namespace Server.Engines.Craft
|
|||
return EnhanceResult.AlreadyEnhanced;
|
||||
|
||||
baseChance = 20;
|
||||
|
||||
dura = weapon.MaxHitPoints;
|
||||
luck = weapon.Attributes.Luck;
|
||||
lreq = weapon.WeaponAttributes.LowerStatReq;
|
||||
dinc = weapon.Attributes.WeaponDamage;
|
||||
|
||||
fireBonus = ( attributes.WeaponFireDamage > 0 );
|
||||
coldBonus = ( attributes.WeaponColdDamage > 0 );
|
||||
nrgyBonus = ( attributes.WeaponEnergyDamage > 0 );
|
||||
poisBonus = ( attributes.WeaponPoisonDamage > 0 );
|
||||
|
||||
duraBonus = ( attributes.WeaponDurability > 0 );
|
||||
luckBonus = ( attributes.WeaponLuck > 0 );
|
||||
lreqBonus = ( attributes.WeaponLowerRequirements > 0 );
|
||||
dincBonus = ( dinc > 0 );
|
||||
|
||||
CheckSkill( ref baseChance, from, craftSystem );
|
||||
|
||||
int numOfRand = attributes.RandomAttributeCount;
|
||||
|
||||
bonusAttrs = attributes.WeaponAttributes;
|
||||
randomAttrs = BonusAttributesHelper.GetRandomAttributes( attributes.WeaponRandomAttributes, numOfRand );
|
||||
}
|
||||
else
|
||||
else if ( item is BaseArmor )
|
||||
{
|
||||
BaseArmor armor = (BaseArmor)item;
|
||||
|
||||
|
|
@ -131,62 +115,48 @@ namespace Server.Engines.Craft
|
|||
return EnhanceResult.AlreadyEnhanced;
|
||||
|
||||
baseChance = 20;
|
||||
|
||||
phys = armor.PhysicalResistance;
|
||||
fire = armor.FireResistance;
|
||||
cold = armor.ColdResistance;
|
||||
pois = armor.PoisonResistance;
|
||||
nrgy = armor.EnergyResistance;
|
||||
|
||||
dura = armor.MaxHitPoints;
|
||||
luck = armor.Attributes.Luck;
|
||||
lreq = armor.ArmorAttributes.LowerStatReq;
|
||||
|
||||
physBonus = ( attributes.ArmorPhysicalResist > 0 );
|
||||
fireBonus = ( attributes.ArmorFireResist > 0 );
|
||||
coldBonus = ( attributes.ArmorColdResist > 0 );
|
||||
nrgyBonus = ( attributes.ArmorEnergyResist > 0 );
|
||||
poisBonus = ( attributes.ArmorPoisonResist > 0 );
|
||||
|
||||
duraBonus = ( attributes.ArmorDurability > 0 );
|
||||
luckBonus = ( attributes.ArmorLuck > 0 );
|
||||
lreqBonus = ( attributes.ArmorLowerRequirements > 0 );
|
||||
dincBonus = false;
|
||||
|
||||
CheckSkill( ref baseChance, from, craftSystem );
|
||||
|
||||
int numOfRand = attributes.RandomAttributeCount;
|
||||
|
||||
if ( armor.UsesShieldAttrs )
|
||||
{
|
||||
bonusAttrs = attributes.ShieldAttributes;
|
||||
randomAttrs = BonusAttributesHelper.GetRandomAttributes( attributes.ShieldRandomAttributes, numOfRand );
|
||||
}
|
||||
else
|
||||
{
|
||||
bonusAttrs = info.AttributeInfo.ArmorAttributes;
|
||||
randomAttrs = BonusAttributesHelper.GetRandomAttributes( attributes.ArmorRandomAttributes, numOfRand );
|
||||
}
|
||||
}
|
||||
else if ( item is BaseOtherEquipable )
|
||||
{
|
||||
BaseOtherEquipable otherEquip = (BaseOtherEquipable)item;
|
||||
|
||||
int skill = from.Skills[craftSystem.MainSkill].Fixed / 10;
|
||||
|
||||
if ( skill >= 100 )
|
||||
baseChance -= (skill - 90) / 10;
|
||||
if ( !CraftResources.IsStandard( otherEquip.Resource ) )
|
||||
return EnhanceResult.AlreadyEnhanced;
|
||||
|
||||
baseChance = 20;
|
||||
|
||||
CheckSkill( ref baseChance, from, craftSystem );
|
||||
|
||||
int numOfRand = attributes.RandomAttributeCount;
|
||||
|
||||
bonusAttrs = attributes.OtherAttributes;
|
||||
randomAttrs = BonusAttributesHelper.GetRandomAttributes( attributes.OtherRandomAttributes, numOfRand );
|
||||
}
|
||||
|
||||
List<BonusAttribute> attrs = new List<BonusAttribute>();
|
||||
if ( bonusAttrs != null && bonusAttrs.Length > 0 )
|
||||
attrs.AddRange( bonusAttrs );
|
||||
if ( randomAttrs != null && randomAttrs.Length > 0 )
|
||||
attrs.AddRange( randomAttrs );
|
||||
|
||||
EnhanceResult res = EnhanceResult.Success;
|
||||
|
||||
if ( physBonus )
|
||||
CheckResult( ref res, baseChance + phys );
|
||||
|
||||
if ( fireBonus )
|
||||
CheckResult( ref res, baseChance + fire );
|
||||
|
||||
if ( coldBonus )
|
||||
CheckResult( ref res, baseChance + cold );
|
||||
|
||||
if ( nrgyBonus )
|
||||
CheckResult( ref res, baseChance + nrgy );
|
||||
|
||||
if ( poisBonus )
|
||||
CheckResult( ref res, baseChance + pois );
|
||||
|
||||
if ( duraBonus )
|
||||
CheckResult( ref res, baseChance + (dura / 40) );
|
||||
|
||||
if ( luckBonus )
|
||||
CheckResult( ref res, baseChance + 10 + (luck / 2) );
|
||||
|
||||
if ( lreqBonus )
|
||||
CheckResult( ref res, baseChance + (lreq / 4) );
|
||||
|
||||
if ( dincBonus )
|
||||
CheckResult( ref res, baseChance + (dinc / 4) );
|
||||
|
||||
TryEnhance( attrs, item, baseChance, ref res );
|
||||
|
||||
switch ( res )
|
||||
{
|
||||
|
|
@ -206,17 +176,29 @@ namespace Server.Engines.Craft
|
|||
if( item is BaseWeapon )
|
||||
{
|
||||
BaseWeapon w = (BaseWeapon)item;
|
||||
|
||||
w.RandomAttributes = randomAttrs;
|
||||
|
||||
w.Resource = resource;
|
||||
|
||||
int hue = w.GetElementalDamageHue();
|
||||
if( hue > 0 )
|
||||
w.Hue = hue;
|
||||
w.Hue = w.GetElementalDamageHue( w.Hue );
|
||||
}
|
||||
else if( item is BaseArmor ) //Sanity
|
||||
else if( item is BaseArmor )
|
||||
{
|
||||
BaseArmor ar = (BaseArmor)item;
|
||||
|
||||
ar.RandomAttributes = randomAttrs;
|
||||
|
||||
((BaseArmor)item).Resource = resource;
|
||||
}
|
||||
else if( item is BaseOtherEquipable ) //Sanity
|
||||
{
|
||||
BaseOtherEquipable otherEquip = (BaseOtherEquipable)item;
|
||||
|
||||
otherEquip.RandomAttributes = randomAttrs;
|
||||
|
||||
((BaseOtherEquipable)item).Resource = resource;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -244,6 +226,129 @@ namespace Server.Engines.Craft
|
|||
else if ( chance > random )
|
||||
res = EnhanceResult.Broken;
|
||||
}
|
||||
|
||||
public static void CheckSkill( ref int baseChance, Mobile from, CraftSystem craftSystem )
|
||||
{
|
||||
int skill = from.Skills[craftSystem.MainSkill].Fixed / 10;
|
||||
|
||||
if ( skill >= 100 )
|
||||
baseChance -= (skill - 90) / 10;
|
||||
}
|
||||
|
||||
public static void TryEnhance( List<BonusAttribute> attrs, Item item, int baseChance, ref EnhanceResult res )
|
||||
{
|
||||
foreach ( BonusAttribute attr in attrs )
|
||||
{
|
||||
if ( res != EnhanceResult.Success )
|
||||
return;
|
||||
|
||||
if ( attr.Attribute == null )
|
||||
continue;
|
||||
|
||||
Type type = attr.Attribute.GetType();
|
||||
|
||||
if ( type == typeof( AosAttribute ) )
|
||||
{
|
||||
AosAttribute aosAttr = (AosAttribute)attr.Attribute;
|
||||
|
||||
if ( aosAttr == AosAttribute.SpellChanneling )
|
||||
continue;
|
||||
|
||||
if ( item is IAosAttributes )
|
||||
CheckResult( ref res, baseChance + GetChance( aosAttr, ((IAosAttributes)item).Attributes ) );
|
||||
}
|
||||
else if ( type == typeof( AosWeaponAttribute ) )
|
||||
{
|
||||
if ( item is BaseWeapon )
|
||||
CheckResult( ref res, baseChance + GetChance( (AosWeaponAttribute)attr.Attribute, ((BaseWeapon)item).WeaponAttributes ) );
|
||||
}
|
||||
else if ( type == typeof( AosArmorAttribute ) )
|
||||
{
|
||||
if ( (AosArmorAttribute)attr.Attribute == AosArmorAttribute.MageArmor )
|
||||
continue;
|
||||
|
||||
if ( item is BaseArmor )
|
||||
CheckResult( ref res, baseChance + GetChance( (AosArmorAttribute)attr.Attribute, ((BaseArmor)item).ArmorAttributes ) );
|
||||
}
|
||||
else if ( type == typeof( ResistanceType ) )
|
||||
{
|
||||
if ( item is BaseArmor )
|
||||
{
|
||||
BaseArmor ar = (BaseArmor)item;
|
||||
|
||||
switch ( (ResistanceType)attr.Attribute )
|
||||
{
|
||||
case ResistanceType.Physical:
|
||||
CheckResult( ref res, baseChance + ar.PhysicalResistance );
|
||||
break;
|
||||
case ResistanceType.Fire:
|
||||
CheckResult( ref res, baseChance + ar.FireResistance );
|
||||
break;
|
||||
case ResistanceType.Cold:
|
||||
CheckResult( ref res, baseChance + ar.ColdResistance );
|
||||
break;
|
||||
case ResistanceType.Poison:
|
||||
CheckResult( ref res, baseChance + ar.PoisonResistance );
|
||||
break;
|
||||
case ResistanceType.Energy:
|
||||
CheckResult( ref res, baseChance + ar.EnergyResistance );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetChance( AosAttribute attr, AosAttributes itemAttrs )
|
||||
{
|
||||
int chance;
|
||||
|
||||
switch ( attr )
|
||||
{
|
||||
case AosAttribute.LowerWeight: chance = itemAttrs[attr] / 40; break;
|
||||
case AosAttribute.WeaponDamage: chance = itemAttrs[attr] / 4; break;
|
||||
case AosAttribute.Luck: chance = 10 + itemAttrs[attr] / 2; break;
|
||||
default:
|
||||
chance = itemAttrs[attr] / 2; break;
|
||||
}
|
||||
|
||||
return chance;
|
||||
}
|
||||
|
||||
public static int GetChance( AosArmorAttribute attr, AosArmorAttributes itemAttrs )
|
||||
{
|
||||
int chance;
|
||||
|
||||
switch ( attr )
|
||||
{
|
||||
case AosArmorAttribute.DurabilityBonus: chance = itemAttrs[attr] / 40; break;
|
||||
case AosArmorAttribute.LowerStatReq: chance = itemAttrs[attr] / 4; break;
|
||||
default:
|
||||
chance = itemAttrs[attr] / 2; break;
|
||||
}
|
||||
|
||||
return chance;
|
||||
}
|
||||
|
||||
public static int GetChance( AosWeaponAttribute attr, AosWeaponAttributes itemAttrs )
|
||||
{
|
||||
int chance;
|
||||
|
||||
switch ( attr )
|
||||
{
|
||||
case AosWeaponAttribute.DurabilityBonus: chance = itemAttrs[attr] / 40; break;
|
||||
case AosWeaponAttribute.LowerStatReq: chance = itemAttrs[attr] / 4; break;
|
||||
case AosWeaponAttribute.ResistPhysicalBonus:
|
||||
case AosWeaponAttribute.ResistFireBonus:
|
||||
case AosWeaponAttribute.ResistColdBonus:
|
||||
case AosWeaponAttribute.ResistPoisonBonus:
|
||||
case AosWeaponAttribute.ResistEnergyBonus: chance = itemAttrs[attr]; break;
|
||||
default:
|
||||
chance = itemAttrs[attr] / 2; break;
|
||||
}
|
||||
|
||||
return chance;
|
||||
}
|
||||
|
||||
public static void BeginTarget( Mobile from, CraftSystem craftSystem, BaseTool tool )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,6 +27,17 @@ namespace Server.Engines.Craft
|
|||
return m_CraftSystem;
|
||||
}
|
||||
}
|
||||
|
||||
public override CraftECA ECA
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( Core.AOS )
|
||||
return CraftECA.ChanceMinusSixtyToFourtyFive;
|
||||
|
||||
return CraftECA.FiftyPercentChanceMinusTenPercent;
|
||||
}
|
||||
}
|
||||
|
||||
public override double GetChanceAtMin( CraftItem item )
|
||||
{
|
||||
|
|
@ -81,8 +92,6 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
}
|
||||
|
||||
public override CraftECA ECA{ get{ return CraftECA.FiftyPercentChanceMinusTenPercent; } }
|
||||
|
||||
public override void InitCraftList()
|
||||
{
|
||||
int index = -1;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ namespace Server.Engines.Craft
|
|||
return m_CraftSystem;
|
||||
}
|
||||
}
|
||||
|
||||
public override CraftECA ECA{ get{ return CraftECA.ChanceMinusSixtyToFourtyFive; } }
|
||||
|
||||
public override double GetChanceAtMin( CraftItem item )
|
||||
{
|
||||
|
|
@ -46,6 +48,14 @@ namespace Server.Engines.Craft
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override bool RetainsColorFrom( CraftItem item, Type type )
|
||||
{
|
||||
if ( item.ItemType.IsSubclassOf( typeof( BaseWeapon ) ) || item.ItemType.IsSubclassOf( typeof( BaseArmor ) ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PlayCraftEffect( Mobile from )
|
||||
{
|
||||
|
|
@ -88,15 +98,30 @@ namespace Server.Engines.Craft
|
|||
// Other Items
|
||||
if ( Core.Expansion == Expansion.AOS || Core.Expansion == Expansion.SE )
|
||||
{
|
||||
index = AddCraft( typeof( Board ), 1044294, 1027127, 0.0, 0.0, typeof( Log ), 1044466, 1, 1044465 );
|
||||
index = AddCraft( typeof( Board ), 1044294, 1027127, 0.0, 0.0, typeof( Log ), 1044466, 1, 1044465 );
|
||||
SetUseAllRes( index, true );
|
||||
}
|
||||
|
||||
AddCraft( typeof( BarrelStaves ), 1044294, 1027857, 00.0, 25.0, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddCraft( typeof( BarrelLid ), 1044294, 1027608, 11.0, 36.0, typeof( Log ), 1044041, 4, 1044351 );
|
||||
AddCraft( typeof( ShortMusicStand ), 1044294, 1044313, 78.9, 103.9, typeof( Log ), 1044041, 15, 1044351 );
|
||||
AddCraft( typeof( TallMusicStand ), 1044294, 1044315, 81.5, 106.5, typeof( Log ), 1044041, 20, 1044351 );
|
||||
AddCraft( typeof( Easle ), 1044294, 1044317, 86.8, 111.8, typeof( Log ), 1044041, 20, 1044351 );
|
||||
AddCraft( typeof( ShortMusicStand ), 1044294, 1044313, 78.9, 103.9, typeof( Log ), 1044041, 15, 1044351 ); //Left
|
||||
|
||||
index = AddCraft( typeof( ShortMusicStand ), 1044294, 1044314, 78.9, 103.9, typeof( Log ), 1044041, 15, 1044351, new object[] { 0xEB8 } ); //Right
|
||||
ForceGumpItemID( index, 0xEB8 );
|
||||
|
||||
AddCraft( typeof( TallMusicStand ), 1044294, 1044315, 81.5, 106.5, typeof( Log ), 1044041, 20, 1044351 ); //Left
|
||||
|
||||
index = AddCraft( typeof( TallMusicStand ), 1044294, 1044316, 81.5, 106.5, typeof( Log ), 1044041, 20, 1044351, new object[] { 0xEBC } ); //Right
|
||||
ForceGumpItemID( index, 0xEBC );
|
||||
|
||||
AddCraft( typeof( EasleWithCanvas ), 1044294, 1044317, 86.8, 111.8, typeof( Log ), 1044041, 20, 1044351 ); //South
|
||||
|
||||
index = AddCraft( typeof( EasleWithCanvas ), 1044294, 1044318, 86.8, 111.8, typeof( Log ), 1044041, 20, 1044351, new object[] { 0xF68 } ); //East
|
||||
ForceGumpItemID( index, 0xF68 );
|
||||
|
||||
index = AddCraft( typeof( EasleWithCanvas ), 1044294, 1044319, 86.8, 111.8, typeof( Log ), 1044041, 20, 1044351, new object[] { 0xF6A } ); //North
|
||||
ForceGumpItemID( index, 0xF6A );
|
||||
|
||||
if( Core.SE )
|
||||
{
|
||||
index = AddCraft( typeof( RedHangingLantern ), 1044294, 1029412, 65.0, 90.0, typeof( Log ), 1044041, 5, 1044351 );
|
||||
|
|
@ -120,12 +145,19 @@ namespace Server.Engines.Craft
|
|||
|
||||
if( Core.AOS ) //Duplicate Entries to preserve ordering depending on era
|
||||
{
|
||||
index = AddCraft( typeof( FishingPole ), 1044294, 1023519, 68.4, 93.4, typeof( Log ), 1044041, 5, 1044351 ); //This is in the categor of Other during AoS
|
||||
index = AddCraft( typeof( FishingPole ), 1044294, 1023519, 68.4, 93.4, typeof( Log ), 1044041, 5, 1044351 ); //This is in the category of Other during AoS
|
||||
AddSkill( index, SkillName.Tailoring, 40.0, 45.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 5, 1044287 );
|
||||
}
|
||||
|
||||
|
||||
if( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( ArcanistStatueSouthDeed ), 1044294, 1072885, 0.0, 35.0, typeof( Log ), 1044041, 250, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ArcanistStatueEastDeed ), 1044294, 1072886, 0.0, 35.0, typeof( Log ), 1044041, 250, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
}
|
||||
|
||||
// Furniture
|
||||
AddCraft( typeof( FootStool ), 1044291, 1022910, 11.0, 36.0, typeof( Log ), 1044041, 9, 1044351 );
|
||||
|
|
@ -150,6 +182,30 @@ namespace Server.Engines.Craft
|
|||
index = AddCraft( typeof( PlainLowTable ), 1044291, 1030266, 80.0, 105.0, typeof( Log ), 1044041, 35, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
}
|
||||
|
||||
if( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( OrnateElvenTableSouthDeed ), 1044291, 1072869, 85.0, 110.0, typeof( Log ), 1044041, 60, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( OrnateElvenTableEastDeed ), 1044291, 1073384, 85.0, 110.0, typeof( Log ), 1044041, 60, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( FancyElvenTableSouthDeed ), 1044291, 1073385, 80.0, 105.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( FancyElvenTableEastDeed ), 1044291, 1073386, 80.0, 105.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenBookStand ), 1044291, 1031741, 80.0, 105.0, typeof( Log ), 1044041, 20, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( BigElvenChair ), 1044291, 1031755, 85.0, 110.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenReadingChair ), 1044291, 1072160, 80.0, 105.0, typeof( Log ), 1044041, 30, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
}
|
||||
|
||||
// Containers
|
||||
AddCraft( typeof( WoodenBox ), 1044292, 1023709, 21.0, 46.0, typeof( Log ), 1044041, 10, 1044351 );
|
||||
|
|
@ -190,22 +246,44 @@ namespace Server.Engines.Craft
|
|||
index = AddCraft( typeof( ElegantArmoire ), 1044292, 1030330, 90.0, 115.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
|
||||
index = AddCraft( typeof( MapleArmoire ), 1044292, 1030328, 90.0, 115.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
index = AddCraft( typeof( MapleArmoire ), 1044292, 1030332, 90.0, 115.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
|
||||
index = AddCraft( typeof( CherryArmoire ), 1044292, 1030328, 90.0, 115.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
index = AddCraft( typeof( CherryArmoire ), 1044292, 1030334, 90.0, 115.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
}
|
||||
|
||||
index = AddCraft( typeof( Keg ), 1044292, 1023711, 57.8, 82.8, typeof( BarrelStaves ), 1044288, 3, 1044253 );
|
||||
AddRes( index, typeof( BarrelHoops ), 1044289, 1, 1044253 );
|
||||
AddRes( index, typeof( BarrelLid ), 1044251, 1, 1044253 );
|
||||
ForceNonExceptional( index );
|
||||
|
||||
if ( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( ElvenWashBasinSouthDeed ), 1044292, 1072865, 70.0, 95.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenWashBasinEastDeed ), 1044292, 1073387, 70.0, 95.0, typeof( Log ), 1044041, 40, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( OrnateElvenChest ), 1044292, 1031761, 80.0, 105.0, typeof( Log ), 1044041, 30, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( OrnateElvenBox ), 1044292, 1031763, 80.0, 105.0, typeof( Log ), 1044041, 25, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
}
|
||||
|
||||
// Staves and Shields
|
||||
AddCraft( typeof( ShepherdsCrook ), 1044295, 1023713, 78.9, 103.9, typeof( Log ), 1044041, 7, 1044351 );
|
||||
AddCraft( typeof( QuarterStaff ), 1044295, 1023721, 73.6, 98.6, typeof( Log ), 1044041, 6, 1044351 );
|
||||
AddCraft( typeof( GnarledStaff ), 1044295, 1025112, 78.9, 103.9, typeof( Log ), 1044041, 7, 1044351 );
|
||||
AddCraft( typeof( WoodenShield ), 1044295, 1027034, 52.6, 77.6, typeof( Log ), 1044041, 9, 1044351 );
|
||||
int group;
|
||||
if ( Core.ML )
|
||||
group = 1044566; // Armor and Weapons are seperated post ML
|
||||
else
|
||||
group = 1044295;
|
||||
|
||||
AddCraft( typeof( ShepherdsCrook ), group, 1023713, 78.9, 103.9, typeof( Log ), 1044041, 7, 1044351 );
|
||||
AddCraft( typeof( QuarterStaff ), group, 1023721, 73.6, 98.6, typeof( Log ), 1044041, 6, 1044351 );
|
||||
AddCraft( typeof( GnarledStaff ), group, 1025112, 78.9, 103.9, typeof( Log ), 1044041, 7, 1044351 );
|
||||
AddCraft( typeof( WoodenShield ), ( Core.ML ? 1062760 : 1044295 ), 1027034, 52.6, 77.6, typeof( Log ), 1044041, 9, 1044351 );
|
||||
|
||||
if( !Core.AOS ) //Duplicate Entries to preserve ordering depending on era
|
||||
{
|
||||
|
|
@ -216,17 +294,23 @@ namespace Server.Engines.Craft
|
|||
|
||||
if( Core.SE )
|
||||
{
|
||||
index = AddCraft( typeof( Bokuto ), 1044295, 1030227, 70.0, 95.0, typeof( Log ), 1044041, 6, 1044351 );
|
||||
index = AddCraft( typeof( Bokuto ), group, 1030227, 70.0, 95.0, typeof( Log ), 1044041, 6, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
|
||||
index = AddCraft( typeof( Fukiya ), 1044295, 1030229, 60.0, 85.0, typeof( Log ), 1044041, 6, 1044351 );
|
||||
index = AddCraft( typeof( Fukiya ), group, 1030229, 60.0, 85.0, typeof( Log ), 1044041, 6, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
|
||||
index = AddCraft( typeof( Tetsubo ), 1044295, 1030225, 85.0, 110.0, typeof( Log ), 1044041, 8, 1044351 );
|
||||
index = AddCraft( typeof( Tetsubo ), group, 1030225, 85.0, 110.0, typeof( Log ), 1044041, 8, 1044351 );
|
||||
AddSkill( index, SkillName.Tinkering, 40.0, 45.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 5, 1044037 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
}
|
||||
|
||||
if ( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( WildStaff ), 1044566, 1031557, 63.8, 144.6, typeof( Log ), 1044041, 16, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
}
|
||||
|
||||
// Instruments
|
||||
index = AddCraft( typeof( LapHarp ), 1044293, 1023762, 63.1, 88.1, typeof( Log ), 1044041, 20, 1044351 );
|
||||
|
|
@ -261,16 +345,61 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
|
||||
// Misc
|
||||
index = AddCraft( typeof( SmallBedSouthDeed ), 1044290, 1044321, 94.7, 113.1, typeof( Log ), 1044041, 100, 1044351 );
|
||||
if ( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( PlayerBBEast ), 1044290, 1062420, 85.0, 110.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
|
||||
index = AddCraft( typeof( PlayerBBSouth ), 1044290, 1062421, 85.0, 110.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
|
||||
index = AddCraft( typeof( ParrotPerchDeed ), 1044290, 1032214, 50.0, 85.0, typeof( Log ), 1044041, 100, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ArcaneCircleDeed ), 1044290, 1032411, 94.7, 119.6, typeof( Log ), 1044041, 100, 1044351 );
|
||||
AddRes( index, typeof( BlueDiamond ), 1032696, 2, 1044253 );
|
||||
AddRes( index, typeof( PerfectEmerald ), 1032692, 2, 1044253 );
|
||||
AddRes( index, typeof( FireRuby ), 1032695, 2, 1044253 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( TallElvenBedSouthDeed ), 1044290, 1072858, 94.7, 119.6, typeof( Log ), 1044041, 200, 1044351 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 100, 1044287 );
|
||||
AddRecipe( index, 116 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( TallElvenBedEastDeed ), 1044290, 1072859, 94.7, 119.6, typeof( Log ), 1044041, 200, 1044351 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 100, 1044287 );
|
||||
AddRecipe( index, 117 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenBedSouthDeed ), 1044290, 1072860, 94.7, 119.6, typeof( Log ), 1044041, 100, 1044351 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 100, 1044287 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenBedEastDeed ), 1044290, 1072861, 94.7, 119.6, typeof( Log ), 1044041, 100, 1044351 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 100, 1044287 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenLoveseatSouthDeed ), 1044290, 1072867, 80.0, 105.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenLoveseatEastDeed ), 1044290, 1073372, 80.0, 105.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( AlchemistTableSouthDeed ), 1044290, 1073396, 85.0, 110.0, typeof( Log ), 1044041, 70, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( AlchemistTableEastDeed ), 1044290, 1073397, 85.0, 110.0, typeof( Log ), 1044041, 70, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
}
|
||||
index = AddCraft( typeof( SmallBedSouthDeed ), 1044290, 1044321, 94.7, 119.6, typeof( Log ), 1044041, 100, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 75.0, 80.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 100, 1044287 );
|
||||
index = AddCraft( typeof( SmallBedEastDeed ), 1044290, 1044322, 94.7, 113.1, typeof( Log ), 1044041, 100, 1044351 );
|
||||
index = AddCraft( typeof( SmallBedEastDeed ), 1044290, 1044322, 94.7, 119.6, typeof( Log ), 1044041, 100, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 75.0, 80.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 100, 1044287 );
|
||||
index = AddCraft( typeof( LargeBedSouthDeed ), 1044290,1044323, 94.7, 113.1, typeof( Log ), 1044041, 150, 1044351 );
|
||||
index = AddCraft( typeof( LargeBedSouthDeed ), 1044290,1044323, 94.7, 119.6, typeof( Log ), 1044041, 150, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 75.0, 80.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 150, 1044287 );
|
||||
index = AddCraft( typeof( LargeBedEastDeed ), 1044290, 1044324, 94.7, 113.1, typeof( Log ), 1044041, 150, 1044351 );
|
||||
index = AddCraft( typeof( LargeBedEastDeed ), 1044290, 1044324, 94.7, 119.6, typeof( Log ), 1044041, 150, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 75.0, 80.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 150, 1044287 );
|
||||
AddCraft( typeof( DartBoardSouthDeed ), 1044290, 1044325, 15.7, 40.7, typeof( Log ), 1044041, 5, 1044351 );
|
||||
|
|
@ -283,47 +412,72 @@ namespace Server.Engines.Craft
|
|||
AddSkill( index, SkillName.Magery, 50.0, 55.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 40, 1044037 );
|
||||
|
||||
if ( Core.AOS )
|
||||
if ( Core.Expansion == Expansion.AOS || Core.Expansion == Expansion.SE ) //Duplicate Entries to preserve ordering depending on era
|
||||
{
|
||||
AddCraft( typeof( PlayerBBEast ), 1044290, 1062420, 85.0, 110.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
AddCraft( typeof( PlayerBBSouth ), 1044290, 1062421, 85.0, 110.0, typeof( Log ), 1044041, 50, 1044351 );
|
||||
}
|
||||
|
||||
// Blacksmithy
|
||||
index = AddCraft( typeof( SmallForgeDeed ), 1044296, 1044330, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 75, 1044037 );
|
||||
index = AddCraft( typeof( LargeForgeEastDeed ), 1044296, 1044331, 78.9, 103.9, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 80.0, 85.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 100, 1044037 );
|
||||
index = AddCraft( typeof( LargeForgeSouthDeed ), 1044296, 1044332, 78.9, 103.9, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 80.0, 85.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 100, 1044037 );
|
||||
index = AddCraft( typeof( AnvilEastDeed ), 1044296, 1044333, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 150, 1044037 );
|
||||
index = AddCraft( typeof( AnvilSouthDeed ), 1044296, 1044334, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 150, 1044037 );
|
||||
if ( !Core.ML ) //Duplicate Entries to preserve ordering depending on era
|
||||
{
|
||||
// Blacksmithy
|
||||
index = AddCraft( typeof( SmallForgeDeed ), 1044296, 1044330, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 75, 1044037 );
|
||||
index = AddCraft( typeof( LargeForgeEastDeed ), 1044296, 1044331, 78.9, 103.9, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 80.0, 85.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 100, 1044037 );
|
||||
index = AddCraft( typeof( LargeForgeSouthDeed ), 1044296, 1044332, 78.9, 103.9, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 80.0, 85.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 100, 1044037 );
|
||||
index = AddCraft( typeof( AnvilEastDeed ), 1044296, 1044333, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 150, 1044037 );
|
||||
index = AddCraft( typeof( AnvilSouthDeed ), 1044296, 1044334, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 150, 1044037 );
|
||||
|
||||
// Training
|
||||
index = AddCraft( typeof( TrainingDummyEastDeed ), 1044297, 1044335, 68.4, 93.4, typeof( Log ), 1044041, 55, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( TrainingDummySouthDeed ), 1044297, 1044336, 68.4, 93.4, typeof( Log ), 1044041, 55, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( PickpocketDipEastDeed ), 1044297, 1044337, 73.6, 98.6, typeof( Log ), 1044041, 65, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( PickpocketDipSouthDeed ), 1044297, 1044338, 73.6, 98.6, typeof( Log ), 1044041, 65, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
// Training
|
||||
index = AddCraft( typeof( TrainingDummyEastDeed ), 1044297, 1044335, 68.4, 93.4, typeof( Log ), 1044041, 55, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( TrainingDummySouthDeed ), 1044297, 1044336, 68.4, 93.4, typeof( Log ), 1044041, 55, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( PickpocketDipEastDeed ), 1044297, 1044337, 73.6, 98.6, typeof( Log ), 1044041, 65, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( PickpocketDipSouthDeed ), 1044297, 1044338, 73.6, 98.6, typeof( Log ), 1044041, 65, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
}
|
||||
|
||||
// Tailoring
|
||||
index = AddCraft( typeof( Dressform ), 1044298, 1044339, 63.1, 88.1, typeof( Log ), 1044041, 25, 1044351 );
|
||||
// Tailoring and Cooking
|
||||
index = AddCraft( typeof( Dressform ), 1044298, 1044339, 63.1, 88.1, typeof( Log ), 1044041, 25, 1044351 ); //Front
|
||||
AddSkill( index, SkillName.Tailoring, 65.0, 70.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 10, 1044287 );
|
||||
index = AddCraft( typeof( Dressform ), 1044298, 1044340, 63.1, 88.1, typeof( Log ), 1044041, 25, 1044351, new object[] { 0xEC7 } ); //Side
|
||||
AddSkill( index, SkillName.Tailoring, 65.0, 70.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 10, 1044287 );
|
||||
ForceGumpItemID( index, 0xEC7 );
|
||||
if ( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( ElvenSpinningwheelEastDeed ), 1044298, 1073393, 75.0, 100, typeof( Log ), 1044041, 60, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 65.0, 70.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 40, 1044287 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenSpinningwheelSouthDeed ), 1044298, 1072878, 75.0, 100, typeof( Log ), 1044041, 60, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 65.0, 70.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 40, 1044287 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenStoveSouthDeed ), 1044298, 1073394, 85.0, 110.0, typeof( Log ), 1044041, 80, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
|
||||
index = AddCraft( typeof( ElvenStoveEastDeed ), 1044298, 1073395, 85.0, 110.0, typeof( Log ), 1044041, 80, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
}
|
||||
index = AddCraft( typeof( SpinningwheelEastDeed ), 1044298, 1044341, 73.6, 98.6, typeof( Log ), 1044041, 75, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 65.0, 70.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 25, 1044287 );
|
||||
|
|
@ -337,36 +491,82 @@ namespace Server.Engines.Craft
|
|||
AddSkill( index, SkillName.Tailoring, 65.0, 70.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 25, 1044287 );
|
||||
|
||||
// Cooking
|
||||
index = AddCraft( typeof( StoneOvenEastDeed ), 1044299, 1044345, 68.4, 93.4, typeof( Log ), 1044041, 85, 1044351 );
|
||||
|
||||
//Cooking
|
||||
if ( Core.ML )
|
||||
group = 1044298; // These are merged into the Tailoring and Cooking definition after ML
|
||||
else
|
||||
group = 1044299;
|
||||
|
||||
index = AddCraft( typeof( StoneOvenEastDeed ), group, 1044345, 68.4, 93.4, typeof( Log ), 1044041, 85, 1044351 );
|
||||
AddSkill( index, SkillName.Tinkering, 50.0, 55.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 125, 1044037 );
|
||||
index = AddCraft( typeof( StoneOvenSouthDeed ), 1044299, 1044346, 68.4, 93.4, typeof( Log ), 1044041, 85, 1044351 );
|
||||
index = AddCraft( typeof( StoneOvenSouthDeed ), group, 1044346, 68.4, 93.4, typeof( Log ), 1044041, 85, 1044351 );
|
||||
AddSkill( index, SkillName.Tinkering, 50.0, 55.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 125, 1044037 );
|
||||
index = AddCraft( typeof( FlourMillEastDeed ), 1044299, 1044347, 94.7, 119.7, typeof( Log ), 1044041, 100, 1044351 );
|
||||
index = AddCraft( typeof( FlourMillEastDeed ), group, 1044347, 94.7, 119.7, typeof( Log ), 1044041, 100, 1044351 );
|
||||
AddSkill( index, SkillName.Tinkering, 50.0, 55.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 50, 1044037 );
|
||||
index = AddCraft( typeof( FlourMillSouthDeed ), 1044299, 1044348, 94.7, 119.7, typeof( Log ), 1044041, 100, 1044351 );
|
||||
index = AddCraft( typeof( FlourMillSouthDeed ), group, 1044348, 94.7, 119.7, typeof( Log ), 1044041, 100, 1044351 );
|
||||
AddSkill( index, SkillName.Tinkering, 50.0, 55.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 50, 1044037 );
|
||||
AddCraft( typeof( WaterTroughEastDeed ), 1044299, 1044349, 94.7, 119.7, typeof( Log ), 1044041, 150, 1044351 );
|
||||
AddCraft( typeof( WaterTroughSouthDeed ), 1044299, 1044350, 94.7, 119.7, typeof( Log ), 1044041, 150, 1044351 );
|
||||
AddCraft( typeof( WaterTroughEastDeed ), group, 1044349, 94.7, 119.7, typeof( Log ), 1044041, 150, 1044351 );
|
||||
AddCraft( typeof( WaterTroughSouthDeed ), group, 1044350, 94.7, 119.7, typeof( Log ), 1044041, 150, 1044351 );
|
||||
|
||||
if ( Core.ML ) //Duplicate Entries to preserve ordering depending on era
|
||||
{
|
||||
// Blacksmithy
|
||||
index = AddCraft( typeof( ElvenForgeDeed ), 1044296, 1031736, 94.7, 119.7, typeof( Log ), 1044041, 200, 1044351 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
index = AddCraft( typeof( SmallForgeDeed ), 1044296, 1044330, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 75, 1044037 );
|
||||
index = AddCraft( typeof( LargeForgeEastDeed ), 1044296, 1044331, 78.9, 103.9, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 80.0, 85.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 100, 1044037 );
|
||||
index = AddCraft( typeof( LargeForgeSouthDeed ), 1044296, 1044332, 78.9, 103.9, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 80.0, 85.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 100, 1044037 );
|
||||
index = AddCraft( typeof( AnvilEastDeed ), 1044296, 1044333, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 150, 1044037 );
|
||||
index = AddCraft( typeof( AnvilSouthDeed ), 1044296, 1044334, 73.6, 98.6, typeof( Log ), 1044041, 5, 1044351 );
|
||||
AddSkill( index, SkillName.Blacksmith, 75.0, 80.0 );
|
||||
AddRes( index, typeof( IronIngot ), 1044036, 150, 1044037 );
|
||||
|
||||
// Training
|
||||
index = AddCraft( typeof( TrainingDummyEastDeed ), 1044297, 1044335, 68.4, 93.4, typeof( Log ), 1044041, 55, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( TrainingDummySouthDeed ), 1044297, 1044336, 68.4, 93.4, typeof( Log ), 1044041, 55, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( PickpocketDipEastDeed ), 1044297, 1044337, 73.6, 98.6, typeof( Log ), 1044041, 65, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
index = AddCraft( typeof( PickpocketDipSouthDeed ), 1044297, 1044338, 73.6, 98.6, typeof( Log ), 1044041, 65, 1044351 );
|
||||
AddSkill( index, SkillName.Tailoring, 50.0, 55.0 );
|
||||
AddRes( index, typeof( Cloth ), 1044286, 60, 1044287 );
|
||||
}
|
||||
|
||||
MarkOption = true;
|
||||
Repair = Core.AOS;
|
||||
|
||||
SetSubRes( typeof( Log ), 1072643 );
|
||||
|
||||
// Add every material you want the player to be able to choose from
|
||||
// This will override the overridable material TODO: Verify the required skill amount
|
||||
AddSubRes( typeof( Log ), 1072643, 00.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( OakLog ), 1072644, 65.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( AshLog ), 1072645, 80.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( YewLog ), 1072646, 95.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( HeartwoodLog ), 1072647, 100.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( BloodwoodLog ), 1072648, 100.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( FrostwoodLog ), 1072649, 100.0, 1044041, 1072652 );
|
||||
CanEnhance = Core.ML;
|
||||
|
||||
if ( Core.ML )
|
||||
{
|
||||
SetSubRes( typeof( Log ), 1072643 );
|
||||
|
||||
// Add every material you want the player to be able to choose from
|
||||
// This will override the overridable material TODO: Verify the required skill amount
|
||||
AddSubRes( typeof( Log ), 1072643, 00.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( OakLog ), 1072644, 65.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( AshLog ), 1072645, 80.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( YewLog ), 1072646, 95.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( HeartwoodLog ), 1072647, 100.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( BloodwoodLog ), 1072648, 100.0, 1044041, 1072652 );
|
||||
AddSubRes( typeof( FrostwoodLog ), 1072649, 100.0, 1044041, 1072652 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -48,28 +48,21 @@ namespace Server.Engines.Craft
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static Type[] m_TailorColorables = new Type[]
|
||||
{
|
||||
typeof( GozaMatEastDeed ), typeof( GozaMatSouthDeed ),
|
||||
typeof( SquareGozaMatEastDeed ), typeof( SquareGozaMatSouthDeed ),
|
||||
typeof( BrocadeGozaMatEastDeed ), typeof( BrocadeGozaMatSouthDeed ),
|
||||
typeof( BrocadeSquareGozaMatEastDeed ), typeof( BrocadeSquareGozaMatSouthDeed )
|
||||
};
|
||||
|
||||
|
||||
public override bool RetainsColorFrom( CraftItem item, Type type )
|
||||
{
|
||||
if ( type != typeof( Cloth ) && type != typeof( UncutCloth ) )
|
||||
if ( item.ItemType == typeof( OilCloth ) )
|
||||
return false;
|
||||
|
||||
type = item.ItemType;
|
||||
|
||||
bool contains = false;
|
||||
|
||||
for ( int i = 0; !contains && i < m_TailorColorables.Length; ++i )
|
||||
contains = ( m_TailorColorables[i] == type );
|
||||
|
||||
return contains;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool UsesHueSelector( CraftItem item, Type type )
|
||||
{
|
||||
if ( item.ItemType == typeof( UncutCloth ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlayCraftEffect( Mobile from )
|
||||
|
|
@ -105,6 +98,14 @@ namespace Server.Engines.Craft
|
|||
public override void InitCraftList()
|
||||
{
|
||||
int index = -1;
|
||||
|
||||
#region Materials
|
||||
index = AddCraft( typeof( UncutCloth ), 1044457, 1044458, 0.0, 0.0, typeof( BoltOfCloth ), 1044453, 1, 1044253 );
|
||||
MultiplyBy( index, 50 );
|
||||
SetUseAllRes( index, true, 1044460 ); // Cut bolts of cloth into pieces of ready cloth.
|
||||
index = AddCraft( typeof( UncutCloth ), 1044457, 1044459, 0.0, 0.0, typeof( Cloth ), 1044455, 1, 1044253 );
|
||||
SetUseAllRes( index, true, 1044461 ); // Combine available cloth into piles by color.
|
||||
#endregion
|
||||
|
||||
#region Hats
|
||||
AddCraft( typeof( SkullCap ), 1011375, 1025444, 0.0, 25.0, typeof( Cloth ), 1044286, 2, 1044287 );
|
||||
|
|
|
|||
|
|
@ -34,6 +34,17 @@ namespace Server.Engines.Craft
|
|||
private DefTinkering() : base( 1, 1, 1.25 )// base( 1, 1, 3.0 )
|
||||
{
|
||||
}
|
||||
|
||||
public override CraftECA ECA
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( Core.AOS )
|
||||
return CraftECA.ChanceMinusSixtyToFourtyFive;
|
||||
|
||||
return CraftECA.ChanceMinusSixty;
|
||||
}
|
||||
}
|
||||
|
||||
public override double GetChanceAtMin( CraftItem item )
|
||||
{
|
||||
|
|
@ -225,7 +236,7 @@ namespace Server.Engines.Craft
|
|||
AddCraft( typeof( Key ), 1044050, 1024112, 20.0, 70.0, typeof( IronIngot ), 1044036, 3, 1044037 );
|
||||
AddCraft( typeof( Globe ), 1044050, 1024167, 55.0, 105.0, typeof( IronIngot ), 1044036, 4, 1044037 );
|
||||
AddCraft( typeof( Spyglass ), 1044050, 1025365, 60.0, 110.0, typeof( IronIngot ), 1044036, 4, 1044037 );
|
||||
AddCraft( typeof( Lantern ), 1044050, 1022597, 30.0, 80.0, typeof( IronIngot ), 1044036, 2, 1044037 );
|
||||
AddCraft( typeof( Lantern ), 1044050, 1022597, 30.0, 80.0, typeof( IronIngot ), 1044036, 4, 1044037 );
|
||||
AddCraft( typeof( HeatingStand ), 1044050, 1026217, 60.0, 110.0, typeof( IronIngot ), 1044036, 4, 1044037 );
|
||||
|
||||
if ( Core.SE )
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ namespace Server.Engines.Plants
|
|||
|
||||
m_PlantStatus = PlantStatus.BowlOfDirt;
|
||||
m_PlantSystem = new PlantSystem( this, fertileDirt );
|
||||
m_Level = SecureLevel.CoOwners;
|
||||
m_Level = SecureLevel.Owner;
|
||||
|
||||
m_Instances.Add( this );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new AbbatoirDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AbbatoirAddon()
|
||||
public AbbatoirAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AbbatoirAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x120E ), -1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x120F ), 0, -1, 0 );
|
||||
|
|
@ -19,6 +24,7 @@ namespace Server.Items
|
|||
AddComponent( new AddonComponent( 0x1214 ), -1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1213 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1212 ), 1, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public AbbatoirAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -42,7 +48,7 @@ namespace Server.Items
|
|||
|
||||
public class AbbatoirDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AbbatoirAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new AbbatoirAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044329; } } // abbatoir
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new AlchemistTableEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AlchemistTableEastAddon()
|
||||
public AlchemistTableEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AlchemistTableEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2DD3 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public AlchemistTableEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -32,9 +39,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DD3 )]
|
||||
public class AlchemistTableEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AlchemistTableEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new AlchemistTableEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073397; } } // alchemist table (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new AlchemistTableSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AlchemistTableSouthAddon()
|
||||
public AlchemistTableSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AlchemistTableSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2DD4 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public AlchemistTableSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -32,9 +39,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DD4 )]
|
||||
public class AlchemistTableSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AlchemistTableSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new AlchemistTableSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073396; } } // alchemist table (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new AnvilEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AnvilEastAddon()
|
||||
public AnvilEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AnvilEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AnvilComponent( 0xFAF ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public AnvilEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,7 +40,7 @@ namespace Server.Items
|
|||
|
||||
public class AnvilEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AnvilEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new AnvilEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044333; } } // anvil (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new AnvilSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AnvilSouthAddon()
|
||||
public AnvilSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AnvilSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AnvilComponent( 0xFB0 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public AnvilSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,7 +40,7 @@ namespace Server.Items
|
|||
|
||||
public class AnvilSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AnvilSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new AnvilSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044334; } } // anvil (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ArcaneBookshelfEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ArcaneBookshelfEastAddon()
|
||||
public ArcaneBookshelfEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcaneBookshelfEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3084 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3085 ), -1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ArcaneBookshelfEastAddon( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ArcaneBookshelfSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ArcaneBookshelfSouthAddon()
|
||||
public ArcaneBookshelfSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcaneBookshelfSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3087 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3086 ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ArcaneBookshelfSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class ArcaneBookshelfSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ArcaneBookshelfSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ArcaneBookshelfSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072871; } } // arcane bookshelf (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ArcaneCircleDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ArcaneCircleAddon()
|
||||
public ArcaneCircleAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcaneCircleAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3080 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3082 ), 0, -1, 0 );
|
||||
|
|
@ -19,6 +24,7 @@ namespace Server.Items
|
|||
AddComponent( new AddonComponent( 0x307C ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x307B ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3083 ), 1, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ArcaneCircleAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -42,7 +48,7 @@ namespace Server.Items
|
|||
|
||||
public class ArcaneCircleDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ArcaneCircleAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ArcaneCircleAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072703; } } // arcane circle
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ArcanistStatueEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ArcanistStatueEastAddon()
|
||||
public ArcanistStatueEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcanistStatueEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2D0E ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ArcanistStatueEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -32,9 +39,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2D0E )]
|
||||
public class ArcanistStatueEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ArcanistStatueEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ArcanistStatueEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072886; } } // arcanist statue (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ArcanistStatueSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ArcanistStatueSouthAddon()
|
||||
public ArcanistStatueSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcanistStatueSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2D0F ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ArcanistStatueSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -32,9 +39,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2D0F )]
|
||||
public class ArcanistStatueSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ArcanistStatueSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ArcanistStatueSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072885; } } // arcanist statue (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -336,9 +336,14 @@ namespace Server.Items
|
|||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new BallotBoxDeed(); } }
|
||||
|
||||
public BallotBoxAddon()
|
||||
public BallotBoxAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BallotBoxAddon( int hue )
|
||||
{
|
||||
AddComponent( new BallotBox(), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public BallotBoxAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -362,7 +367,7 @@ namespace Server.Items
|
|||
|
||||
public class BallotBoxDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new BallotBoxAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new BallotBoxAddon( Hue ); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044327; } } // ballot box
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Server.Items
|
|||
m_Components = new List<AddonComponent>();
|
||||
}
|
||||
|
||||
public virtual bool RetainDeedHue{ get{ return false; } }
|
||||
public virtual bool RetainDeedHue{ get{ return ( Core.ML ? true : false ); } }
|
||||
|
||||
public virtual void OnChop( Mobile from )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ using System.Collections.Generic;
|
|||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Targeting;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x14F0, 0x14EF )]
|
||||
public abstract class BaseAddonDeed : Item
|
||||
public abstract class BaseAddonDeed : Item, ICraftable
|
||||
{
|
||||
public abstract BaseAddon Addon{ get; }
|
||||
|
||||
|
|
@ -47,6 +48,29 @@ namespace Server.Items
|
|||
else
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
|
||||
#region ICraftable Members
|
||||
public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
Type resourceType = typeRes;
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
|
||||
|
||||
CraftResource resource = CraftResources.GetFromType( resourceType );
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( context != null && context.DoNotColor )
|
||||
Hue = 0;
|
||||
else if ( resource == CraftResource.None )
|
||||
Hue = resHue;
|
||||
else
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
|
|
|
|||
|
|
@ -104,9 +104,14 @@ namespace Server.Items
|
|||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new DartBoardEastDeed(); } }
|
||||
|
||||
public DartBoardEastAddon()
|
||||
public DartBoardEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public DartBoardEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new DartBoard( true ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public DartBoardEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -130,7 +135,7 @@ namespace Server.Items
|
|||
|
||||
public class DartBoardEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new DartBoardEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new DartBoardEastAddon( Hue ); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044326; } } // dartboard (east)
|
||||
|
||||
|
|
@ -162,9 +167,14 @@ namespace Server.Items
|
|||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new DartBoardSouthDeed(); } }
|
||||
|
||||
public DartBoardSouthAddon()
|
||||
public DartBoardSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public DartBoardSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new DartBoard( false ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public DartBoardSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -188,7 +198,7 @@ namespace Server.Items
|
|||
|
||||
public class DartBoardSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new DartBoardSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new DartBoardSouthAddon( Hue ); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044325; } } // dartboard (south)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenBedEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenBedEastAddon()
|
||||
public ElvenBedEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenBedEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x304D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x304C ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenBedEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class ElvenBedEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenBedEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenBedEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072861; } } // elven bed (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenBedSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenBedSouthAddon()
|
||||
public ElvenBedSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenBedSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3050 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3051 ), 0, -1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenBedSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class ElvenBedSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenBedSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenBedSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072860; } } // elven bed (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenDresserEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenDresserEastAddon()
|
||||
public ElvenDresserEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenDresserEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x30E4 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x30E3 ), 0, -1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenDresserEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class ElvenDresserEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenDresserEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenDresserEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073388; } } // elven dresser (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenDresserSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenDresserSouthAddon()
|
||||
public ElvenDresserSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenDresserSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x30E5 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x30E6 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenDresserSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class ElvenDresserSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenDresserSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenDresserSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072864; } } // elven dresser (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,11 +9,18 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenForgeDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenForgeAddon()
|
||||
public ElvenForgeAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenForgeAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2DD8 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
|
||||
public ElvenForgeAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
|
@ -32,9 +40,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DD8 )]
|
||||
public class ElvenForgeDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenForgeAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenForgeAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072875; } } // squirrel statue (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,10 +9,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenLoveseatEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenLoveseatEastAddon()
|
||||
public ElvenLoveseatEastAddon() : this( 0 )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3089 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3088 ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenLoveseatEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x308A ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x308B ), 0, -1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenLoveseatEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -33,9 +40,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DE0 )]
|
||||
public class ElvenLoveseatEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenLoveseatEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenLoveseatEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073372; } } // elven loveseat (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,10 +9,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenLoveseatSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenLoveseatSouthAddon()
|
||||
public ElvenLoveseatSouthAddon() : this( 0 )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x308A ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x308B ), 0, -1, 0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenLoveseatSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3089 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3088 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenLoveseatSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -33,9 +40,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DDF )]
|
||||
public class ElvenLoveseatSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenLoveseatSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenLoveseatSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072867; } } // elven loveseat (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenSpinningwheelEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenSpinningwheelEastAddon()
|
||||
public ElvenSpinningwheelEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenSpinningwheelEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2DD9 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenSpinningwheelEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -106,9 +113,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DD9 )]
|
||||
public class ElvenSpinningwheelEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenSpinningwheelEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenSpinningwheelEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073393; } } // elven spinning wheel (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenSpinningwheelSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenSpinningwheelSouthAddon()
|
||||
public ElvenSpinningwheelSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenSpinningwheelSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2DDA ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenSpinningwheelSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -108,9 +115,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DDA )]
|
||||
public class ElvenSpinningwheelSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenSpinningwheelSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenSpinningwheelSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072878; } } // spinning wheel (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenStoveEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenStoveEastAddon()
|
||||
public ElvenStoveEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenStoveEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2DDB ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenStoveEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -32,9 +39,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DDB )]
|
||||
public class ElvenStoveEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenStoveEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenStoveEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073395; } } // elven oven (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenStoveSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenStoveSouthAddon()
|
||||
public ElvenStoveSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenStoveSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2DDC ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenStoveSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -32,9 +39,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DDC )]
|
||||
public class ElvenStoveSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenStoveSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenStoveSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073394; } } // elven oven (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,10 +9,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenWashBasinEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenWashBasinEastAddon()
|
||||
public ElvenWashBasinEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenWashBasinEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x30DF ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x30E0 ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenWashBasinEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -33,9 +40,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2D0C )]
|
||||
public class ElvenWashBasinEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenWashBasinEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenWashBasinEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073387; } } // elven wash basin (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,10 +9,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ElvenWashBasinSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenWashBasinSouthAddon()
|
||||
public ElvenWashBasinSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenWashBasinSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x30E1 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x30E2 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ElvenWashBasinSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -33,9 +40,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2D0B )]
|
||||
public class ElvenWashBasinSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ElvenWashBasinSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ElvenWashBasinSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072865; } } // elven wash basin (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,11 +9,17 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new FancyElvenTableEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public FancyElvenTableEastAddon()
|
||||
public FancyElvenTableEastAddon() : this( 0 )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3094 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3093 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3092 ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FancyElvenTableEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3095 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3096 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3097 ), 0, -1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public FancyElvenTableEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,9 +41,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DE8 )]
|
||||
public class FancyElvenTableEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new FancyElvenTableEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new FancyElvenTableEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073386; } } // hardwood table (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,11 +9,17 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new FancyElvenTableSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public FancyElvenTableSouthAddon()
|
||||
public FancyElvenTableSouthAddon() : this( 0 )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3095 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3096 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3097 ), 0, -1, 0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FancyElvenTableSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3094 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3093 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3092 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public FancyElvenTableSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,9 +41,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DE7 )]
|
||||
public class FancyElvenTableSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new FancyElvenTableSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new FancyElvenTableSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073385; } } // hardwood table (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -160,11 +160,17 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructable]
|
||||
public FlourMillEastAddon()
|
||||
public FlourMillEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FlourMillEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1920 ),-1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1922 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1924 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public FlourMillEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -201,7 +207,7 @@ namespace Server.Items
|
|||
|
||||
public class FlourMillEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new FlourMillEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new FlourMillEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044347; } } // flour mill (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -146,11 +146,17 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructable]
|
||||
public FlourMillSouthAddon()
|
||||
public FlourMillSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FlourMillSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x192C ), 0,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x192E ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1930 ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public FlourMillSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -187,7 +193,7 @@ namespace Server.Items
|
|||
|
||||
public class FlourMillSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new FlourMillSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new FlourMillSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044348; } } // flour mill (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,12 +8,18 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new LargeBedEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeBedEastAddon()
|
||||
public LargeBedEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LargeBedEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA7D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA7C ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xA79 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA78 ), 1, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LargeBedEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -37,7 +43,7 @@ namespace Server.Items
|
|||
|
||||
public class LargeBedEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeBedEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new LargeBedEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044324; } } // large bed (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,12 +8,18 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new LargeBedSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeBedSouthAddon()
|
||||
public LargeBedSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LargeBedSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA83 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA7F ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xA82 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA7E ), 1, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LargeBedSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -37,7 +43,7 @@ namespace Server.Items
|
|||
|
||||
public class LargeBedSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeBedSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new LargeBedSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044323; } } // large bed (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,12 +8,18 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new LargeForgeEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeEastAddon()
|
||||
public LargeForgeEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new ForgeComponent( 0x1986 ), 0, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x198A ), 0, 1, 0 );
|
||||
AddComponent( new ForgeComponent( 0x1996 ), 0, 2, 0 );
|
||||
AddComponent( new ForgeComponent( 0x1992 ), 0, 3, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LargeForgeEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -37,7 +43,7 @@ namespace Server.Items
|
|||
|
||||
public class LargeForgeEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeForgeEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new LargeForgeEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044331; } } // large forge (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,12 +8,18 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new LargeForgeSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeSouthAddon()
|
||||
public LargeForgeSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new ForgeComponent( 0x197A ), 0, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x197E ), 1, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x19A2 ), 2, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x199E ), 3, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LargeForgeSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -37,7 +43,7 @@ namespace Server.Items
|
|||
|
||||
public class LargeForgeSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeForgeSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new LargeForgeSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044332; } } // large forge (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -17,10 +17,16 @@ namespace Server.Items
|
|||
public int Phase{ get{ return m_Phase; } set{ m_Phase = value; } }
|
||||
|
||||
[Constructable]
|
||||
public LoomEastAddon()
|
||||
public LoomEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LoomEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1060 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x105F ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LoomEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -55,7 +61,7 @@ namespace Server.Items
|
|||
|
||||
public class LoomEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LoomEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new LoomEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044343; } } // loom (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -12,10 +12,16 @@ namespace Server.Items
|
|||
public int Phase{ get{ return m_Phase; } set{ m_Phase = value; } }
|
||||
|
||||
[Constructable]
|
||||
public LoomSouthAddon()
|
||||
public LoomSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LoomSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1061 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1062 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LoomSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -50,7 +56,7 @@ namespace Server.Items
|
|||
|
||||
public class LoomSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LoomSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new LoomSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044344; } } // loom (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,11 +9,17 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new OrnateElvenTableEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public OrnateElvenTableEastAddon()
|
||||
public OrnateElvenTableEastAddon() : this( 0 )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x308E ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x308D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x308C ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OrnateElvenTableEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x308F ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3090 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3091 ), 0, -1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public OrnateElvenTableEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,9 +41,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DE2 )]
|
||||
public class OrnateElvenTableEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new OrnateElvenTableEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new OrnateElvenTableEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073384; } } // ornate table (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,11 +9,17 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new OrnateElvenTableSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public OrnateElvenTableSouthAddon()
|
||||
public OrnateElvenTableSouthAddon() : this( 0 )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x308F ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3090 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3091 ), 0, -1, 0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OrnateElvenTableSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x308E ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x308D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x308C ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public OrnateElvenTableSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,9 +41,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2DE1 )]
|
||||
public class OrnateElvenTableSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new OrnateElvenTableSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new OrnateElvenTableSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072869; } } // ornate table (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -8,9 +9,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new ParrotPerchDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ParrotPerchAddon()
|
||||
public ParrotPerchAddon() : this( 0 )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2FF4 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ParrotPerchAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2FB6 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public ParrotPerchAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -32,9 +39,10 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[CraftItemID( 0x2FB6 )]
|
||||
public class ParrotPerchDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ParrotPerchAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new ParrotPerchAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072617; } } // parrot perch
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new PentagramDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PentagramAddon()
|
||||
public PentagramAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PentagramAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xFE7 ), -1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFE8 ), 0, -1, 0 );
|
||||
|
|
@ -19,6 +24,7 @@ namespace Server.Items
|
|||
AddComponent( new AddonComponent( 0xFE9 ), -1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFEC ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFED ), 1, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public PentagramAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -42,7 +48,7 @@ namespace Server.Items
|
|||
|
||||
public class PentagramDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PentagramAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new PentagramAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044328; } } // pentagram
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -161,9 +161,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new PickpocketDipEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipEastAddon()
|
||||
public PickpocketDipEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new PickpocketDip( 0x1EC3 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public PickpocketDipEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -187,7 +193,7 @@ namespace Server.Items
|
|||
|
||||
public class PickpocketDipEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PickpocketDipEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new PickpocketDipEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044337; } } // pickpocket dip (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
@ -219,9 +225,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new PickpocketDipSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipSouthAddon()
|
||||
public PickpocketDipSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new PickpocketDip( 0x1EC0 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public PickpocketDipSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -245,7 +257,7 @@ namespace Server.Items
|
|||
|
||||
public class PickpocketDipSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PickpocketDipSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new PickpocketDipSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044338; } } // pickpocket dip (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new SmallBedEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallBedEastAddon()
|
||||
public SmallBedEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SmallBedEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA5D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA62 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public SmallBedEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class SmallBedEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallBedEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new SmallBedEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044322; } } // small bed (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new SmallBedSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallBedSouthAddon()
|
||||
public SmallBedSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SmallBedSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA63 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA5C ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public SmallBedSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class SmallBedSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallBedSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new SmallBedSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044321; } } // small bed (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new SmallForgeDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallForgeAddon()
|
||||
public SmallForgeAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SmallForgeAddon( int hue )
|
||||
{
|
||||
AddComponent( new ForgeComponent( 0xFB1 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public SmallForgeAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,7 +40,7 @@ namespace Server.Items
|
|||
|
||||
public class SmallForgeDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallForgeAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new SmallForgeAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044330; } } // small forge
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -16,9 +16,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new SpinningwheelEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelEastAddon()
|
||||
public SpinningwheelEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1019 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public SpinningwheelEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -118,7 +124,7 @@ namespace Server.Items
|
|||
|
||||
public class SpinningwheelEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SpinningwheelEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new SpinningwheelEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044341; } } // spining wheel (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new SpinningwheelSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelSouthAddon()
|
||||
public SpinningwheelSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1015 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public SpinningwheelSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -110,7 +116,7 @@ namespace Server.Items
|
|||
|
||||
public class SpinningwheelSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SpinningwheelSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new SpinningwheelSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044342; } } // spining wheel (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new SquirrelStatueEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SquirrelStatueEastAddon()
|
||||
public SquirrelStatueEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SquirrelStatueEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2D10 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public SquirrelStatueEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,7 +40,7 @@ namespace Server.Items
|
|||
|
||||
public class SquirrelStatueEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SquirrelStatueEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new SquirrelStatueEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1073398; } } // squirrel statue (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new SquirrelStatueSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SquirrelStatueSouthAddon()
|
||||
public SquirrelStatueSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SquirrelStatueSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2D11 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public SquirrelStatueSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,7 +40,7 @@ namespace Server.Items
|
|||
|
||||
public class SquirrelStatueSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SquirrelStatueSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new SquirrelStatueSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072884; } } // squirrel statue (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new StoneOvenEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenEastAddon()
|
||||
public StoneOvenEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x92C ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x92B ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public StoneOvenEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class StoneOvenEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new StoneOvenEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new StoneOvenEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044345; } } // stone oven (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new StoneOvenSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenSouthAddon()
|
||||
public StoneOvenSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x931 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x930 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public StoneOvenSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -35,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public class StoneOvenSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new StoneOvenSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new StoneOvenSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044346; } } // stone oven (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,12 +8,18 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new TallElvenBedEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public TallElvenBedEastAddon()
|
||||
public TallElvenBedEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TallElvenBedEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3054 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3053 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3055 ), 2, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3052 ), 2, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public TallElvenBedEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -37,7 +43,7 @@ namespace Server.Items
|
|||
|
||||
public class TallElvenBedEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new TallElvenBedEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new TallElvenBedEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072859; } } // tall elven bed (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,12 +8,18 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new TallElvenBedSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public TallElvenBedSouthAddon()
|
||||
public TallElvenBedSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TallElvenBedSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3058 ), 0, 0, 0 ); // angolo alto sx
|
||||
AddComponent( new AddonComponent( 0x3057 ), -1, 1, 0 ); // angolo basso sx
|
||||
AddComponent( new AddonComponent( 0x3059 ), 0, -1, 0 ); // angolo alto dx
|
||||
AddComponent( new AddonComponent( 0x3056 ), 0, 1, 0 ); // angolo basso dx
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public TallElvenBedSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -37,7 +43,7 @@ namespace Server.Items
|
|||
|
||||
public class TallElvenBedSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new TallElvenBedSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new TallElvenBedSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072858; } } // tall elven bed (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -171,9 +171,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new TrainingDummyEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummyEastAddon()
|
||||
public TrainingDummyEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummyEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new TrainingDummy( 0x1074 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public TrainingDummyEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -197,7 +203,7 @@ namespace Server.Items
|
|||
|
||||
public class TrainingDummyEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new TrainingDummyEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new TrainingDummyEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044335; } } // training dummy (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
@ -229,9 +235,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new TrainingDummySouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummySouthAddon()
|
||||
public TrainingDummySouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummySouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new TrainingDummy( 0x1070 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public TrainingDummySouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -255,7 +267,7 @@ namespace Server.Items
|
|||
|
||||
public class TrainingDummySouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new TrainingDummySouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new TrainingDummySouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044336; } } // training dummy (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new WarriorStatueEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public WarriorStatueEastAddon()
|
||||
public WarriorStatueEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WarriorStatueEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2D12 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public WarriorStatueEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,7 +40,7 @@ namespace Server.Items
|
|||
|
||||
public class WarriorStatueEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new WarriorStatueEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new WarriorStatueEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072888; } } // warrior statue (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new WarriorStatueSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public WarriorStatueSouthAddon()
|
||||
public WarriorStatueSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WarriorStatueSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x2D13 ), 0, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public WarriorStatueSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -34,7 +40,7 @@ namespace Server.Items
|
|||
|
||||
public class WarriorStatueSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new WarriorStatueSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new WarriorStatueSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1072887; } } // warrior statue (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new WaterTroughEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughEastAddon()
|
||||
public WaterTroughEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xB41 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xB42 ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public WaterTroughEastAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -41,7 +47,7 @@ namespace Server.Items
|
|||
|
||||
public class WaterTroughEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new WaterTroughEastAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new WaterTroughEastAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044349; } } // water trough (east)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ namespace Server.Items
|
|||
public override BaseAddonDeed Deed{ get{ return new WaterTroughSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughSouthAddon()
|
||||
public WaterTroughSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xB43 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xB44 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public WaterTroughSouthAddon( Serial serial ) : base( serial )
|
||||
|
|
@ -41,7 +47,7 @@ namespace Server.Items
|
|||
|
||||
public class WaterTroughSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new WaterTroughSouthAddon(); } }
|
||||
public override BaseAddon Addon{ get{ return new WaterTroughSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044350; } } // water trough (south)
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using ABT = Server.Items.ArmorBodyType;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseArmor : Item, IScissorable, IFactionItem, ICraftable, IWearableDurability
|
||||
public abstract class BaseArmor : Item, IScissorable, IFactionItem, ICraftable, IWearableDurability, IAosAttributes
|
||||
{
|
||||
#region Factions
|
||||
private FactionItem m_FactionState;
|
||||
|
|
@ -61,6 +61,9 @@ namespace Server.Items
|
|||
private AosAttributes m_AosAttributes;
|
||||
private AosArmorAttributes m_AosArmorAttributes;
|
||||
private AosSkillBonuses m_AosSkillBonuses;
|
||||
|
||||
private BonusAttribute[] m_BonusRandomAttributes;
|
||||
private double m_OriginalWeight;
|
||||
|
||||
// Overridable values. These values are provided to override the defaults which get defined in the individual armor scripts.
|
||||
private int m_ArmorBase = -1;
|
||||
|
|
@ -98,6 +101,9 @@ namespace Server.Items
|
|||
public virtual int OldIntReq{ get{ return 0; } }
|
||||
|
||||
public virtual bool CanFortify{ get{ return true; } }
|
||||
|
||||
public virtual bool MageArmorOnExceptional{ get{ return false; } }
|
||||
public virtual bool UsesShieldAttrs{ get{ return false; } }
|
||||
|
||||
public override void OnAfterDuped( Item newItem )
|
||||
{
|
||||
|
|
@ -109,8 +115,11 @@ namespace Server.Items
|
|||
armor.m_AosAttributes = new AosAttributes( newItem, m_AosAttributes );
|
||||
armor.m_AosArmorAttributes = new AosArmorAttributes( newItem, m_AosArmorAttributes );
|
||||
armor.m_AosSkillBonuses = new AosSkillBonuses( newItem, m_AosSkillBonuses );
|
||||
armor.m_BonusRandomAttributes = m_BonusRandomAttributes;
|
||||
}
|
||||
|
||||
#region Getters & Setters
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public AMA MeditationAllowance
|
||||
{
|
||||
|
|
@ -246,18 +255,37 @@ namespace Server.Items
|
|||
{
|
||||
if ( m_Resource != value )
|
||||
{
|
||||
UnscaleDurability();
|
||||
if ( !Core.AOS )
|
||||
UnscaleDurability();
|
||||
|
||||
if ( Core.AOS && !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
BonusAttributesHelper.RemoveAttrsFrom( this, GetResourceBonusAttrs() );
|
||||
BonusAttributesHelper.RemoveAttrsFrom( this, RandomAttributes );
|
||||
RandomAttributes = null;
|
||||
}
|
||||
|
||||
m_Resource = value;
|
||||
Hue = CraftResources.GetHue( m_Resource );
|
||||
|
||||
|
||||
if ( Core.AOS && !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
// Enhance sets RandomAttributes so check if it's null/empty first before getting new random attributes.
|
||||
if ( RandomAttributes == null || RandomAttributes.Length == 0 )
|
||||
RandomAttributes = BonusAttributesHelper.GetRandomAttributes( GetResourceRandomAttrs(), GetResourceAttrs().RandomAttributeCount );
|
||||
|
||||
BonusAttributesHelper.ApplyAttributesTo( this, GetResourceBonusAttrs() );
|
||||
BonusAttributesHelper.ApplyAttributesTo( this, RandomAttributes );
|
||||
}
|
||||
|
||||
Invalidate();
|
||||
InvalidateProperties();
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).UpdateResistances();
|
||||
|
||||
ScaleDurability();
|
||||
if ( !Core.AOS )
|
||||
ScaleDurability();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -375,6 +403,14 @@ namespace Server.Items
|
|||
get{ return m_AosSkillBonuses; }
|
||||
set{}
|
||||
}
|
||||
|
||||
public BonusAttribute[] RandomAttributes
|
||||
{
|
||||
get { return m_BonusRandomAttributes; }
|
||||
set { m_BonusRandomAttributes = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public int ComputeStatReq( StatType type )
|
||||
{
|
||||
|
|
@ -421,11 +457,11 @@ namespace Server.Items
|
|||
public virtual int BasePoisonResistance{ get{ return 0; } }
|
||||
public virtual int BaseEnergyResistance{ get{ return 0; } }
|
||||
|
||||
public override int PhysicalResistance{ get{ return BasePhysicalResistance + GetProtOffset() + GetResourceAttrs().ArmorPhysicalResist + m_PhysicalBonus; } }
|
||||
public override int FireResistance{ get{ return BaseFireResistance + GetProtOffset() + GetResourceAttrs().ArmorFireResist + m_FireBonus; } }
|
||||
public override int ColdResistance{ get{ return BaseColdResistance + GetProtOffset() + GetResourceAttrs().ArmorColdResist + m_ColdBonus; } }
|
||||
public override int PoisonResistance{ get{ return BasePoisonResistance + GetProtOffset() + GetResourceAttrs().ArmorPoisonResist + m_PoisonBonus; } }
|
||||
public override int EnergyResistance{ get{ return BaseEnergyResistance + GetProtOffset() + GetResourceAttrs().ArmorEnergyResist + m_EnergyBonus; } }
|
||||
public override int PhysicalResistance{ get{ return BasePhysicalResistance + GetProtOffset() + m_PhysicalBonus; } }
|
||||
public override int FireResistance{ get{ return BaseFireResistance + GetProtOffset() + m_FireBonus; } }
|
||||
public override int ColdResistance{ get{ return BaseColdResistance + GetProtOffset() + m_ColdBonus; } }
|
||||
public override int PoisonResistance{ get{ return BasePoisonResistance + GetProtOffset() + m_PoisonBonus; } }
|
||||
public override int EnergyResistance{ get{ return BaseEnergyResistance + GetProtOffset() + m_EnergyBonus; } }
|
||||
|
||||
public virtual int InitMinHits{ get{ return 0; } }
|
||||
public virtual int InitMaxHits{ get{ return 0; } }
|
||||
|
|
@ -481,6 +517,26 @@ namespace Server.Items
|
|||
|
||||
return info.AttributeInfo;
|
||||
}
|
||||
|
||||
public BonusAttribute[] GetResourceBonusAttrs()
|
||||
{
|
||||
CraftAttributeInfo attrInfo = GetResourceAttrs();
|
||||
|
||||
if ( UsesShieldAttrs )
|
||||
return attrInfo.ShieldAttributes;
|
||||
|
||||
return attrInfo.ArmorAttributes;
|
||||
}
|
||||
|
||||
public BonusAttribute[] GetResourceRandomAttrs()
|
||||
{
|
||||
CraftAttributeInfo attrInfo = GetResourceAttrs();
|
||||
|
||||
if ( UsesShieldAttrs )
|
||||
return attrInfo.ShieldRandomAttributes;
|
||||
|
||||
return attrInfo.ArmorRandomAttributes;
|
||||
}
|
||||
|
||||
public int GetProtOffset()
|
||||
{
|
||||
|
|
@ -494,6 +550,25 @@ namespace Server.Items
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ModifyWeight()
|
||||
{
|
||||
double v = 0;
|
||||
|
||||
v = 100 - GetWeightBonus();
|
||||
|
||||
Weight = m_OriginalWeight * (v / 100);
|
||||
}
|
||||
|
||||
public int GetWeightBonus()
|
||||
{
|
||||
int v = Attributes.LowerWeight;
|
||||
|
||||
if ( v > 100 )
|
||||
v = 100;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
public void UnscaleDurability()
|
||||
{
|
||||
|
|
@ -532,15 +607,6 @@ namespace Server.Items
|
|||
if ( Core.AOS )
|
||||
{
|
||||
bonus += m_AosArmorAttributes.DurabilityBonus;
|
||||
|
||||
CraftResourceInfo resInfo = CraftResources.GetInfo( m_Resource );
|
||||
CraftAttributeInfo attrInfo = null;
|
||||
|
||||
if ( resInfo != null )
|
||||
attrInfo = resInfo.AttributeInfo;
|
||||
|
||||
if ( attrInfo != null )
|
||||
bonus += attrInfo.ArmorDurability;
|
||||
}
|
||||
|
||||
return bonus;
|
||||
|
|
@ -647,16 +713,6 @@ namespace Server.Items
|
|||
|
||||
int v = m_AosArmorAttributes.LowerStatReq;
|
||||
|
||||
CraftResourceInfo info = CraftResources.GetInfo( m_Resource );
|
||||
|
||||
if ( info != null )
|
||||
{
|
||||
CraftAttributeInfo attrInfo = info.AttributeInfo;
|
||||
|
||||
if ( attrInfo != null )
|
||||
v += attrInfo.ArmorLowerRequirements;
|
||||
}
|
||||
|
||||
if ( v > 100 )
|
||||
v = 100;
|
||||
|
||||
|
|
@ -735,14 +791,16 @@ namespace Server.Items
|
|||
IntReq = 0x00200000,
|
||||
MedAllowance = 0x00400000,
|
||||
SkillBonuses = 0x00800000,
|
||||
PlayerConstructed = 0x01000000
|
||||
PlayerConstructed = 0x01000000,
|
||||
BonusAttributes = 0x02000000,
|
||||
OriginalWeight = 0x04000000
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 7 ); // version
|
||||
writer.Write( (int) 8 ); // version
|
||||
|
||||
SaveFlag flags = SaveFlag.None;
|
||||
|
||||
|
|
@ -771,7 +829,9 @@ namespace Server.Items
|
|||
SetSaveFlag( ref flags, SaveFlag.MedAllowance, m_Meditate != (AMA)(-1) );
|
||||
SetSaveFlag( ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty );
|
||||
SetSaveFlag( ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed != false );
|
||||
|
||||
SetSaveFlag( ref flags, SaveFlag.BonusAttributes, m_BonusRandomAttributes != null && m_BonusRandomAttributes.Length > 0 );
|
||||
SetSaveFlag( ref flags, SaveFlag.OriginalWeight, m_OriginalWeight != 0 );
|
||||
|
||||
writer.WriteEncodedInt( (int) flags );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
|
||||
|
|
@ -842,6 +902,16 @@ namespace Server.Items
|
|||
|
||||
if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
|
||||
m_AosSkillBonuses.Serialize( writer );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.BonusAttributes ) )
|
||||
{
|
||||
writer.Write( (int)m_BonusRandomAttributes.Length );
|
||||
for ( int i = 0; i < m_BonusRandomAttributes.Length; i++ )
|
||||
m_BonusRandomAttributes[i].Serialize( writer );
|
||||
}
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.OriginalWeight ) )
|
||||
writer.Write( (double)m_OriginalWeight );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -852,6 +922,7 @@ namespace Server.Items
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 8:
|
||||
case 7:
|
||||
case 6:
|
||||
case 5:
|
||||
|
|
@ -972,6 +1043,17 @@ namespace Server.Items
|
|||
|
||||
if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
|
||||
m_PlayerConstructed = true;
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.BonusAttributes ) )
|
||||
{
|
||||
m_BonusRandomAttributes = new BonusAttribute[reader.ReadInt()];
|
||||
|
||||
for( int i = 0; i < m_BonusRandomAttributes.Length; i++ )
|
||||
m_BonusRandomAttributes[i] = new BonusAttribute( reader );
|
||||
}
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.OriginalWeight ) )
|
||||
m_OriginalWeight = reader.ReadDouble();
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -1129,6 +1211,18 @@ namespace Server.Items
|
|||
|
||||
if ( version < 7 )
|
||||
m_PlayerConstructed = true; // we don't know, so, assume it's crafted
|
||||
|
||||
if ( version < 8 )
|
||||
{
|
||||
int hits = m_HitPoints;
|
||||
int maxHits = m_MaxHitPoints;
|
||||
|
||||
m_OriginalWeight = Weight;
|
||||
BonusAttributesHelper.ApplyAttributesTo( this, GetResourceBonusAttrs() );
|
||||
|
||||
m_HitPoints = hits;
|
||||
m_MaxHitPoints = maxHits;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
|
@ -1149,6 +1243,8 @@ namespace Server.Items
|
|||
m_AosAttributes = new AosAttributes( this );
|
||||
m_AosArmorAttributes = new AosArmorAttributes( this );
|
||||
m_AosSkillBonuses = new AosSkillBonuses( this );
|
||||
|
||||
m_OriginalWeight = Weight;
|
||||
}
|
||||
|
||||
public override bool AllowSecureTrade( Mobile from, Mobile to, Mobile newOwner, bool accepted )
|
||||
|
|
@ -1386,7 +1482,7 @@ namespace Server.Items
|
|||
default: oreType = 0; break;
|
||||
}
|
||||
|
||||
if ( m_Quality == ArmorQuality.Exceptional )
|
||||
if ( m_Quality == ArmorQuality.Exceptional && !( m_Resource >= CraftResource.RegularWood && m_Resource <= CraftResource.Frostwood ) )
|
||||
{
|
||||
if ( oreType != 0 )
|
||||
list.Add( 1053100, "#{0}\t{1}", oreType, GetNameString() ); // exceptional ~1_oretype~ ~2_armortype~
|
||||
|
|
@ -1411,28 +1507,16 @@ namespace Server.Items
|
|||
|
||||
return ( m_AosAttributes.SpellChanneling != 0 );
|
||||
}
|
||||
|
||||
public virtual int GetLuckBonus()
|
||||
{
|
||||
CraftResourceInfo resInfo = CraftResources.GetInfo( m_Resource );
|
||||
|
||||
if ( resInfo == null )
|
||||
return 0;
|
||||
|
||||
CraftAttributeInfo attrInfo = resInfo.AttributeInfo;
|
||||
|
||||
if ( attrInfo == null )
|
||||
return 0;
|
||||
|
||||
return attrInfo.ArmorLuck;
|
||||
}
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Crafter != null )
|
||||
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
||||
if ( m_Quality == ArmorQuality.Exceptional && ( m_Resource >= CraftResource.RegularWood && m_Resource <= CraftResource.Frostwood ) )
|
||||
list.Add( 1060636 ); // exceptional
|
||||
|
||||
#region Factions
|
||||
if ( m_FactionState != null )
|
||||
|
|
@ -1485,7 +1569,7 @@ namespace Server.Items
|
|||
if ( (prop = GetLowerStatReq()) != 0 )
|
||||
list.Add( 1060435, prop.ToString() ); // lower requirements ~1_val~%
|
||||
|
||||
if ( (prop = (GetLuckBonus() + m_AosAttributes.Luck)) != 0 )
|
||||
if ( (prop = m_AosAttributes.Luck) != 0 )
|
||||
list.Add( 1060436, prop.ToString() ); // luck ~1_val~
|
||||
|
||||
if ( (prop = m_AosArmorAttributes.MageArmor) != 0 )
|
||||
|
|
@ -1599,23 +1683,15 @@ namespace Server.Items
|
|||
if ( makersMark )
|
||||
Crafter = from;
|
||||
|
||||
Type resourceType = typeRes;
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType( resourceType );
|
||||
PlayerConstructed = true;
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( context != null && context.DoNotColor )
|
||||
Hue = 0;
|
||||
|
||||
if( Quality == ArmorQuality.Exceptional )
|
||||
{
|
||||
DistributeBonuses( (tool is BaseRunicTool ? 6 : Core.SE ? 15 : 14) ); // Not sure since when, but right now 15 points are added, not 14.
|
||||
if ( !(this is BaseShield) )
|
||||
DistributeBonuses( (tool is BaseRunicTool ? 6 : Core.SE ? 15 : 14) ); // Not sure since when, but right now 15 points are added, not 14.
|
||||
|
||||
if ( Core.SE )
|
||||
if ( MageArmorOnExceptional )
|
||||
ArmorAttributes[AosArmorAttribute.MageArmor] = 1;
|
||||
|
||||
if( Core.ML && !(this is BaseShield) )
|
||||
{
|
||||
int bonus = (int)(from.Skills.ArmsLore.Value / 20);
|
||||
|
|
@ -1638,7 +1714,26 @@ namespace Server.Items
|
|||
|
||||
if ( Core.AOS && tool is BaseRunicTool )
|
||||
((BaseRunicTool)tool).ApplyAttributesTo( this );
|
||||
|
||||
Type resourceType = typeRes;
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType( resourceType );
|
||||
|
||||
PlayerConstructed = true;
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( context != null )
|
||||
{
|
||||
if ( context.DoNotColor )
|
||||
Hue = 0;
|
||||
else if ( context.CompareHueTo != null )
|
||||
Hue = context.CompareHueTo.Hue;
|
||||
}
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 55; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 4; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 55; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 4; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 85; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 3; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 80; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 3; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 65; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 4; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 75; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 3; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 50; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 4; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 80; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 3; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ namespace Server.Items
|
|||
public override int OldStrReq{ get{ return 55; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 4; } }
|
||||
|
||||
public override bool MageArmorOnExceptional{ get{ return true; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Server.Items
|
|||
int MaxArcaneCharges{ get; set; }
|
||||
}
|
||||
|
||||
public abstract class BaseClothing : Item, IDyable, IScissorable, IFactionItem, ICraftable, IWearableDurability
|
||||
public abstract class BaseClothing : Item, IDyable, IScissorable, IFactionItem, ICraftable, IWearableDurability, IAosAttributes
|
||||
{
|
||||
#region Factions
|
||||
private FactionItem m_FactionState;
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ namespace Server.Items
|
|||
{
|
||||
[Furniture]
|
||||
[Flipable( 0xB2D, 0xB2C )]
|
||||
public class WoodenBench : Item
|
||||
public class WoodenBench : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public WoodenBench() : base( 0xB2D )
|
||||
public WoodenBench() : base( 0xB2C )
|
||||
{
|
||||
Weight = 6;
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public WoodenBench(Serial serial) : base(serial)
|
||||
|
|
@ -27,7 +27,10 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6 )
|
||||
Weight = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,10 +4,10 @@ namespace Server.Items
|
|||
{
|
||||
[Furniture]
|
||||
[Flipable( 0xB4F, 0xB4E, 0xB50, 0xB51 )]
|
||||
public class FancyWoodenChairCushion : Item
|
||||
public class FancyWoodenChairCushion : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public FancyWoodenChairCushion() : base(0xB4F)
|
||||
public FancyWoodenChairCushion() : base(0xB4E)
|
||||
{
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 20.0;
|
||||
|
|
@ -36,10 +36,10 @@ namespace Server.Items
|
|||
|
||||
[Furniture]
|
||||
[Flipable( 0xB53, 0xB52, 0xB54, 0xB55 )]
|
||||
public class WoodenChairCushion : Item
|
||||
public class WoodenChairCushion : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public WoodenChairCushion() : base(0xB53)
|
||||
public WoodenChairCushion() : base(0xB52)
|
||||
{
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 20.0;
|
||||
|
|
@ -68,10 +68,10 @@ namespace Server.Items
|
|||
|
||||
[Furniture]
|
||||
[Flipable( 0xB57, 0xB56, 0xB59, 0xB58 )]
|
||||
public class WoodenChair : Item
|
||||
public class WoodenChair : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public WoodenChair() : base(0xB57)
|
||||
public WoodenChair() : base(0xB56)
|
||||
{
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 20.0;
|
||||
|
|
@ -100,10 +100,10 @@ namespace Server.Items
|
|||
|
||||
[Furniture]
|
||||
[Flipable( 0xB5B, 0xB5A, 0xB5C, 0xB5D )]
|
||||
public class BambooChair : Item
|
||||
public class BambooChair : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public BambooChair() : base(0xB5B)
|
||||
public BambooChair() : base(0xB5A)
|
||||
{
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 20.0;
|
||||
|
|
@ -132,8 +132,9 @@ namespace Server.Items
|
|||
|
||||
[DynamicFliping]
|
||||
[Flipable(0x1218, 0x1219, 0x121A, 0x121B)]
|
||||
public class StoneChair : Item
|
||||
public class StoneChair : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
[Constructable]
|
||||
public StoneChair() : base(0x1218)
|
||||
{
|
||||
|
|
@ -155,13 +156,13 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
[DynamicFliping]
|
||||
[Furniture]
|
||||
[Flipable( 0x2DE3, 0x2DE4, 0x2DE5, 0x2DE6 )]
|
||||
public class OrnateElvenChair : Item
|
||||
public class OrnateElvenChair : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public OrnateElvenChair() : base( 0x2DE3 )
|
||||
|
|
@ -184,16 +185,16 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadEncodedInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
[DynamicFliping]
|
||||
[Furniture]
|
||||
[Flipable( 0x2DEB, 0x2DEC, 0x2DED, 0x2DEE )]
|
||||
public class BigElvenChair : Item
|
||||
public class BigElvenChair : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public BigElvenChair() : base( 0x2DEB )
|
||||
public BigElvenChair() : base( 0x2DED )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -212,13 +213,13 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadEncodedInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
[DynamicFliping]
|
||||
[Furniture]
|
||||
[Flipable( 0x2DF5, 0x2DF6 )]
|
||||
public class ElvenReadingChair : Item
|
||||
public class ElvenReadingChair : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public ElvenReadingChair() : base( 0x2DF5 )
|
||||
|
|
@ -240,7 +241,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadEncodedInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ using System;
|
|||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
public class Stool : Item
|
||||
public class Stool : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public Stool() : base( 0xA2A )
|
||||
|
|
@ -26,7 +26,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 10.0;
|
||||
|
|
@ -34,12 +34,12 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Furniture]
|
||||
public class FootStool : Item
|
||||
public class FootStool : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public FootStool() : base( 0xB5E )
|
||||
{
|
||||
Weight = 6.0;
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
||||
public FootStool(Serial serial) : base(serial)
|
||||
|
|
@ -57,7 +57,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 10.0;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace Server.Items
|
|||
{
|
||||
[Furniture]
|
||||
[Flipable(0xB32, 0xB33)]
|
||||
public class Throne : Item
|
||||
public class Throne : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public Throne() : base(0xB33)
|
||||
|
|
@ -27,7 +27,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 1.0;
|
||||
|
|
@ -36,10 +36,10 @@ namespace Server.Items
|
|||
|
||||
[Furniture]
|
||||
[Flipable( 0xB2E, 0xB2F, 0xB31, 0xB30 )]
|
||||
public class WoodenThrone : Item
|
||||
public class WoodenThrone : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public WoodenThrone() : base(0xB2E)
|
||||
public WoodenThrone() : base(0xB2F)
|
||||
{
|
||||
Weight = 15.0;
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 15.0;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@ using System;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BarrelLid : Item
|
||||
public class BarrelLid : BaseCraftableItem
|
||||
{
|
||||
public override bool DisplaysResource{ get{ return false; } }
|
||||
public override bool DisplaysMakersMark{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public BarrelLid() : base(0x1DB8)
|
||||
{
|
||||
|
|
@ -25,13 +28,16 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4)]
|
||||
public class BarrelStaves : Item
|
||||
public class BarrelStaves : BaseCraftableItem
|
||||
{
|
||||
public override bool DisplaysResource{ get{ return false; } }
|
||||
public override bool DisplaysMakersMark{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public BarrelStaves() : base(0x1EB1)
|
||||
{
|
||||
|
|
@ -53,7 +59,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
33
Scripts/Items/Construction/Misc/BookStand.cs
Normal file
33
Scripts/Items/Construction/Misc/BookStand.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
[Flipable( false, 0x2DDD, 0x2DDE )]
|
||||
public class ElvenBookStand : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public ElvenBookStand() : base( 0x2DDD )
|
||||
{
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
||||
public ElvenBookStand(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int) 0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt(); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,13 +3,18 @@ using System;
|
|||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
[Flipable(0xF65, 0xF67, 0xF69)]
|
||||
public class Easle : Item
|
||||
[Flipable( false, 0xF65, 0xF67, 0xF69 )]
|
||||
public class Easle : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public Easle() : base(0xF65)
|
||||
public Easle() : base( 0xF65 )
|
||||
{
|
||||
Weight = 25.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Easle( int itemID ) : base( itemID )
|
||||
{
|
||||
Weight = 24.0;
|
||||
}
|
||||
|
||||
public Easle(Serial serial) : base(serial)
|
||||
|
|
@ -27,10 +32,44 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 10.0 )
|
||||
Weight = 25.0;
|
||||
if ( Weight == 10.0 || Weight == 25.0 )
|
||||
Weight = 24.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( false, 0xF66, 0xF68, 0xF6A )]
|
||||
public class EasleWithCanvas : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public EasleWithCanvas() : base( 0xF66 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EasleWithCanvas( int itemID ) : base( itemID )
|
||||
{
|
||||
Weight = 24.0;
|
||||
}
|
||||
|
||||
public EasleWithCanvas(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int) 0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,11 +3,18 @@ using System;
|
|||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
[Flipable(0xEBB, 0xEBC)]
|
||||
public class TallMusicStand : Item
|
||||
[Flipable( false, 0xEBB, 0xEBC )]
|
||||
public class TallMusicStand : BaseCraftableItem
|
||||
{
|
||||
public override bool DisplaysResource{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public TallMusicStand() : base(0xEBB)
|
||||
public TallMusicStand() : this( 0xEBB )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TallMusicStand( int itemID ) : base( itemID )
|
||||
{
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
|
@ -27,7 +34,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 8.0 )
|
||||
Weight = 10.0;
|
||||
|
|
@ -35,11 +42,18 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable(0xEB6,0xEB8)]
|
||||
public class ShortMusicStand : Item
|
||||
[Flipable( false, 0xEB6,0xEB8 )]
|
||||
public class ShortMusicStand : BaseCraftableItem
|
||||
{
|
||||
public override bool DisplaysResource{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public ShortMusicStand() : base(0xEB6)
|
||||
public ShortMusicStand() : this( 0xEB6 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ShortMusicStand( int itemID ) : base( itemID )
|
||||
{
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
|
@ -59,7 +73,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 10.0;
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ namespace Server.Items
|
|||
{
|
||||
[Furniture]
|
||||
[Flipable( 0x24D0, 0x24D1, 0x24D2, 0x24D3, 0x24D4 )]
|
||||
public class BambooScreen : Item
|
||||
public class BambooScreen : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public BambooScreen() : base(0x24D0)
|
||||
public BambooScreen() : base( 0x24D1 )
|
||||
{
|
||||
Weight = 20.0;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public BambooScreen(Serial serial) : base(serial)
|
||||
|
|
@ -27,19 +27,21 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 20.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x24CB, 0x24CC, 0x24CD, 0x24CE, 0x24CF )]
|
||||
public class ShojiScreen : Item
|
||||
public class ShojiScreen : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public ShojiScreen() : base(0x24CB)
|
||||
public ShojiScreen() : base( 0x24CB )
|
||||
{
|
||||
Weight = 20.0;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public ShojiScreen(Serial serial) : base(serial)
|
||||
|
|
@ -57,8 +59,10 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 20.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ using System;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StatueSouth : Item
|
||||
{
|
||||
public class StatueSouth : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public StatueSouth() : base(0x139A)
|
||||
{
|
||||
|
|
@ -27,12 +29,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatueSouth2 : Item
|
||||
{
|
||||
public class StatueSouth2 : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public StatueSouth2() : base(0x1227)
|
||||
{
|
||||
|
|
@ -56,11 +60,11 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatueNorth : Item
|
||||
public class StatueNorth : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public StatueNorth() : base(0x139B)
|
||||
|
|
@ -85,11 +89,11 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatueWest : Item
|
||||
public class StatueWest : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public StatueWest() : base(0x1226)
|
||||
|
|
@ -114,11 +118,11 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatueEast : Item
|
||||
public class StatueEast : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public StatueEast() : base(0x139C)
|
||||
|
|
@ -143,12 +147,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatueEast2 : Item
|
||||
{
|
||||
public class StatueEast2 : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public StatueEast2() : base(0x1224)
|
||||
{
|
||||
|
|
@ -172,12 +178,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatueSouthEast : Item
|
||||
{
|
||||
public class StatueSouthEast : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public StatueSouthEast() : base(0x1225)
|
||||
{
|
||||
|
|
@ -201,12 +209,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class BustSouth : Item
|
||||
{
|
||||
public class BustSouth : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public BustSouth() : base(0x12CB)
|
||||
{
|
||||
|
|
@ -230,12 +240,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class BustEast : Item
|
||||
{
|
||||
public class BustEast : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public BustEast() : base(0x12CA)
|
||||
{
|
||||
|
|
@ -259,12 +271,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatuePegasus : Item
|
||||
public class StatuePegasus : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public StatuePegasus() : base(0x139D)
|
||||
{
|
||||
|
|
@ -288,12 +302,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class StatuePegasus2 : Item
|
||||
public class StatuePegasus2 : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public StatuePegasus2() : base(0x1228)
|
||||
{
|
||||
|
|
@ -317,12 +333,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class SmallTowerSculpture : Item
|
||||
public class SmallTowerSculpture : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public SmallTowerSculpture() : base(0x241A)
|
||||
{
|
||||
|
|
@ -344,7 +362,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,10 @@ using System;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Vase : Item
|
||||
public class Vase : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public Vase() : base( 0xB46 )
|
||||
{
|
||||
|
|
@ -25,12 +27,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class LargeVase : Item
|
||||
public class LargeVase : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public LargeVase() : base( 0xB45 )
|
||||
{
|
||||
|
|
@ -52,12 +56,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
public class SmallUrn : Item
|
||||
public class SmallUrn : BaseCraftableItem
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public SmallUrn() : base( 0x241C )
|
||||
{
|
||||
|
|
@ -79,7 +85,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ namespace Server.Items
|
|||
{
|
||||
|
||||
[Furniture]
|
||||
public class ElegantLowTable : Item
|
||||
public class ElegantLowTable : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public ElegantLowTable() : base(0x2819)
|
||||
|
|
@ -27,13 +27,12 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
public class PlainLowTable : Item
|
||||
public class PlainLowTable : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public PlainLowTable() : base(0x281A)
|
||||
|
|
@ -56,17 +55,16 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable(0xB90,0xB7D)]
|
||||
public class LargeTable : Item
|
||||
public class LargeTable : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public LargeTable() : base(0xB90)
|
||||
public LargeTable() : base(0xB7D)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -86,7 +84,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 4.0 )
|
||||
Weight = 1.0;
|
||||
|
|
@ -95,10 +93,10 @@ namespace Server.Items
|
|||
|
||||
[Furniture]
|
||||
[Flipable(0xB35,0xB34)]
|
||||
public class Nightstand : Item
|
||||
public class Nightstand : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public Nightstand() : base(0xB35)
|
||||
public Nightstand() : base(0xB34)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -118,7 +116,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 4.0 )
|
||||
Weight = 1.0;
|
||||
|
|
@ -127,10 +125,10 @@ namespace Server.Items
|
|||
|
||||
[Furniture]
|
||||
[Flipable(0xB8F,0xB7C)]
|
||||
public class YewWoodTable : Item
|
||||
public class YewWoodTable : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public YewWoodTable() : base(0xB8F)
|
||||
public YewWoodTable() : base(0xB7C)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -150,7 +148,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 4.0 )
|
||||
Weight = 1.0;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace Server.Items
|
|||
{
|
||||
[Furniture]
|
||||
[Flipable(0xB4A,0xB49, 0xB4B, 0xB4C)]
|
||||
public class WritingTable : Item
|
||||
public class WritingTable : BaseCraftableItem
|
||||
{
|
||||
[Constructable]
|
||||
public WritingTable() : base(0xB4A)
|
||||
|
|
@ -27,7 +27,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsItem ? OldVersion : reader.ReadInt() ); //Required for BaseCraftableItem insertion
|
||||
|
||||
if ( Weight == 4.0 )
|
||||
Weight = 1.0;
|
||||
|
|
|
|||
|
|
@ -139,7 +139,250 @@ namespace Server.Items
|
|||
public BaseContainer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
#region Consume[...]
|
||||
public int ConsumeTotalGroupedCompared( Type[][] types, int[] amounts, bool recurse, OnItemConsumed callback, CheckItemGroup grouper, Item compareTo )
|
||||
{
|
||||
if ( types.Length != amounts.Length )
|
||||
throw new ArgumentException();
|
||||
else if ( grouper == null )
|
||||
throw new ArgumentNullException();
|
||||
|
||||
Item[][][] items = new Item[types.Length][][];
|
||||
int[] totals = new int[types.Length];
|
||||
|
||||
bool hasComparer = false;
|
||||
|
||||
Item originalComparer = compareTo;
|
||||
|
||||
int comparerType = -1;
|
||||
|
||||
for ( int i = 0; i < types.Length; ++i )
|
||||
{
|
||||
Item[] typedItems = FindItemsByType( types[i], recurse );
|
||||
|
||||
List<List<Item>> groups = new List<List<Item>>();
|
||||
|
||||
int idx = 0;
|
||||
|
||||
if ( originalComparer != null )
|
||||
{
|
||||
for ( int j = 0; j < types[i].Length; ++j )
|
||||
{
|
||||
if ( originalComparer.GetType() == types[i][j] )
|
||||
{
|
||||
hasComparer = true;
|
||||
compareTo = originalComparer;
|
||||
comparerType = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while( idx < typedItems.Length )
|
||||
{
|
||||
Item a = typedItems[idx++];
|
||||
List<Item> group = new List<Item>();
|
||||
|
||||
if ( !hasComparer )
|
||||
{
|
||||
compareTo = a;
|
||||
group.Add( a );
|
||||
}
|
||||
else if ( grouper( compareTo, a ) == 0 )
|
||||
group.Add( a );
|
||||
|
||||
while( idx < typedItems.Length )
|
||||
{
|
||||
Item b = typedItems[idx];
|
||||
int v = grouper( compareTo, b );
|
||||
|
||||
if( v == 0 )
|
||||
group.Add( b );
|
||||
else
|
||||
break;
|
||||
|
||||
++idx;
|
||||
}
|
||||
|
||||
groups.Add( group );
|
||||
}
|
||||
|
||||
compareTo = originalComparer;
|
||||
hasComparer = false;
|
||||
|
||||
items[i] = new Item[groups.Count][];
|
||||
|
||||
bool hasEnough = false;
|
||||
|
||||
for ( int j = 0; j < groups.Count; ++j )
|
||||
{
|
||||
items[i][j] = groups[j].ToArray();
|
||||
|
||||
for ( int k = 0; k < items[i][j].Length; ++k )
|
||||
totals[i] += items[i][j][k].Amount;
|
||||
}
|
||||
|
||||
if ( totals[i] >= amounts[i] )
|
||||
hasEnough = true;
|
||||
|
||||
if ( !hasEnough )
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
for ( int i = 0; i < items.Length; ++i )
|
||||
{
|
||||
int need = amounts[i];
|
||||
|
||||
if ( originalComparer != null && comparerType == i )
|
||||
{
|
||||
object parent = originalComparer.RootParent;
|
||||
|
||||
if ( parent is Mobile )
|
||||
{
|
||||
Mobile m = (Mobile)parent;
|
||||
|
||||
if ( this.RootParent is Mobile && m == (Mobile)this.RootParent )
|
||||
ConsumeNeeded( ref need, originalComparer, callback );
|
||||
}
|
||||
}
|
||||
|
||||
for ( int j = 0; j < items[i].Length && need > 0; ++j )
|
||||
{
|
||||
if ( totals[i] >= amounts[i] )
|
||||
{
|
||||
for ( int k = 0; k < items[i][j].Length && need > 0; ++k )
|
||||
{
|
||||
Item item = items[i][j][k];
|
||||
|
||||
if ( !item.Deleted )
|
||||
ConsumeNeeded( ref need, item, callback );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
private void ConsumeNeeded( ref int need, Item item, OnItemConsumed callback )
|
||||
{
|
||||
int theirAmount = item.Amount;
|
||||
|
||||
if ( theirAmount < need )
|
||||
{
|
||||
if ( callback != null )
|
||||
callback( item, theirAmount );
|
||||
|
||||
item.Delete();
|
||||
need -= theirAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( callback != null )
|
||||
callback( item, need );
|
||||
|
||||
item.Consume( need );
|
||||
need = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get[Compared]Amount
|
||||
public int GetComparedGroupAmount( Type[] types, bool recurse, CheckItemGroup grouper, Item compareTo )
|
||||
{
|
||||
if( grouper == null )
|
||||
throw new ArgumentNullException();
|
||||
|
||||
Item[] typedItems = FindItemsByType( types, recurse );
|
||||
|
||||
bool hasComparer = false;
|
||||
|
||||
if ( compareTo != null )
|
||||
{
|
||||
for ( int i = 0; i < types.Length; ++i )
|
||||
{
|
||||
if ( compareTo.GetType() == types[i] )
|
||||
{
|
||||
hasComparer = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<List<Item>> groups = new List<List<Item>>();
|
||||
|
||||
int idx = 0;
|
||||
|
||||
while( idx < typedItems.Length )
|
||||
{
|
||||
Item a = typedItems[idx++];
|
||||
List<Item> group = new List<Item>();
|
||||
|
||||
if ( !hasComparer )
|
||||
{
|
||||
compareTo = a;
|
||||
group.Add( a );
|
||||
}
|
||||
else if ( grouper( compareTo, a ) == 0 )
|
||||
group.Add( a );
|
||||
|
||||
while( idx < typedItems.Length )
|
||||
{
|
||||
Item b = typedItems[idx];
|
||||
int v = grouper( compareTo, b );
|
||||
|
||||
if( v == 0 )
|
||||
group.Add( b );
|
||||
else
|
||||
break;
|
||||
|
||||
++idx;
|
||||
}
|
||||
|
||||
groups.Add( group );
|
||||
}
|
||||
|
||||
int total = 0;
|
||||
|
||||
for( int j = 0; j < groups.Count; ++j )
|
||||
{
|
||||
Item[] items = groups[j].ToArray();
|
||||
|
||||
for( int k = 0; k < items.Length; ++k )
|
||||
total += items[k].Amount;
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
public int GetAmountCompared( Type[] types, CheckItemGroup grouper, Item compareTo )
|
||||
{
|
||||
return GetAmountCompared( types, grouper, compareTo, true );
|
||||
}
|
||||
|
||||
public int GetAmountCompared( Type[] types, CheckItemGroup grouper, Item compareTo, bool recurse )
|
||||
{
|
||||
Item[] items = FindItemsByType( types, recurse );
|
||||
|
||||
int amount = 0;
|
||||
|
||||
for ( int i = 0; i < items.Length; ++i )
|
||||
{
|
||||
if ( compareTo == null )
|
||||
{
|
||||
compareTo = items[i];
|
||||
amount += items[i].Amount;
|
||||
}
|
||||
else if ( grouper( compareTo, items[i] ) == 0 )
|
||||
amount += items[i].Amount;
|
||||
}
|
||||
|
||||
return amount;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/* Note: base class insertion; we cannot serialize anything here */
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
|
|
@ -474,7 +717,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public class Barrel : BaseContainer
|
||||
public class Barrel : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public Barrel() : base( 0xE77 )
|
||||
|
|
@ -497,14 +740,14 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
if ( Weight == 0.0 )
|
||||
Weight = 25.0;
|
||||
}
|
||||
}
|
||||
|
||||
public class Keg : BaseContainer
|
||||
public class Keg : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public Keg() : base( 0xE7F )
|
||||
|
|
@ -527,7 +770,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -590,7 +833,7 @@ namespace Server.Items
|
|||
public class WoodenBox : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public WoodenBox() : base( 0x9AA )
|
||||
public WoodenBox() : base( 0xE7D )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -619,9 +862,9 @@ namespace Server.Items
|
|||
public class SmallCrate : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public SmallCrate() : base( 0x9A9 )
|
||||
public SmallCrate() : base( 0xE7E )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public SmallCrate( Serial serial ) : base( serial )
|
||||
|
|
@ -641,8 +884,8 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Weight == 4.0 )
|
||||
Weight = 2.0;
|
||||
if ( Weight == 4.0 || Weight == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -651,9 +894,9 @@ namespace Server.Items
|
|||
public class MediumCrate : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public MediumCrate() : base( 0xE3F )
|
||||
public MediumCrate() : base( 0xE3E )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public MediumCrate( Serial serial ) : base( serial )
|
||||
|
|
@ -673,8 +916,8 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Weight == 6.0 )
|
||||
Weight = 2.0;
|
||||
if ( Weight == 6.0 || Weight == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -683,7 +926,7 @@ namespace Server.Items
|
|||
public class LargeCrate : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public LargeCrate() : base( 0xE3D )
|
||||
public LargeCrate() : base( 0xE3C )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -714,6 +957,8 @@ namespace Server.Items
|
|||
[Flipable( 0x9A8, 0xE80 )]
|
||||
public class MetalBox : LockableContainer
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public MetalBox() : base( 0x9A8 )
|
||||
{
|
||||
|
|
@ -745,6 +990,8 @@ namespace Server.Items
|
|||
[Flipable( 0x9AB, 0xE7C )]
|
||||
public class MetalChest : LockableContainer
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public MetalChest() : base( 0x9AB )
|
||||
{
|
||||
|
|
@ -776,6 +1023,8 @@ namespace Server.Items
|
|||
[Flipable( 0xE41, 0xE40 )]
|
||||
public class MetalGoldenChest : LockableContainer
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public MetalGoldenChest() : base( 0xE41 )
|
||||
{
|
||||
|
|
@ -804,13 +1053,13 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0xe43, 0xe42 )]
|
||||
[Flipable( 0xE43, 0xE42 )]
|
||||
public class WoodenChest : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public WoodenChest() : base( 0xe43 )
|
||||
public WoodenChest() : base( 0xE42 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public WoodenChest( Serial serial ) : base( serial )
|
||||
|
|
@ -830,8 +1079,8 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Weight == 15.0 )
|
||||
Weight = 2.0;
|
||||
if ( Weight == 15.0 || Weight == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -840,7 +1089,7 @@ namespace Server.Items
|
|||
public class PlainWoodenChest : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public PlainWoodenChest() : base( 0x280B )
|
||||
public PlainWoodenChest() : base( 0x280C )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -871,7 +1120,7 @@ namespace Server.Items
|
|||
public class OrnateWoodenChest : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public OrnateWoodenChest() : base( 0x280D )
|
||||
public OrnateWoodenChest() : base( 0x280E )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -902,7 +1151,7 @@ namespace Server.Items
|
|||
public class GildedWoodenChest : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public GildedWoodenChest() : base( 0x280F )
|
||||
public GildedWoodenChest() : base( 0x2810 )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -933,7 +1182,7 @@ namespace Server.Items
|
|||
public class WoodenFootLocker : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public WoodenFootLocker() : base( 0x2811 )
|
||||
public WoodenFootLocker() : base( 0x2812 )
|
||||
{
|
||||
GumpID = 0x10B;
|
||||
}
|
||||
|
|
@ -968,7 +1217,7 @@ namespace Server.Items
|
|||
public class FinishedWoodenChest : LockableContainer
|
||||
{
|
||||
[Constructable]
|
||||
public FinishedWoodenChest() : base( 0x2813 )
|
||||
public FinishedWoodenChest() : base( 0x2814 )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -407,6 +407,8 @@ namespace Server.Items
|
|||
[Flipable( 0x9A8, 0xE80 )]
|
||||
public class FillableMetalBox : FillableContainer
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public FillableMetalBox() : base( 0x9A8 )
|
||||
{
|
||||
|
|
@ -468,6 +470,8 @@ namespace Server.Items
|
|||
[Flipable( 0x9AB, 0xE7C )]
|
||||
public class FillableMetalChest : FillableContainer
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public FillableMetalChest() : base( 0x9AB )
|
||||
{
|
||||
|
|
@ -498,6 +502,8 @@ namespace Server.Items
|
|||
[Flipable( 0xE41, 0xE40 )]
|
||||
public class FillableMetalGoldenChest : FillableContainer
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public FillableMetalGoldenChest() : base( 0xE41 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,162 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseFurnitureContainer : BaseContainer, ICraftable
|
||||
{
|
||||
private Mobile m_Crafter;
|
||||
private CraftQuality m_Quality;
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Crafter
|
||||
{
|
||||
get { return m_Crafter; }
|
||||
set { m_Crafter = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftQuality Quality
|
||||
{
|
||||
get { return m_Quality; }
|
||||
set { m_Quality = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get { return m_Resource; }
|
||||
set
|
||||
{
|
||||
if ( m_Resource != value )
|
||||
{
|
||||
m_Resource = value;
|
||||
Hue = CraftResources.GetHue( m_Resource );
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual CraftResource DefaultResource{ get{ return CraftResource.RegularWood; } }
|
||||
public virtual bool DisplaysResource{ get{ return true; } }
|
||||
public virtual bool DisplaysMakersMark{ get{ return true; } }
|
||||
|
||||
#region Old Container Serialization Vars
|
||||
/* DO NOT USE! Only used in serialization of furniture containers that originally derived from BaseContainer */
|
||||
private bool m_InheritsBaseCont;
|
||||
private int m_OldVersion;
|
||||
|
||||
protected bool InheritsBaseCont
|
||||
{
|
||||
get{ return m_InheritsBaseCont; }
|
||||
}
|
||||
|
||||
protected int OldVersion
|
||||
{
|
||||
get{ return m_OldVersion; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
public BaseFurnitureContainer( int itemID ) : base( itemID )
|
||||
{
|
||||
m_Quality = CraftQuality.Regular;
|
||||
Resource = DefaultResource;
|
||||
}
|
||||
|
||||
public BaseFurnitureContainer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Crafter != null && DisplaysMakersMark )
|
||||
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
||||
if ( m_Quality == CraftQuality.Exceptional )
|
||||
list.Add( 1060636 ); // exceptional
|
||||
|
||||
if( ( m_Resource >= CraftResource.OakWood && m_Resource <= CraftResource.Frostwood ) && Hue == CraftResources.GetHue( m_Resource ) && DisplaysResource )
|
||||
list.Add( CraftResources.GetLocalizationNumber( m_Resource ) ); // resource name
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int) 2);
|
||||
|
||||
writer.Write( m_Crafter );
|
||||
writer.WriteEncodedInt( (int) m_Quality );
|
||||
writer.WriteEncodedInt( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
m_Crafter = reader.ReadMobile();
|
||||
m_Quality = (CraftQuality)reader.ReadEncodedInt();
|
||||
m_Resource = (CraftResource)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
case 1: //Captcha for EmptyBookcase
|
||||
case 0:
|
||||
{
|
||||
m_InheritsBaseCont = true;
|
||||
m_OldVersion = version;
|
||||
m_Quality = CraftQuality.Regular;
|
||||
m_Resource = DefaultResource;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
if ( Core.ML )
|
||||
{
|
||||
Quality = (CraftQuality)quality;
|
||||
|
||||
if ( makersMark )
|
||||
Crafter = from;
|
||||
|
||||
Type resourceType = typeRes;
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType( resourceType );
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( context != null && context.DoNotColor )
|
||||
Hue = 0;
|
||||
}
|
||||
|
||||
return quality;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x2815, 0x2816 )]
|
||||
public class TallCabinet : BaseContainer
|
||||
public class TallCabinet : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public TallCabinet() : base( 0x2815 )
|
||||
public TallCabinet() : base( 0x2816 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -29,16 +174,16 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x2817, 0x2818 )]
|
||||
public class ShortCabinet : BaseContainer
|
||||
public class ShortCabinet : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public ShortCabinet() : base( 0x2817 )
|
||||
public ShortCabinet() : base( 0x2818 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -56,19 +201,19 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x2857, 0x2858 )]
|
||||
public class RedArmoire : BaseContainer
|
||||
public class RedArmoire : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public RedArmoire() : base( 0x2857 )
|
||||
public RedArmoire() : base( 0x2858 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
||||
public RedArmoire( Serial serial ) : base( serial )
|
||||
|
|
@ -84,18 +229,21 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 10.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x285D, 0x285E )]
|
||||
public class CherryArmoire : BaseContainer
|
||||
public class CherryArmoire : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public CherryArmoire() : base( 0x285D )
|
||||
public CherryArmoire() : base( 0x285E )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
||||
public CherryArmoire( Serial serial ) : base( serial )
|
||||
|
|
@ -111,18 +259,21 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 10.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x285B, 0x285C )]
|
||||
public class MapleArmoire : BaseContainer
|
||||
public class MapleArmoire : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public MapleArmoire() : base( 0x285B )
|
||||
public MapleArmoire() : base( 0x285C )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
||||
public MapleArmoire( Serial serial ) : base( serial )
|
||||
|
|
@ -138,18 +289,21 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 10.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x2859, 0x285A )]
|
||||
public class ElegantArmoire : BaseContainer
|
||||
public class ElegantArmoire : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public ElegantArmoire() : base( 0x2859 )
|
||||
public ElegantArmoire() : base( 0x285A )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
||||
public ElegantArmoire( Serial serial ) : base( serial )
|
||||
|
|
@ -165,16 +319,19 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 10.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c )]
|
||||
public class FullBookcase : BaseContainer
|
||||
[Flipable( 0xA97, 0xA99, 0xA98, 0xA9A, 0xA9B, 0xA9C )]
|
||||
public class FullBookcase : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public FullBookcase() : base( 0xA97 )
|
||||
public FullBookcase() : base( 0xA99 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -192,16 +349,16 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0xa9d, 0xa9e )]
|
||||
public class EmptyBookcase : BaseContainer
|
||||
[Flipable( 0xA9D, 0xA9E )]
|
||||
public class EmptyBookcase : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public EmptyBookcase() : base( 0xA9D )
|
||||
public EmptyBookcase() : base( 0xA9E )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -219,7 +376,7 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
if ( version == 0 && Weight == 1.0 )
|
||||
Weight = -1;
|
||||
|
|
@ -227,11 +384,11 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0xa2c, 0xa34 )]
|
||||
public class Drawer : BaseContainer
|
||||
[Flipable( 0xA2C, 0xA34 )]
|
||||
public class Drawer : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public Drawer() : base( 0xA2C )
|
||||
public Drawer() : base( 0xA34 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -249,16 +406,16 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0xa30, 0xa38 )]
|
||||
public class FancyDrawer : BaseContainer
|
||||
[Flipable( 0xA30, 0xA38 )]
|
||||
public class FancyDrawer : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public FancyDrawer() : base( 0xA30 )
|
||||
public FancyDrawer() : base( 0xA38 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -273,19 +430,81 @@ namespace Server.Items
|
|||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x2DF1, 0x2DF2 )]
|
||||
public class OrnateElvenChest : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public OrnateElvenChest() : base( 0x2DF1 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
GumpID = 0x10C;
|
||||
}
|
||||
|
||||
public OrnateElvenChest( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version < 1 )
|
||||
GumpID = 0x10C;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0x2DF3, 0x2DF4 )]
|
||||
public class OrnateElvenBox : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public OrnateElvenBox() : base( 0x2DF3 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
GumpID = 0x10C;
|
||||
}
|
||||
|
||||
public OrnateElvenBox( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version < 1 )
|
||||
GumpID = 0x10C;
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0xa4f, 0xa53 )]
|
||||
public class Armoire : BaseContainer
|
||||
[Flipable( 0xA4F, 0xA53 )]
|
||||
public class Armoire : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public Armoire() : base( 0xA4F )
|
||||
public Armoire() : base( 0xA53 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -309,18 +528,18 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
DynamicFurniture.Close( this );
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flipable( 0xa4d, 0xa51 )]
|
||||
public class FancyArmoire : BaseContainer
|
||||
[Flipable( 0xA4D, 0xA51 )]
|
||||
public class FancyArmoire : BaseFurnitureContainer
|
||||
{
|
||||
[Constructable]
|
||||
public FancyArmoire() : base( 0xA4D )
|
||||
public FancyArmoire() : base( 0xA51 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -344,7 +563,7 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
int version = ( InheritsBaseCont ? OldVersion : reader.ReadInt() ); //Required for BaseFurnitureContainer insertion
|
||||
|
||||
DynamicFurniture.Close( this );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ namespace Server.Items
|
|||
private uint m_KeyValue;
|
||||
private Mobile m_Picker;
|
||||
private bool m_TrapOnLockpick;
|
||||
private CraftQuality m_Quality;
|
||||
private Mobile m_Crafter;
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Picker
|
||||
|
|
@ -116,12 +119,39 @@ namespace Server.Items
|
|||
m_TrapOnLockpick = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftQuality Quality
|
||||
{
|
||||
get{ return m_Quality; }
|
||||
set{ m_Quality = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Crafter
|
||||
{
|
||||
get{ return m_Crafter; }
|
||||
set{ m_Crafter = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public virtual CraftResource DefaultResource{ get{ return CraftResource.RegularWood; } }
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 6 ); // version
|
||||
writer.Write( (int) 7 ); // version
|
||||
|
||||
writer.Write( (int)m_Quality );
|
||||
writer.Write( (int)m_Resource );
|
||||
writer.WriteMobile( m_Crafter );
|
||||
|
||||
writer.Write( m_IsShipwreckedItem );
|
||||
|
||||
|
|
@ -144,6 +174,13 @@ namespace Server.Items
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 7:
|
||||
{
|
||||
m_Quality = (CraftQuality)reader.ReadInt();
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
m_Crafter = reader.ReadMobile();
|
||||
goto case 6;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
m_IsShipwreckedItem = reader.ReadBool();
|
||||
|
|
@ -198,6 +235,12 @@ namespace Server.Items
|
|||
m_RequiredSkill = m_LockLevel;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version < 7 )
|
||||
{
|
||||
m_Quality = CraftQuality.Regular;
|
||||
m_Resource = DefaultResource;
|
||||
}
|
||||
|
||||
m_Locked = reader.ReadBool();
|
||||
|
||||
|
|
@ -208,6 +251,8 @@ namespace Server.Items
|
|||
|
||||
public LockableContainer( int itemID ) : base( itemID )
|
||||
{
|
||||
m_Quality = CraftQuality.Regular;
|
||||
Resource = DefaultResource;
|
||||
m_MaxLockLevel = 100;
|
||||
}
|
||||
|
||||
|
|
@ -215,6 +260,20 @@ namespace Server.Items
|
|||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Crafter != null )
|
||||
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
||||
if ( m_Quality == CraftQuality.Exceptional )
|
||||
list.Add( 1060636 ); // exceptional
|
||||
|
||||
if( ( m_Resource >= CraftResource.OakWood && m_Resource <= CraftResource.Frostwood ) && Hue == CraftResources.GetHue( m_Resource ) )
|
||||
list.Add( CraftResources.GetLocalizationNumber( m_Resource ) ); // resource name
|
||||
}
|
||||
|
||||
public override bool CheckContentDisplay( Mobile from )
|
||||
{
|
||||
return !m_Locked && base.CheckContentDisplay( from );
|
||||
|
|
@ -360,6 +419,26 @@ namespace Server.Items
|
|||
|
||||
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
if ( Core.ML )
|
||||
{
|
||||
Quality = (CraftQuality)quality;
|
||||
|
||||
Type resourceType = typeRes;
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType( resourceType );
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( context != null && context.DoNotColor )
|
||||
Resource = DefaultResource;
|
||||
|
||||
if ( makersMark )
|
||||
Crafter = from;
|
||||
}
|
||||
|
||||
if ( from.CheckSkill( SkillName.Tinkering, -5.0, 15.0 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500636 ); // Your tinker skill was sufficient to make the item lockable.
|
||||
|
|
@ -392,7 +471,7 @@ namespace Server.Items
|
|||
from.SendLocalizedMessage( 500637 ); // Your tinker skill was insufficient to make the item lockable.
|
||||
}
|
||||
|
||||
return 1;
|
||||
return quality;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ namespace Server.Items
|
|||
[Flipable]
|
||||
public class ParagonChest : LockableContainer
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
private static int[] m_ItemIDs = new int[]
|
||||
{
|
||||
0x9AB, 0xE40, 0xE41, 0xE7C
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ namespace Server.Items
|
|||
[FlipableAttribute( 0xe41, 0xe40 )]
|
||||
public class MetalGoldenTreasureChest : BaseTreasureChest
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public MetalGoldenTreasureChest() : base( 0xE41 )
|
||||
{
|
||||
|
|
@ -63,6 +65,8 @@ namespace Server.Items
|
|||
[FlipableAttribute( 0x9ab, 0xe7c )]
|
||||
public class MetalTreasureChest : BaseTreasureChest
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Iron; } }
|
||||
|
||||
[Constructable]
|
||||
public MetalTreasureChest() : base( 0x9AB )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using System.Collections;
|
|||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0xE1C, 0xFAD )]
|
||||
public class Backgammon : BaseBoard
|
||||
public class Backgammon : BaseGameBoard
|
||||
{
|
||||
[Constructable]
|
||||
public Backgammon() : base( 0xE1C )
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue