feat: Adds IAosItem for items with AosAttributes (#1268)
This commit is contained in:
parent
02cee4815e
commit
df9a58dd49
8 changed files with 13 additions and 7 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Server.Items
|
|||
Wildfire = 2843
|
||||
}
|
||||
|
||||
public class BaseTalisman : Item
|
||||
public class BaseTalisman : Item, IAosItem
|
||||
{
|
||||
private static readonly int[] m_ItemIDs =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue