/// <summary> /// Initializes a new instance of the <see cref="ChangingAttachmentsEventArgs"/> class. /// </summary> /// <param name="item"><inheritdoc cref="ChangingAttributesEventArgs.OldItem"/></param> /// <param name="newSight"><inheritdoc cref="NewSight"/></param> /// <param name="newBarrel"><inheritdoc cref="NewBarrel"/></param> /// <param name="newOther"><inheritdoc cref="NewOther"/></param> /// <param name="isAllowed"><inheritdoc cref="ChangingAttributesEventArgs.IsAllowed"/></param> public ChangingAttachmentsEventArgs(Firearm item, SightType newSight, BarrelType newBarrel, OtherType newOther, bool isAllowed = true) : base(item, item, isAllowed) { NewSight = newSight; NewBarrel = newBarrel; NewOther = newOther; OldItem = (API.Features.Items.Firearm)Item.Get(item); }
/// <summary> /// Initializes a new instance of the <see cref="ChangingDurabilityEventArgs"/> class. /// </summary> /// <param name="player"><inheritdoc cref="Player"/></param> /// <param name="firearm"><inheritdoc cref="Firearm"/></param> /// <param name="oldDurability"><inheritdoc cref="OldDurability"/></param> /// <param name="newDurability"><inheritdoc cref="NewDurability"/></param> /// <param name="isAllowed"><inheritdoc cref="IsAllowed"/></param> public ChangingDurabilityEventArgs(Player player, InventorySystem.Items.Firearms.Firearm firearm, byte oldDurability, byte newDurability, bool isAllowed = true) { Player = player; Firearm = (Firearm)Item.Get(firearm); OldDurability = oldDurability; NewDurability = newDurability; IsAllowed = isAllowed; }