Skip to content

Commit

Permalink
[Resonance] Fix FlashDuration and add ConcussionDuration (by Yamato) (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
ITeMbI4 and NaoUnderscore authored Jul 20, 2024
1 parent 754adfe commit 5556b15
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Exiled.API/Features/Items/Jailbird.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ public float ChargeDamage
/// </summary>
[EProperty(category: nameof(Jailbird))]
public float FlashDuration
{
get => Base._hitreg._flashedDuration;
set => Base._hitreg._flashedDuration = value;
}

/// <summary>
/// Gets or sets the amount of time in seconds that the <see cref="CustomPlayerEffects.Concussed"/> effect will be applied on being hit.
/// </summary>
[EProperty(category: nameof(Jailbird))]
public float ConcussionDuration
{
get => Base._hitreg._concussionDuration;
set => Base._hitreg._concussionDuration = value;
Expand Down Expand Up @@ -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;
}
}
Expand Down
10 changes: 9 additions & 1 deletion Exiled.API/Features/Pickups/JailbirdPickup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ internal JailbirdPickup()
[EProperty(category: nameof(JailbirdPickup))]
public float FlashDuration { get; set; }

/// <summary>
/// Gets or sets the amount of time in seconds that the <see cref="CustomPlayerEffects.Concussed"/> effect will be applied on being hit.
/// </summary>
[EProperty(category: nameof(JailbirdPickup))]
public float ConcussionDuration { get; set; }

/// <summary>
/// Gets or sets the radius of the Jailbird's hit register.
/// </summary>
Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 5556b15

Please sign in to comment.