Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,76 +3,77 @@ using Server.Items;
|
|||
|
||||
namespace Server.Engines.Craft
|
||||
{
|
||||
public class DefCartography : CraftSystem
|
||||
{
|
||||
public override SkillName MainSkill => SkillName.Cartography;
|
||||
public class DefCartography : CraftSystem
|
||||
{
|
||||
private static CraftSystem m_CraftSystem;
|
||||
|
||||
public override int GumpTitleNumber => 1044008;
|
||||
private DefCartography() : base(1, 1, 1.25) // base( 1, 1, 3.0 )
|
||||
{
|
||||
}
|
||||
|
||||
public override double GetChanceAtMin( CraftItem item )
|
||||
{
|
||||
return 0.0; // 0%
|
||||
}
|
||||
public override SkillName MainSkill => SkillName.Cartography;
|
||||
|
||||
private static CraftSystem m_CraftSystem;
|
||||
public override int GumpTitleNumber => 1044008;
|
||||
|
||||
public static CraftSystem CraftSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_CraftSystem == null )
|
||||
m_CraftSystem = new DefCartography();
|
||||
public static CraftSystem CraftSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_CraftSystem == null)
|
||||
m_CraftSystem = new DefCartography();
|
||||
|
||||
return m_CraftSystem;
|
||||
}
|
||||
}
|
||||
return m_CraftSystem;
|
||||
}
|
||||
}
|
||||
|
||||
private DefCartography() : base( 1, 1, 1.25 )// base( 1, 1, 3.0 )
|
||||
{
|
||||
}
|
||||
public override double GetChanceAtMin(CraftItem item)
|
||||
{
|
||||
return 0.0; // 0%
|
||||
}
|
||||
|
||||
public override int CanCraft( Mobile from, BaseTool tool, Type itemType )
|
||||
{
|
||||
if ( tool == null || tool.Deleted || tool.UsesRemaining < 0 )
|
||||
return 1044038; // You have worn out your tool!
|
||||
if ( !BaseTool.CheckAccessible( tool, from ) )
|
||||
return 1044263; // The tool must be on your person to use.
|
||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||
{
|
||||
if (tool == null || tool.Deleted || tool.UsesRemaining < 0)
|
||||
return 1044038; // You have worn out your tool!
|
||||
if (!BaseTool.CheckAccessible(tool, from))
|
||||
return 1044263; // The tool must be on your person to use.
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void PlayCraftEffect( Mobile from )
|
||||
{
|
||||
from.PlaySound( 0x249 );
|
||||
}
|
||||
public override void PlayCraftEffect(Mobile from)
|
||||
{
|
||||
from.PlaySound(0x249);
|
||||
}
|
||||
|
||||
public override int PlayEndingEffect( Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality, bool makersMark, CraftItem item )
|
||||
{
|
||||
if ( toolBroken )
|
||||
from.SendLocalizedMessage( 1044038 ); // You have worn out your tool
|
||||
public override int PlayEndingEffect(Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
||||
bool makersMark, CraftItem item)
|
||||
{
|
||||
if (toolBroken)
|
||||
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
||||
|
||||
if ( failed )
|
||||
{
|
||||
if ( lostMaterial )
|
||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||
return 1044157; // You failed to create the item, but no materials were lost.
|
||||
}
|
||||
if (failed)
|
||||
{
|
||||
if (lostMaterial)
|
||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||
return 1044157; // You failed to create the item, but no materials were lost.
|
||||
}
|
||||
|
||||
if ( quality == 0 )
|
||||
return 502785; // You were barely able to make this item. It's quality is below average.
|
||||
if ( makersMark && quality == 2 )
|
||||
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
||||
if ( quality == 2 )
|
||||
return 1044155; // You create an exceptional quality item.
|
||||
return 1044154; // You create the item.
|
||||
}
|
||||
if (quality == 0)
|
||||
return 502785; // You were barely able to make this item. It's quality is below average.
|
||||
if (makersMark && quality == 2)
|
||||
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
||||
if (quality == 2)
|
||||
return 1044155; // You create an exceptional quality item.
|
||||
return 1044154; // You create the item.
|
||||
}
|
||||
|
||||
public override void InitCraftList()
|
||||
{
|
||||
AddCraft( typeof( LocalMap ), 1044448, 1015230, 10.0, 70.0, typeof( BlankMap ), 1044449, 1, 1044450 );
|
||||
AddCraft( typeof( CityMap ), 1044448, 1015231, 25.0, 85.0, typeof( BlankMap ), 1044449, 1, 1044450 );
|
||||
AddCraft( typeof( SeaChart ), 1044448, 1015232, 35.0, 95.0, typeof( BlankMap ), 1044449, 1, 1044450 );
|
||||
AddCraft( typeof( WorldMap ), 1044448, 1015233, 39.5, 99.5, typeof( BlankMap ), 1044449, 1, 1044450 );
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void InitCraftList()
|
||||
{
|
||||
AddCraft(typeof(LocalMap), 1044448, 1015230, 10.0, 70.0, typeof(BlankMap), 1044449, 1, 1044450);
|
||||
AddCraft(typeof(CityMap), 1044448, 1015231, 25.0, 85.0, typeof(BlankMap), 1044449, 1, 1044450);
|
||||
AddCraft(typeof(SeaChart), 1044448, 1015232, 35.0, 95.0, typeof(BlankMap), 1044449, 1, 1044450);
|
||||
AddCraft(typeof(WorldMap), 1044448, 1015233, 39.5, 99.5, typeof(BlankMap), 1044449, 1, 1044450);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue