fix: Codegens tools (#1354)
This commit is contained in:
parent
5c99d0cb38
commit
bf6da39176
61 changed files with 1827 additions and 2266 deletions
|
|
@ -1,85 +1,68 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x13E4, 0x13E3)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class RunicHammer : BaseRunicTool
|
||||
{
|
||||
[Flippable(0x13E4, 0x13E3)]
|
||||
public class RunicHammer : BaseRunicTool
|
||||
[Constructible]
|
||||
public RunicHammer(CraftResource resource) : base(resource, 0x13E3)
|
||||
{
|
||||
[Constructible]
|
||||
public RunicHammer(CraftResource resource) : base(resource, 0x13E3)
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RunicHammer(CraftResource resource, int uses) : base(resource, uses, 0x13E3)
|
||||
{
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
}
|
||||
|
||||
public override CraftSystem CraftSystem => DefBlacksmithy.CraftSystem;
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RunicHammer(CraftResource resource, int uses) : base(resource, uses, 0x13E3)
|
||||
{
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
}
|
||||
|
||||
public RunicHammer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override CraftSystem CraftSystem => DefBlacksmithy.CraftSystem;
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
var index = CraftResources.GetIndex(Resource);
|
||||
|
||||
if (index >= 1 && index <= 8)
|
||||
{
|
||||
return 1049019 + index;
|
||||
}
|
||||
|
||||
return 1045128; // runic smithy hammer
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
var index = CraftResources.GetIndex(Resource);
|
||||
|
||||
if (index >= 1 && index <= 8)
|
||||
{
|
||||
return;
|
||||
return 1049019 + index;
|
||||
}
|
||||
|
||||
if (!CraftResources.IsStandard(Resource))
|
||||
return 1045128; // runic smithy hammer
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
var index = CraftResources.GetIndex(Resource);
|
||||
|
||||
if (index >= 1 && index <= 8)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CraftResources.IsStandard(Resource))
|
||||
{
|
||||
var num = CraftResources.GetLocalizationNumber(Resource);
|
||||
|
||||
if (num > 0)
|
||||
{
|
||||
var num = CraftResources.GetLocalizationNumber(Resource);
|
||||
|
||||
if (num > 0)
|
||||
{
|
||||
list.Add(num);
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(CraftResources.GetName(Resource));
|
||||
}
|
||||
list.Add(num);
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(CraftResources.GetName(Resource));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue