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
|
|
@ -4,45 +4,45 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Factions
|
||||
{
|
||||
public class FactionItemDefinition
|
||||
{
|
||||
public int SilverCost { get; }
|
||||
public class FactionItemDefinition
|
||||
{
|
||||
private static FactionItemDefinition m_MetalArmor = new FactionItemDefinition(1000, typeof(Blacksmith));
|
||||
private static FactionItemDefinition m_Weapon = new FactionItemDefinition(1000, typeof(Blacksmith));
|
||||
private static FactionItemDefinition m_RangedWeapon = new FactionItemDefinition(1000, typeof(Bowyer));
|
||||
private static FactionItemDefinition m_LeatherArmor = new FactionItemDefinition(750, typeof(Tailor));
|
||||
private static FactionItemDefinition m_Clothing = new FactionItemDefinition(200, typeof(Tailor));
|
||||
private static FactionItemDefinition m_Scroll = new FactionItemDefinition(500, typeof(Mage));
|
||||
|
||||
public Type VendorType { get; }
|
||||
public FactionItemDefinition(int silverCost, Type vendorType)
|
||||
{
|
||||
SilverCost = silverCost;
|
||||
VendorType = vendorType;
|
||||
}
|
||||
|
||||
public FactionItemDefinition( int silverCost, Type vendorType )
|
||||
{
|
||||
SilverCost = silverCost;
|
||||
VendorType = vendorType;
|
||||
}
|
||||
public int SilverCost{ get; }
|
||||
|
||||
private static FactionItemDefinition m_MetalArmor = new FactionItemDefinition( 1000, typeof( Blacksmith ) );
|
||||
private static FactionItemDefinition m_Weapon = new FactionItemDefinition( 1000, typeof( Blacksmith ) );
|
||||
private static FactionItemDefinition m_RangedWeapon = new FactionItemDefinition( 1000, typeof( Bowyer ) );
|
||||
private static FactionItemDefinition m_LeatherArmor = new FactionItemDefinition( 750, typeof( Tailor ) );
|
||||
private static FactionItemDefinition m_Clothing = new FactionItemDefinition( 200, typeof( Tailor ) );
|
||||
private static FactionItemDefinition m_Scroll = new FactionItemDefinition( 500, typeof( Mage ) );
|
||||
public Type VendorType{ get; }
|
||||
|
||||
public static FactionItemDefinition Identify( Item item )
|
||||
{
|
||||
if ( item is BaseArmor armor )
|
||||
{
|
||||
if ( CraftResources.GetType( armor.Resource ) == CraftResourceType.Leather )
|
||||
return m_LeatherArmor;
|
||||
public static FactionItemDefinition Identify(Item item)
|
||||
{
|
||||
if (item is BaseArmor armor)
|
||||
{
|
||||
if (CraftResources.GetType(armor.Resource) == CraftResourceType.Leather)
|
||||
return m_LeatherArmor;
|
||||
|
||||
return m_MetalArmor;
|
||||
}
|
||||
return m_MetalArmor;
|
||||
}
|
||||
|
||||
if ( item is BaseRanged )
|
||||
return m_RangedWeapon;
|
||||
if ( item is BaseWeapon )
|
||||
return m_Weapon;
|
||||
if ( item is BaseClothing )
|
||||
return m_Clothing;
|
||||
if ( item is SpellScroll )
|
||||
return m_Scroll;
|
||||
if (item is BaseRanged)
|
||||
return m_RangedWeapon;
|
||||
if (item is BaseWeapon)
|
||||
return m_Weapon;
|
||||
if (item is BaseClothing)
|
||||
return m_Clothing;
|
||||
if (item is SpellScroll)
|
||||
return m_Scroll;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue