feat: Adds IAosItem for items with AosAttributes (#1268)

This commit is contained in:
Kamron Batman 2022-11-23 10:49:30 -08:00 committed by GitHub
parent 02cee4815e
commit df9a58dd49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 7 deletions

View file

@ -12,7 +12,7 @@ using AMT = Server.Items.ArmorMaterialType;
namespace Server.Items
{
[SerializationGenerator(9, false)]
public abstract partial class BaseArmor : Item, IScissorable, IFactionItem, ICraftable, IWearableDurability
public abstract partial class BaseArmor : Item, IScissorable, IFactionItem, ICraftable, IWearableDurability, IAosItem
{
[SerializableField(0, setter: "private")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]

View file

@ -24,7 +24,8 @@ namespace Server.Items
}
[SerializationGenerator(7, false)]
public abstract partial class BaseClothing : Item, IDyable, IScissorable, IFactionItem, ICraftable, IWearableDurability
public abstract partial class BaseClothing
: Item, IDyable, IScissorable, IFactionItem, ICraftable, IWearableDurability, IAosItem
{
[SerializableFieldSaveFlag(0)]
private bool ShouldSerializeResource() => _resource != DefaultResource;

View file

@ -19,7 +19,7 @@ public enum GemType
}
[SerializationGenerator(4, false)]
public abstract partial class BaseJewel : Item, ICraftable
public abstract partial class BaseJewel : Item, ICraftable, IAosItem
{
[EncodedInt]
[InvalidateProperties]

View file

@ -3,7 +3,7 @@ using Server.Engines.Craft;
namespace Server.Items
{
public class BaseQuiver : Container, ICraftable
public class BaseQuiver : Container, ICraftable, IAosItem
{
private static readonly Type[] m_Ammo =
{

View file

@ -28,7 +28,7 @@ namespace Server.Items
Exceptional
}
public class Spellbook : Item, ICraftable, ISlayer
public class Spellbook : Item, ICraftable, ISlayer, IAosItem
{
private static readonly Dictionary<Mobile, List<Spellbook>> m_Table = new();

View file

@ -19,7 +19,7 @@ namespace Server.Items
Wildfire = 2843
}
public class BaseTalisman : Item
public class BaseTalisman : Item, IAosItem
{
private static readonly int[] m_ItemIDs =
{

View file

@ -23,7 +23,7 @@ namespace Server.Items
SlayerName Slayer2 { get; set; }
}
public abstract class BaseWeapon : Item, IWeapon, IFactionItem, ICraftable, ISlayer, IDurability
public abstract class BaseWeapon : Item, IWeapon, IFactionItem, ICraftable, ISlayer, IDurability, IAosItem
{
private static bool _enableInstaHit;

View file

@ -304,6 +304,11 @@ namespace Server
IncreasedKarmaLoss = 0x00800000
}
public interface IAosItem
{
public AosAttributes Attributes { get; }
}
public sealed class AosAttributes : BaseAttributes
{
public AosAttributes(Item owner) : base(owner)