From 5556b15e3f1a1cf53eae3b3d74ed41ad952ead49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artem=20Ko=C5=A1ilinskis?= <46756889+ITeMbI4@users.noreply.github.com> Date: Sat, 20 Jul 2024 18:42:43 +0200 Subject: [PATCH] [Resonance] Fix FlashDuration and add ConcussionDuration (by Yamato) (#2740) * Fix FlashDuration and add ConcussionDuration * Update Exiled.API/Features/Items/Jailbird.cs Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Update Exiled.API/Features/Items/Jailbird.cs Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> --- Exiled.API/Features/Items/Jailbird.cs | 11 +++++++++++ Exiled.API/Features/Pickups/JailbirdPickup.cs | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Exiled.API/Features/Items/Jailbird.cs b/Exiled.API/Features/Items/Jailbird.cs index 1dedba66e9..3ace5896da 100644 --- a/Exiled.API/Features/Items/Jailbird.cs +++ b/Exiled.API/Features/Items/Jailbird.cs @@ -75,6 +75,16 @@ public float ChargeDamage /// [EProperty(category: nameof(Jailbird))] public float FlashDuration + { + get => Base._hitreg._flashedDuration; + set => Base._hitreg._flashedDuration = value; + } + + /// + /// Gets or sets the amount of time in seconds that the effect will be applied on being hit. + /// + [EProperty(category: nameof(Jailbird))] + public float ConcussionDuration { get => Base._hitreg._concussionDuration; set => Base._hitreg._concussionDuration = value; @@ -200,6 +210,7 @@ internal override void ReadPickupInfo(Pickup pickup) MeleeDamage = jailbirdPickup.MeleeDamage; ChargeDamage = jailbirdPickup.ChargeDamage; FlashDuration = jailbirdPickup.FlashDuration; + ConcussionDuration = jailbirdPickup.ConcussionDuration; Radius = jailbirdPickup.Radius; } } diff --git a/Exiled.API/Features/Pickups/JailbirdPickup.cs b/Exiled.API/Features/Pickups/JailbirdPickup.cs index f74be2f7d2..81318531ee 100644 --- a/Exiled.API/Features/Pickups/JailbirdPickup.cs +++ b/Exiled.API/Features/Pickups/JailbirdPickup.cs @@ -63,6 +63,12 @@ internal JailbirdPickup() [EProperty(category: nameof(JailbirdPickup))] public float FlashDuration { get; set; } + /// + /// Gets or sets the amount of time in seconds that the effect will be applied on being hit. + /// + [EProperty(category: nameof(JailbirdPickup))] + public float ConcussionDuration { get; set; } + /// /// Gets or sets the radius of the Jailbird's hit register. /// @@ -115,6 +121,7 @@ internal override void ReadItemInfo(Item item) MeleeDamage = jailBirditem.MeleeDamage; ChargeDamage = jailBirditem.ChargeDamage; FlashDuration = jailBirditem.FlashDuration; + ConcussionDuration = jailBirditem.ConcussionDuration; Radius = jailBirditem.Radius; } } @@ -127,7 +134,8 @@ protected override void InitializeProperties(ItemBase itemBase) { MeleeDamage = jailbirdItem._hitreg._damageMelee; ChargeDamage = jailbirdItem._hitreg._damageCharge; - FlashDuration = jailbirdItem._hitreg._concussionDuration; + FlashDuration = jailbirdItem._hitreg._flashedDuration; + ConcussionDuration = jailbirdItem._hitreg._concussionDuration; Radius = jailbirdItem._hitreg._hitregRadius; } }