Upgrades code style - First batch (#22)
This commit is contained in:
parent
8ee42c8ea2
commit
632e8b4757
1834 changed files with 10245 additions and 10437 deletions
|
|
@ -20,7 +20,7 @@ namespace Server.Engines.Craft
|
|||
private bool m_DoNotColor;
|
||||
private CraftMarkOption m_MarkOption;
|
||||
|
||||
public List<CraftItem> Items { get { return m_Items; } }
|
||||
public List<CraftItem> Items => m_Items;
|
||||
public int LastResourceIndex{ get{ return m_LastResourceIndex; } set{ m_LastResourceIndex = value; } }
|
||||
public int LastResourceIndex2{ get{ return m_LastResourceIndex2; } set{ m_LastResourceIndex2 = value; } }
|
||||
public int LastGroupIndex{ get{ return m_LastGroupIndex; } set{ m_LastGroupIndex = value; } }
|
||||
|
|
@ -56,4 +56,4 @@ namespace Server.Engines.Craft
|
|||
m_Items.Insert( 0, item );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,11 +93,9 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
|
||||
private static Dictionary<Type, int> _itemIds = new Dictionary<Type, int>();
|
||||
|
||||
public static int ItemIDOf( Type type ) {
|
||||
int itemId;
|
||||
|
||||
if ( !_itemIds.TryGetValue( type, out itemId ) ) {
|
||||
public static int ItemIDOf( Type type ) {
|
||||
if (!_itemIds.TryGetValue( type, out int itemId )) {
|
||||
if ( type == typeof( FactionExplosionTrap ) ) {
|
||||
itemId = 14034;
|
||||
} else if ( type == typeof( FactionGasTrap ) ) {
|
||||
|
|
@ -323,7 +321,7 @@ namespace Server.Engines.Craft
|
|||
0x398C, 0x399F, // Fire field
|
||||
0x2DDB, 0x2DDC, //Elven stove
|
||||
0x19AA, 0x19BB, // Veteran Reward Brazier
|
||||
0x197A, 0x19A9, // Large Forge
|
||||
0x197A, 0x19A9, // Large Forge
|
||||
0x0FB1, 0x0FB1, // Small Forge
|
||||
0x2DD8, 0x2DD8 // Elven Forge
|
||||
};
|
||||
|
|
@ -753,7 +751,7 @@ namespace Server.Engines.Craft
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int index = 0;
|
||||
|
||||
// Consume ALL
|
||||
|
|
@ -872,7 +870,7 @@ namespace Server.Engines.Craft
|
|||
if ( from.Talisman is BaseTalisman )
|
||||
{
|
||||
BaseTalisman talisman = (BaseTalisman) from.Talisman;
|
||||
|
||||
|
||||
if ( talisman.Skill == system.MainSkill )
|
||||
{
|
||||
chance -= talisman.SuccessBonus / 100.0;
|
||||
|
|
@ -960,7 +958,7 @@ namespace Server.Engines.Craft
|
|||
if ( allRequiredSkills && from.Talisman is BaseTalisman )
|
||||
{
|
||||
BaseTalisman talisman = (BaseTalisman) from.Talisman;
|
||||
|
||||
|
||||
if ( talisman.Skill == craftSystem.MainSkill )
|
||||
chance += talisman.SuccessBonus / 100.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ namespace Server.Engines.Craft
|
|||
private List<int> m_Recipes;
|
||||
private List<int> m_RareRecipes;
|
||||
|
||||
public int MinCraftEffect { get { return m_MinCraftEffect; } }
|
||||
public int MaxCraftEffect { get { return m_MaxCraftEffect; } }
|
||||
public double Delay { get { return m_Delay; } }
|
||||
public int MinCraftEffect => m_MinCraftEffect;
|
||||
public int MaxCraftEffect => m_MaxCraftEffect;
|
||||
public double Delay => m_Delay;
|
||||
|
||||
public CraftItemCol CraftItems{ get { return m_CraftItems; } }
|
||||
public CraftGroupCol CraftGroups{ get { return m_CraftGroups; } }
|
||||
public CraftSubResCol CraftSubRes{ get { return m_CraftSubRes; } }
|
||||
public CraftSubResCol CraftSubRes2{ get { return m_CraftSubRes2; } }
|
||||
public CraftItemCol CraftItems => m_CraftItems;
|
||||
public CraftGroupCol CraftGroups => m_CraftGroups;
|
||||
public CraftSubResCol CraftSubRes => m_CraftSubRes;
|
||||
public CraftSubResCol CraftSubRes2 => m_CraftSubRes2;
|
||||
|
||||
public abstract SkillName MainSkill{ get; }
|
||||
|
||||
|
|
@ -65,8 +65,7 @@ namespace Server.Engines.Craft
|
|||
return null;
|
||||
}
|
||||
|
||||
CraftContext c = null;
|
||||
m_ContextTable.TryGetValue( m, out c );
|
||||
m_ContextTable.TryGetValue( m, out CraftContext c );
|
||||
|
||||
if ( c == null )
|
||||
m_ContextTable[m] = c = new CraftContext();
|
||||
|
|
@ -129,7 +128,7 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
|
||||
public void CreateItem( Mobile from, Type type, Type typeRes, BaseTool tool, CraftItem realCraftItem )
|
||||
{
|
||||
{
|
||||
// Verify if the type is in the list of the craftable item
|
||||
CraftItem craftItem = m_CraftItems.SearchFor( type );
|
||||
if ( craftItem != null )
|
||||
|
|
@ -224,7 +223,7 @@ namespace Server.Engines.Craft
|
|||
CraftItem craftItem = m_CraftItems.GetAt( index );
|
||||
craftItem.Hits = hits;
|
||||
}
|
||||
|
||||
|
||||
public void SetUseAllRes( int index, bool useAll )
|
||||
{
|
||||
CraftItem craftItem = m_CraftItems.GetAt( index );
|
||||
|
|
@ -386,4 +385,4 @@ namespace Server.Engines.Craft
|
|||
|
||||
public abstract int CanCraft( Mobile from, BaseTool tool, Type itemType );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
private static Dictionary<int, Recipe> m_Recipes = new Dictionary<int, Recipe>();
|
||||
|
||||
public static Dictionary<int, Recipe> Recipes { get { return m_Recipes; } }
|
||||
public static Dictionary<int, Recipe> Recipes => m_Recipes;
|
||||
|
||||
private static int m_LargestRecipeID;
|
||||
public static int LargestRecipeID{ get{ return m_LargestRecipeID; } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue