fix: Fixes missed codegen for potions (#1359)
This commit is contained in:
parent
50d52fb25e
commit
9b6aa1deed
4 changed files with 12 additions and 31 deletions
|
|
@ -1,8 +1,11 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
|
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
||||||
public class GreaterCurePotion : BaseCurePotion
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class GreaterCurePotion : BaseCurePotion
|
||||||
{
|
{
|
||||||
private static readonly CureLevelInfo[] m_OldLevelInfo =
|
private static readonly CureLevelInfo[] _oldLevelInfo =
|
||||||
{
|
{
|
||||||
new(Poison.Lesser, 1.00), // 100% chance to cure lesser poison
|
new(Poison.Lesser, 1.00), // 100% chance to cure lesser poison
|
||||||
new(Poison.Regular, 1.00), // 100% chance to cure regular poison
|
new(Poison.Regular, 1.00), // 100% chance to cure regular poison
|
||||||
|
|
@ -11,7 +14,7 @@ public class GreaterCurePotion : BaseCurePotion
|
||||||
new(Poison.Lethal, 0.25) // 25% chance to cure lethal poison
|
new(Poison.Lethal, 0.25) // 25% chance to cure lethal poison
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly CureLevelInfo[] m_AosLevelInfo =
|
private static readonly CureLevelInfo[] _aosLevelInfo =
|
||||||
{
|
{
|
||||||
new(Poison.Lesser, 1.00),
|
new(Poison.Lesser, 1.00),
|
||||||
new(Poison.Regular, 1.00),
|
new(Poison.Regular, 1.00),
|
||||||
|
|
@ -25,23 +28,5 @@ public class GreaterCurePotion : BaseCurePotion
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public GreaterCurePotion(Serial serial) : base(serial)
|
public override CureLevelInfo[] LevelInfo => Core.AOS ? _aosLevelInfo : _oldLevelInfo;
|
||||||
{
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public override CureLevelInfo[] LevelInfo => Core.AOS ? m_AosLevelInfo : m_OldLevelInfo;
|
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,6 @@ public abstract partial class BasePoisonPotion : BasePotion
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasePoisonPotion(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract Poison Poison { get; }
|
public abstract Poison Poison { get; }
|
||||||
|
|
||||||
public abstract double MinPoisoningSkill { get; }
|
public abstract double MinPoisoningSkill { get; }
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,6 @@ public partial class StrengthPotion : BaseStrengthPotion
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public StrengthPotion(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int StrOffset => 10;
|
public override int StrOffset => 10;
|
||||||
public override TimeSpan Duration => TimeSpan.FromMinutes(2.0);
|
public override TimeSpan Duration => TimeSpan.FromMinutes(2.0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
Projects/UOContent/Migrations/Server.Items.GreaterCurePotion.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GreaterCurePotion.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.GreaterCurePotion"
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue