本文整理汇总了C#中Server.Engines.Craft.CraftSystem.GetContext方法的典型用法代码示例。如果您正苦于以下问题:C# CraftSystem.GetContext方法的具体用法?C# CraftSystem.GetContext怎么用?C# CraftSystem.GetContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Engines.Craft.CraftSystem
的用法示例。
在下文中一共展示了CraftSystem.GetContext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AutoCraftTimer
public AutoCraftTimer(Mobile from, CraftSystem system, CraftItem item, BaseTool tool, int amount, TimeSpan delay, TimeSpan interval)
: base(delay, interval)
{
m_From = from;
m_CraftSystem = system;
m_CraftItem = item;
m_Tool = tool;
m_Amount = amount;
m_Ticks = 0;
m_Success = 0;
CraftContext context = m_CraftSystem.GetContext(m_From);
if (context != null)
{
CraftSubResCol res = (m_CraftItem.UseSubRes2 ? m_CraftSystem.CraftSubRes2 : m_CraftSystem.CraftSubRes);
int resIndex = (m_CraftItem.UseSubRes2 ? context.LastResourceIndex2 : context.LastResourceIndex);
if (resIndex > -1)
m_TypeRes = res.GetAt(resIndex).ItemType;
}
m_AutoCraftTable[from] = this;
this.Start();
}
示例2: BeginTarget
public static void BeginTarget( Mobile from, CraftSystem craftSystem, BaseTool tool )
{
CraftContext context = craftSystem.GetContext( from );
PlayerMobile user = from as PlayerMobile;
if ( context == null )
return;
int lastRes = context.LastResourceIndex;
CraftSubResCol subRes = craftSystem.CraftSubRes;
if ( lastRes >= 0 && lastRes < subRes.Count )
{
CraftSubRes res = subRes.GetAt( lastRes );
if ( from.Skills[craftSystem.MainSkill].Value < res.RequiredSkill )
{
from.SendGump( new CraftGump( from, craftSystem, tool, res.Message ) );
}
else
{
CraftResource resource = CraftResources.GetFromType( res.ItemType );
if ( resource != CraftResource.None )
{
from.Target = new InternalTarget( craftSystem, tool, res.ItemType, resource );
if ( user.NextEnhanceSuccess )
{
from.SendLocalizedMessage( 1149869, "100" ); // Target an item to enhance with the properties of your selected material (Success Rate: ~1_VAL~%).
}
else
{
from.SendLocalizedMessage( 1061004 ); // Target an item to enhance with the properties of your selected material.
}
}
else
{
from.SendGump( new CraftGump( from, craftSystem, tool, 1061010 ) ); // You must select a special material in order to enhance an item with its properties.
}
}
}
else
{
from.SendGump( new CraftGump( from, craftSystem, tool, 1061010 ) ); // You must select a special material in order to enhance an item with its properties.
}
}
示例3: OnCraft
public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, IBaseTool 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;
}
示例4: OnCraft
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
{
Quality = (ArmorQuality)quality;
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 )
{
if ( !( Core.ML && this is BaseShield )) // Guessed Core.ML removed exceptional resist bonuses from crafted shields
DistributeBonuses( (tool is BaseRunicTool ? 6 : Core.SE ? 15 : 14) ); // Not sure since when, but right now 15 points are added, not 14.
if( Core.ML && !(this is BaseShield) )
{
int bonus = (int)(from.Skills.ArmsLore.Value / 20);
for( int i = 0; i < bonus; i++ )
{
switch( Utility.Random( 5 ) )
{
case 0: m_PhysicalBonus++; break;
case 1: m_FireBonus++; break;
case 2: m_ColdBonus++; break;
case 3: m_EnergyBonus++; break;
case 4: m_PoisonBonus++; break;
}
}
from.CheckSkill( SkillName.ArmsLore, 0, 100 );
}
}
if ( Core.AOS && tool is BaseRunicTool )
((BaseRunicTool)tool).ApplyAttributesTo( this );
return quality;
}
示例5: OnCraft
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 )
Resource = DefaultResource;
}
else
Resource = DefaultResource;
return quality;
}
示例6: GetPlantHueAmount
public int GetPlantHueAmount(Mobile from, CraftSystem craftSystem, Container cont, Type[] types)
{
Item[] items = cont.FindItemsByType(types, true);
CraftContext context = craftSystem.GetContext(from);
int amount = 0;
for (int i = 0; i < items.Length; ++i)
{
IPlantHue ph = items[i] as IPlantHue;
IPigmentHue pigh = items[i] as IPigmentHue;
if (context == null || (ph != null && ph.PlantHue != context.RequiredPlantHue))
continue;
else if (context == null || (pigh != null && pigh.PigmentHue != context.RequiredPigmentHue))
continue;
amount += items[i].Amount;
}
return amount;
}
示例7: OnCraft
public virtual int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
{
this.Quality = (ClothingQuality)quality;
if (makersMark)
this.Crafter = from;
#region Mondain's Legacy
if (!craftItem.ForceNonExceptional)
{
if (this.DefaultResource != CraftResource.None)
{
Type resourceType = typeRes;
if (resourceType == null)
resourceType = craftItem.Resources.GetAt(0).ItemType;
this.Resource = CraftResources.GetFromType(resourceType);
}
else
{
this.Hue = resHue;
}
}
#endregion
this.PlayerConstructed = true;
CraftContext context = craftSystem.GetContext(from);
if (context != null && context.DoNotColor)
this.Hue = 0;
return quality;
}
示例8: OnCraft
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
{
Quality = (ArmorQuality)quality;
if ( makersMark )
Crafter = from;
Type resourceType = typeRes;
if ( resourceType == null )
resourceType = craftItem.Ressources.GetAt( 0 ).ItemType;
Resource = CraftResources.GetFromType( resourceType );
PlayerConstructed = true;
CraftContext context = craftSystem.GetContext( from );
if ( context != null && context.DoNotColor )
Hue = 0;
if ( quality == 2 )
DistributeBonuses( (tool is BaseRunicTool ? 6 : 14) );
if ( Core.AOS && tool is BaseRunicTool )
((BaseRunicTool)tool).ApplyAttributesTo( this );
return quality;
}
示例9: OnCraft
public int OnCraft(
int quality,
bool makersMark,
Mobile from,
CraftSystem craftSystem,
Type typeRes,
BaseTool tool,
CraftItem craftItem,
int resHue)
{
Quality = (WeaponQuality)quality;
if (makersMark)
{
Crafter = from;
}
PlayerConstructed = true;
if (typeRes == null)
{
typeRes = craftItem.Resources.GetAt(0).ItemType;
}
if (Core.AOS)
{
if (!craftItem.ForceNonExceptional)
{
Resource = CraftResources.GetFromType(typeRes);
}
CraftContext context = craftSystem.GetContext(from);
if (context != null && context.DoNotColor)
{
Hue = 0;
}
if (Quality == WeaponQuality.Exceptional)
{
Attributes.WeaponDamage += 35;
}
if (!craftItem.ForceNonExceptional)
{
if (tool is BaseRunicTool)
{
((BaseRunicTool)tool).ApplyAttributesTo(this);
}
}
if (Core.ML && Quality == WeaponQuality.Exceptional)
{
Attributes.WeaponDamage += (int)(from.Skills.ArmsLore.Value / 20);
from.CheckSkill(SkillName.ArmsLore, 0, 100);
}
}
else if (tool is BaseRunicTool)
{
if (craftItem != null && !craftItem.ForceNonExceptional)
{
CraftResource thisResource = CraftResources.GetFromType(typeRes);
if (thisResource == ((BaseRunicTool)tool).Resource)
{
Resource = thisResource;
CraftContext context = craftSystem.GetContext(from);
if (context != null && context.DoNotColor)
{
Hue = 0;
}
switch (thisResource)
{
case CraftResource.DullCopper:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Durable;
AccuracyLevel = WeaponAccuracyLevel.Accurate;
break;
}
case CraftResource.ShadowIron:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Durable;
DamageLevel = WeaponDamageLevel.Ruin;
break;
}
case CraftResource.Copper:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Fortified;
DamageLevel = WeaponDamageLevel.Ruin;
AccuracyLevel = WeaponAccuracyLevel.Surpassingly;
break;
}
case CraftResource.Bronze:
{
//.........这里部分代码省略.........
示例10: CraftGump
private CraftGump( Mobile from, CraftSystem craftSystem, BaseTool tool, object notice, CraftPage page )
: base(40, 40)
{
m_From = from;
m_CraftSystem = craftSystem;
m_Tool = tool;
m_Page = page;
CraftContext context = craftSystem.GetContext( from );
from.CloseGump( typeof( CraftGump ) );
from.CloseGump( typeof( CraftGumpItem ) );
AddPage( 0 );
AddBackground( 0, 0, 530, 437, 5054 );
AddImageTiled( 10, 10, 510, 22, 2624 );
AddImageTiled( 10, 292, 150, 45, 2624 );
AddImageTiled( 165, 292, 355, 45, 2624 );
AddImageTiled( 10, 342, 510, 85, 2624 );
AddImageTiled( 10, 37, 200, 250, 2624 );
AddImageTiled( 215, 37, 305, 250, 2624 );
AddAlphaRegion( 10, 10, 510, 417 );
if ( craftSystem.GumpTitleNumber > 0 )
AddHtmlLocalized( 10, 12, 510, 20, craftSystem.GumpTitleNumber, LabelColor, false, false );
else
AddHtml( 10, 12, 510, 20, craftSystem.GumpTitleString, false, false );
AddHtmlLocalized( 10, 37, 200, 22, 1044010, LabelColor, false, false ); // <CENTER>CATEGORIES</CENTER>
AddHtmlLocalized( 215, 37, 305, 22, 1044011, LabelColor, false, false ); // <CENTER>SELECTIONS</CENTER>
AddHtmlLocalized( 10, 302, 150, 25, 1044012, LabelColor, false, false ); // <CENTER>NOTICES</CENTER>
AddButton( 15, 402, 4017, 4019, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 50, 405, 150, 18, 1011441, LabelColor, false, false ); // EXIT
AddButton( 270, 402, 4005, 4007, GetButtonID( 6, 2 ), GumpButtonType.Reply, 0 );
AddHtmlLocalized( 305, 405, 150, 18, 1044013, LabelColor, false, false ); // MAKE LAST
// Mark option
if ( craftSystem.MarkOption )
{
AddButton( 270, 362, 4005, 4007, GetButtonID( 6, 6 ), GumpButtonType.Reply, 0 );
AddHtmlLocalized( 305, 365, 150, 18, 1044017 + (context == null ? 0 : (int)context.MarkOption), LabelColor, false, false ); // MARK ITEM
}
// ****************************************
// Resmelt option
if ( craftSystem.Resmelt )
{
AddButton( 15, 342, 4005, 4007, GetButtonID( 6, 1 ), GumpButtonType.Reply, 0 );
AddHtmlLocalized( 50, 345, 150, 18, 1044259, LabelColor, false, false ); // SMELT ITEM
}
// ****************************************
// Repair option
if ( craftSystem.Repair )
{
AddButton( 270, 342, 4005, 4007, GetButtonID( 6, 5 ), GumpButtonType.Reply, 0 );
AddHtmlLocalized( 305, 345, 150, 18, 1044260, LabelColor, false, false ); // REPAIR ITEM
}
// ****************************************
// Enhance option
if ( craftSystem.CanEnhance )
{
AddButton( 270, 382, 4005, 4007, GetButtonID( 6, 8 ), GumpButtonType.Reply, 0 );
AddHtmlLocalized( 305, 385, 150, 18, 1061001, LabelColor, false, false ); // ENHANCE ITEM
}
// ****************************************
if ( notice is int && (int)notice > 0 )
AddHtmlLocalized( 170, 295, 350, 40, (int)notice, LabelColor, false, false );
else if ( notice is string )
AddHtml( 170, 295, 350, 40, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", FontColor, notice ), false, false );
// If the system has more than one resource
if ( craftSystem.CraftSubRes.Init )
{
string nameString = craftSystem.CraftSubRes.NameString;
int nameNumber = craftSystem.CraftSubRes.NameNumber;
int resIndex = ( context == null ? -1 : context.LastResourceIndex );
Type resourceType = craftSystem.CraftSubRes.ResType;
if ( resIndex > -1 )
{
CraftSubRes subResource = craftSystem.CraftSubRes.GetAt( resIndex );
nameString = subResource.NameString;
nameNumber = subResource.NameNumber;
resourceType = subResource.ItemType;
}
int resourceCount = 0;
if ( from.Backpack != null )
{
Item[] items = from.Backpack.FindItemsByType( resourceType, true );
//.........这里部分代码省略.........
示例11: OnCraft
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
{
Quality = (WineQuality)quality;
if ( makersMark )
Crafter = from;
Item[] items = from.Backpack.FindItemsByType( typeof( VinyardLabelMaker ) );
if ( items.Length != 0 )
{
foreach( VinyardLabelMaker lm in items )
{
if (lm.VinyardName != null)
{
this.Name = lm.VinyardName;
break;
}
}
}
Type resourceType = typeRes;
if ( resourceType == null )
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
Variety = WinemakingResources.GetFromType( resourceType );
CraftContext context = craftSystem.GetContext( from );
//if ( context != null && context.DoNotColor )
Hue = 0;
return quality;
}
示例12: OnCraft
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
{
Quality = (FurnitureQuality)quality;
if ( makersMark )
Crafter = from;
Type resourceType = typeRes;
if ( resourceType == null )
resourceType = craftItem.Ressources.GetAt( 0 ).ItemType;
Resource = CraftResources.GetFromType( resourceType );
PlayerConstructed = true;
CraftContext context = craftSystem.GetContext( from );
if ( context != null && context.DoNotColor )
Hue = 0;
return quality;
}
示例13: CraftGump
private CraftGump(Mobile from, CraftSystem craftSystem, BaseTool tool, object notice, CraftPage page)
: base(40, 40)
{
this.m_From = from;
this.m_CraftSystem = craftSystem;
this.m_Tool = tool;
this.m_Page = page;
CraftContext context = craftSystem.GetContext(from);
from.CloseGump(typeof(CraftGump));
from.CloseGump(typeof(CraftGumpItem));
this.AddPage(0);
AddBackground(0, 0, 530, 497, 5054);
AddImageTiled(10, 10, 510, 22, 2624);
AddImageTiled(10, 292, 150, 45, 2624);
AddImageTiled(165, 292, 355, 45, 2624);
AddImageTiled(10, 342, 510, 145, 2624);
AddImageTiled(10, 37, 200, 250, 2624);
AddImageTiled(215, 37, 305, 250, 2624);
AddAlphaRegion(10, 10, 510, 477);
if (craftSystem.GumpTitleNumber > 0)
this.AddHtmlLocalized(10, 12, 510, 20, craftSystem.GumpTitleNumber, LabelColor, false, false);
else
this.AddHtml(10, 12, 510, 20, craftSystem.GumpTitleString, false, false);
AddHtmlLocalized(10, 37, 200, 22, 1044010, LabelColor, false, false); // <CENTER>CATEGORIES</CENTER>
AddHtmlLocalized(215, 37, 305, 22, 1044011, LabelColor, false, false); // <CENTER>SELECTIONS</CENTER>
AddHtmlLocalized(10, 302, 150, 25, 1044012, LabelColor, false, false); // <CENTER>NOTICES</CENTER>
this.AddButton(15, 442, 4017, 4019, 0, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(50, 445, 150, 18, 1011441, LabelColor, false, false); // EXIT
this.AddButton(115, 442, 4017, 4019, GetButtonID(6, 11), GumpButtonType.Reply, 0);
this.AddHtmlLocalized(150, 445, 150, 18, 1112698, LabelColor, false, false); // CANCEL MAKE
// Repair option
if (m_CraftSystem.Repair)
{
AddButton(270, 342, 4005, 4007, GetButtonID(6, 5), GumpButtonType.Reply, 0);
AddHtmlLocalized(305, 345, 150, 18, 1044260, LabelColor, false, false); // REPAIR ITEM
}
// ****************************************
// Mark option
if (m_CraftSystem.MarkOption)
{
AddButton(270, 362, 4005, 4007, GetButtonID(6, 6), GumpButtonType.Reply, 0);
AddHtmlLocalized(305, 365, 150, 18, 1044017 + (context == null ? 0 : (int)context.MarkOption), LabelColor, false, false); // MARK ITEM
}
// ****************************************
// Enhance option
if (m_CraftSystem.CanEnhance)
{
AddButton(270, 382, 4005, 4007, GetButtonID(6, 8), GumpButtonType.Reply, 0);
AddHtmlLocalized(305, 385, 150, 18, 1061001, LabelColor, false, false); // ENHANCE ITEM
}
// ****************************************
#region SA
// Alter option
if (Core.SA && m_CraftSystem.CanAlter)
{
AddButton(270, 402, 4005, 4007, GetButtonID(6, 9), GumpButtonType.Reply, 0);
AddHtmlLocalized(304, 405, 250, 18, 1094726, LabelColor, false, false); // ALTER ITEM (Gargoyle)
}
// ****************************************
// Quest item
if (Core.SA)
{
AddButton(270, 422, 4005, 4007, GetButtonID(6, 10), GumpButtonType.Reply, 0);
AddHtmlLocalized(305, 425, 150, 18, context != null && context.QuestOption == CraftQuestOption.QuestItem ? 1112534 : 1112533, LabelColor, false, false); // QUEST ITEM
}
// ****************************************
#endregion
AddButton(270, 442, 4005, 4007, GetButtonID(6, 2), GumpButtonType.Reply, 0);
AddHtmlLocalized(305, 445, 150, 18, 1044013, LabelColor, false, false); // MAKE LAST
#region Stygian Abyss
int total = 1;
int made = 0;
if (Locked && AutoCraftTimer.AutoCraftTable.ContainsKey(m_From))
{
AutoCraftTimer timer = AutoCraftTimer.AutoCraftTable[m_From];
if (timer != null)
{
total = timer.Amount;
made = timer.Attempts;
}
else
{
if (context != null)
//.........这里部分代码省略.........
示例14: OnCraft
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
{
Quality = (WeaponQuality)quality;
if ( makersMark )
Crafter = from;
PlayerConstructed = true;
Type resourceType = typeRes;
if ( resourceType == null )
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
// Begin arms lore check
int armsLoreBracket = (int)(from.Skills.ArmsLore.Value / 10);
switch ( armsLoreBracket )
{
case 1: DamageLevel = WeaponDamageLevel.TenArmsLore; break;
case 2: DamageLevel = WeaponDamageLevel.TwentyArmsLore; break;
case 3: DamageLevel = WeaponDamageLevel.ThirtyArmsLore; break;
case 4: DamageLevel = WeaponDamageLevel.FortyArmsLore; break;
case 5: DamageLevel = WeaponDamageLevel.FiftyArmsLore; break;
case 6: DamageLevel = WeaponDamageLevel.SixtyArmsLore; break;
case 7: DamageLevel = WeaponDamageLevel.SeventyArmsLore; break;
case 8: DamageLevel = WeaponDamageLevel.EightyArmsLore; break;
case 9: DamageLevel = WeaponDamageLevel.NinetyArmsLore; break;
case 10: DamageLevel = WeaponDamageLevel.GMArmsLore; break;
}
Attributes.WeaponDamage += (int)(from.Skills.ArmsLore.Value / 20);
if ( Attributes.WeaponDamage > 50 )
Attributes.WeaponDamage = 50;
from.CheckSkill( SkillName.ArmsLore, 0, 100 );
// End arms lore check
if ( tool is BaseRunicTool )
{
CraftResource thisResource = CraftResources.GetFromType( resourceType );
if ( thisResource == ((BaseRunicTool)tool).Resource )
{
Resource = thisResource;
CraftContext context = craftSystem.GetContext( from );
if ( context != null && context.DoNotColor )
Hue = 0;
switch ( thisResource )
{
case CraftResource.DullCopper:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Durable;
AccuracyLevel = WeaponAccuracyLevel.Accurate;
break;
}
case CraftResource.ShadowIron:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Durable;
DamageLevel = WeaponDamageLevel.Ruin;
break;
}
case CraftResource.Copper:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Fortified;
DamageLevel = WeaponDamageLevel.Ruin;
AccuracyLevel = WeaponAccuracyLevel.Surpassingly;
break;
}
case CraftResource.Bronze:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Fortified;
DamageLevel = WeaponDamageLevel.Might;
AccuracyLevel = WeaponAccuracyLevel.Surpassingly;
break;
}
case CraftResource.Gold:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Indestructible;
DamageLevel = WeaponDamageLevel.Force;
AccuracyLevel = WeaponAccuracyLevel.Eminently;
break;
}
case CraftResource.Agapite:
{
Identified = true;
DurabilityLevel = WeaponDurabilityLevel.Indestructible;
DamageLevel = WeaponDamageLevel.Power;
AccuracyLevel = WeaponAccuracyLevel.Eminently;
break;
}
case CraftResource.Verite:
//.........这里部分代码省略.........
示例15: OnCraft
public virtual int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
{
this.Quality = (ItemQuality)quality;
if (makersMark)
this.Crafter = from;
Type resourceType = typeRes;
if (resourceType == null)
resourceType = craftItem.Resources.GetAt(0).ItemType;
this.Resource = CraftResources.GetFromType(resourceType);
CraftContext context = craftSystem.GetContext(from);
if (context != null && context.DoNotColor)
this.Hue = 0;
return quality;
}