Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -7,8 +7,8 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
private static CraftSystem m_CraftSystem;
|
||||
|
||||
private static Type typeofAnvil = typeof(AnvilAttribute);
|
||||
private static Type typeofForge = typeof(ForgeAttribute);
|
||||
private static readonly Type typeofAnvil = typeof(AnvilAttribute);
|
||||
private static readonly Type typeofForge = typeof(ForgeAttribute);
|
||||
|
||||
private DefBlacksmithy() : base(1, 1, 1.25) // base( 1, 2, 1.7 )
|
||||
{
|
||||
|
|
@ -16,9 +16,9 @@ namespace Server.Engines.Craft
|
|||
|
||||
base( MinCraftEffect, MaxCraftEffect, Delay )
|
||||
|
||||
MinCraftEffect : The minimum number of time the mobile will play the craft effect
|
||||
MaxCraftEffect : The maximum number of time the mobile will play the craft effect
|
||||
Delay : The delay between each craft effect
|
||||
MinCraftEffect : The minimum number of time the mobile will play the craft effect
|
||||
MaxCraftEffect : The maximum number of time the mobile will play the craft effect
|
||||
Delay : The delay between each craft effect
|
||||
|
||||
Example: (3, 6, 1.7) would make the mobile do the PlayCraftEffect override
|
||||
function between 3 and 6 time, with a 1.7 second delay each time.
|
||||
|
|
@ -55,7 +55,7 @@ namespace Server.Engines.Craft
|
|||
bool isAnvil = type.IsDefined(typeofAnvil, false) || item.ItemID == 4015 || item.ItemID == 4016 ||
|
||||
item.ItemID == 0x2DD5 || item.ItemID == 0x2DD6;
|
||||
bool isForge = type.IsDefined(typeofForge, false) || item.ItemID == 4017 ||
|
||||
item.ItemID >= 6522 && item.ItemID <= 6569 || item.ItemID == 0x2DD8;
|
||||
(item.ItemID >= 6522 && item.ItemID <= 6569) || item.ItemID == 0x2DD8;
|
||||
|
||||
if (isAnvil || isForge)
|
||||
{
|
||||
|
|
@ -73,28 +73,28 @@ namespace Server.Engines.Craft
|
|||
eable.Free();
|
||||
|
||||
for (int x = -range; (!anvil || !forge) && x <= range; ++x)
|
||||
for (int y = -range; (!anvil || !forge) && y <= range; ++y)
|
||||
{
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles(from.X + x, from.Y + y, true);
|
||||
|
||||
for (int i = 0; (!anvil || !forge) && i < tiles.Length; ++i)
|
||||
for (int y = -range; (!anvil || !forge) && y <= range; ++y)
|
||||
{
|
||||
int id = tiles[i].ID;
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles(from.X + x, from.Y + y, true);
|
||||
|
||||
bool isAnvil = id == 4015 || id == 4016 || id == 0x2DD5 || id == 0x2DD6;
|
||||
bool isForge = id == 4017 || id >= 6522 && id <= 6569 || id == 0x2DD8;
|
||||
|
||||
if (isAnvil || isForge)
|
||||
for (int i = 0; (!anvil || !forge) && i < tiles.Length; ++i)
|
||||
{
|
||||
if (from.Z + 16 < tiles[i].Z || tiles[i].Z + 16 < from.Z ||
|
||||
!from.InLOS(new Point3D(from.X + x, from.Y + y, tiles[i].Z + tiles[i].Height / 2 + 1)))
|
||||
continue;
|
||||
int id = tiles[i].ID;
|
||||
|
||||
anvil = anvil || isAnvil;
|
||||
forge = forge || isForge;
|
||||
bool isAnvil = id == 4015 || id == 4016 || id == 0x2DD5 || id == 0x2DD6;
|
||||
bool isForge = id == 4017 || (id >= 6522 && id <= 6569) || id == 0x2DD8;
|
||||
|
||||
if (isAnvil || isForge)
|
||||
{
|
||||
if (from.Z + 16 < tiles[i].Z || tiles[i].Z + 16 < from.Z ||
|
||||
!from.InLOS(new Point3D(from.X + x, from.Y + y, tiles[i].Z + tiles[i].Height / 2 + 1)))
|
||||
continue;
|
||||
|
||||
anvil = anvil || isAnvil;
|
||||
forge = forge || isForge;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||
|
|
@ -117,9 +117,9 @@ namespace Server.Engines.Craft
|
|||
public override void PlayCraftEffect(Mobile from)
|
||||
{
|
||||
// no animation, instant sound
|
||||
//if ( from.Body.Type == BodyType.Human && !from.Mounted )
|
||||
// from.Animate( 9, 5, 1, true, false, 0 );
|
||||
//new InternalTimer( from ).Start();
|
||||
// if (from.Body.Type == BodyType.Human && !from.Mounted)
|
||||
// from.Animate( 9, 5, 1, true, false, 0 );
|
||||
// new InternalTimer( from ).Start();
|
||||
|
||||
from.PlaySound(0x2A);
|
||||
}
|
||||
|
|
@ -152,13 +152,13 @@ namespace Server.Engines.Craft
|
|||
Syntax for a SIMPLE craft item
|
||||
AddCraft( ObjectType, Group, MinSkill, MaxSkill, ResourceType, Amount, Message )
|
||||
|
||||
ObjectType : The type of the object you want to add to the build list.
|
||||
Group : The group in which the object will be showed in the craft menu.
|
||||
MinSkill : The minimum of skill value
|
||||
MaxSkill : The maximum of skill value
|
||||
ResourceType : The type of the resource the mobile need to create the item
|
||||
Amount : The amount of the ResourceType it need to create the item
|
||||
Message : String or Int for Localized. The message that will be sent to the mobile, if the specified resource is missing.
|
||||
ObjectType : The type of the object you want to add to the build list.
|
||||
Group : The group in which the object will be showed in the craft menu.
|
||||
MinSkill : The minimum of skill value
|
||||
MaxSkill : The maximum of skill value
|
||||
ResourceType : The type of the resource the mobile need to create the item
|
||||
Amount : The amount of the ResourceType it need to create the item
|
||||
Message : String or Int for Localized. The message that will be sent to the mobile, if the specified resource is missing.
|
||||
|
||||
Syntax for a COMPLEX craft item. A complex item is an item that need either more than
|
||||
only one skill, or more than only one resource.
|
||||
|
|
@ -166,27 +166,17 @@ namespace Server.Engines.Craft
|
|||
Coming soon....
|
||||
*/
|
||||
|
||||
#region Ringmail
|
||||
|
||||
AddCraft(typeof(RingmailGloves), 1011076, 1025099, 12.0, 62.0, typeof(IronIngot), 1044036, 10, 1044037);
|
||||
AddCraft(typeof(RingmailLegs), 1011076, 1025104, 19.4, 69.4, typeof(IronIngot), 1044036, 16, 1044037);
|
||||
AddCraft(typeof(RingmailArms), 1011076, 1025103, 16.9, 66.9, typeof(IronIngot), 1044036, 14, 1044037);
|
||||
AddCraft(typeof(RingmailChest), 1011076, 1025100, 21.9, 71.9, typeof(IronIngot), 1044036, 18, 1044037);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Chainmail
|
||||
|
||||
AddCraft(typeof(ChainCoif), 1011077, 1025051, 14.5, 64.5, typeof(IronIngot), 1044036, 10, 1044037);
|
||||
AddCraft(typeof(ChainLegs), 1011077, 1025054, 36.7, 86.7, typeof(IronIngot), 1044036, 18, 1044037);
|
||||
AddCraft(typeof(ChainChest), 1011077, 1025055, 39.1, 89.1, typeof(IronIngot), 1044036, 20, 1044037);
|
||||
|
||||
#endregion
|
||||
|
||||
int index;
|
||||
|
||||
#region Platemail
|
||||
|
||||
AddCraft(typeof(PlateArms), 1011078, 1025136, 66.3, 116.3, typeof(IronIngot), 1044036, 18, 1044037);
|
||||
AddCraft(typeof(PlateGloves), 1011078, 1025140, 58.9, 108.9, typeof(IronIngot), 1044036, 12, 1044037);
|
||||
AddCraft(typeof(PlateGorget), 1011078, 1025139, 56.4, 106.4, typeof(IronIngot), 1044036, 10, 1044037);
|
||||
|
|
@ -203,7 +193,7 @@ namespace Server.Engines.Craft
|
|||
SetNeededExpansion(index, Expansion.SE);
|
||||
|
||||
index = AddCraft(typeof(PlateDo), 1011078, 1030184, 80.0, 130.0, typeof(IronIngot), 1044036, 28,
|
||||
1044037); //Double check skill
|
||||
1044037); // Double check skill
|
||||
SetNeededExpansion(index, Expansion.SE);
|
||||
|
||||
index = AddCraft(typeof(PlateHiroSode), 1011078, 1030187, 80.0, 130.0, typeof(IronIngot), 1044036, 16,
|
||||
|
|
@ -219,10 +209,6 @@ namespace Server.Engines.Craft
|
|||
SetNeededExpansion(index, Expansion.SE);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helmets
|
||||
|
||||
AddCraft(typeof(Bascinet), 1011079, 1025132, 8.3, 58.3, typeof(IronIngot), 1044036, 15, 1044037);
|
||||
AddCraft(typeof(CloseHelm), 1011079, 1025128, 37.9, 87.9, typeof(IronIngot), 1044036, 15, 1044037);
|
||||
AddCraft(typeof(Helmet), 1011079, 1025130, 37.9, 87.9, typeof(IronIngot), 1044036, 15, 1044037);
|
||||
|
|
@ -281,10 +267,6 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Shields
|
||||
|
||||
AddCraft(typeof(Buckler), 1011080, 1027027, -25.0, 25.0, typeof(IronIngot), 1044036, 10, 1044037);
|
||||
AddCraft(typeof(BronzeShield), 1011080, 1027026, -15.2, 34.8, typeof(IronIngot), 1044036, 12, 1044037);
|
||||
AddCraft(typeof(HeaterShield), 1011080, 1027030, 24.3, 74.3, typeof(IronIngot), 1044036, 18, 1044037);
|
||||
|
|
@ -298,10 +280,6 @@ namespace Server.Engines.Craft
|
|||
AddCraft(typeof(OrderShield), 1011080, 1027108, 85.0, 135.0, typeof(IronIngot), 1044036, 25, 1044037);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bladed
|
||||
|
||||
if (Core.AOS)
|
||||
AddCraft(typeof(BoneHarvester), 1011081, 1029915, 33.0, 83.0, typeof(IronIngot), 1044036, 10, 1044037);
|
||||
|
||||
|
|
@ -581,10 +559,6 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Axes
|
||||
|
||||
AddCraft(typeof(Axe), 1011082, 1023913, 34.2, 84.2, typeof(IronIngot), 1044036, 14, 1044037);
|
||||
AddCraft(typeof(BattleAxe), 1011082, 1023911, 30.5, 80.5, typeof(IronIngot), 1044036, 14, 1044037);
|
||||
AddCraft(typeof(DoubleAxe), 1011082, 1023915, 29.3, 79.3, typeof(IronIngot), 1044036, 12, 1044037);
|
||||
|
|
@ -622,10 +596,6 @@ namespace Server.Engines.Craft
|
|||
SetNeededExpansion(index, Expansion.ML);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pole Arms
|
||||
|
||||
AddCraft(typeof(Bardiche), 1011083, 1023917, 31.7, 81.7, typeof(IronIngot), 1044036, 18, 1044037);
|
||||
|
||||
if (Core.AOS)
|
||||
|
|
@ -651,11 +621,7 @@ namespace Server.Engines.Craft
|
|||
AddCraft(typeof(WarFork), 1011083, 1025125, 42.9, 92.9, typeof(IronIngot), 1044036, 12, 1044037);
|
||||
|
||||
// Not craftable (is this an AOS change ??)
|
||||
//AddCraft( typeof( Pitchfork ), 1011083, 1023720, 36.1, 86.1, typeof( IronIngot ), 1044036, 12, 1044037 );
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bashing
|
||||
// AddCraft( typeof( Pitchfork ), 1011083, 1023720, 36.1, 86.1, typeof( IronIngot ), 1044036, 12, 1044037 );
|
||||
|
||||
AddCraft(typeof(HammerPick), 1011084, 1025181, 34.2, 84.2, typeof(IronIngot), 1044036, 16, 1044037);
|
||||
AddCraft(typeof(Mace), 1011084, 1023932, 14.5, 64.5, typeof(IronIngot), 1044036, 6, 1044037);
|
||||
|
|
@ -714,10 +680,6 @@ namespace Server.Engines.Craft
|
|||
SetNeededExpansion(index, Expansion.ML);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Dragon Scale Armor
|
||||
|
||||
index = AddCraft(typeof(DragonGloves), 1053114, 1029795, 68.9, 118.9, typeof(RedScales), 1060883, 16, 1060884);
|
||||
SetUseSubRes2(index, true);
|
||||
|
||||
|
|
@ -733,8 +695,6 @@ namespace Server.Engines.Craft
|
|||
index = AddCraft(typeof(DragonChest), 1053114, 1029793, 85.0, 135.0, typeof(RedScales), 1060883, 36, 1060884);
|
||||
SetUseSubRes2(index, true);
|
||||
|
||||
#endregion
|
||||
|
||||
// Set the overridable material
|
||||
SetSubRes(typeof(IronIngot), 1044022);
|
||||
|
||||
|
|
@ -768,7 +728,7 @@ namespace Server.Engines.Craft
|
|||
// Delay to synchronize the sound with the hit on the anvil
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_From;
|
||||
private readonly Mobile m_From;
|
||||
|
||||
public InternalTimer(Mobile from) : base(TimeSpan.FromSeconds(0.7)) => m_From = from;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue