diff --git a/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs b/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs index 4fc078e85bc..a7e2295b751 100644 --- a/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Tools.Components; using Content.Shared.Damage.Events; using Content.Shared.Nyanotrasen.Abilities.Oni; +using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee.Events; using Content.Shared.Weapons.Ranged.Components; using Robust.Shared.Containers; @@ -19,8 +20,7 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnEntInserted); SubscribeLocalEvent(OnEntRemoved); - SubscribeLocalEvent(OnOniMeleeHit); - SubscribeLocalEvent(OnHeldMeleeHit); + SubscribeLocalEvent(OnGetMeleeDamage); SubscribeLocalEvent(OnStamHit); } @@ -55,17 +55,12 @@ private void OnEntRemoved(EntityUid uid, OniComponent component, EntRemovedFromC RemComp(args.Entity); } - private void OnOniMeleeHit(EntityUid uid, OniComponent component, MeleeHitEvent args) + private void OnGetMeleeDamage(EntityUid uid, MeleeWeaponComponent component, ref GetMeleeDamageEvent args) { - args.ModifiersList.Add(component.MeleeModifiers); - } - - private void OnHeldMeleeHit(EntityUid uid, HeldByOniComponent component, MeleeHitEvent args) - { - if (!TryComp(component.Holder, out var oni)) + if (!TryComp(args.User, out var oni)) return; - args.ModifiersList.Add(oni.MeleeModifiers); + args.Modifiers.Add(oni.MeleeModifiers); } private void OnStamHit(EntityUid uid, HeldByOniComponent component, TakeStaminaDamageEvent args)