Skip to content

Commit ca72eda

Browse files
authored
fix: FixNWFlashbangDuration (#713)
* fix: FixNWFlashbangDuration * fix: Event wasn't called when duration of the Effect was modified * using update * Revert "fix: Event wasn't called when duration of the Effect was modified" This reverts commit b41bf89. * Revert "using update" This reverts commit cf06cad.
1 parent f31a037 commit ca72eda

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// -----------------------------------------------------------------------
2+
// <copyright file="FixNWFlashbangDuration.cs" company="ExMod Team">
3+
// Copyright (c) ExMod Team. All rights reserved.
4+
// Licensed under the CC BY-SA 3.0 license.
5+
// </copyright>
6+
// -----------------------------------------------------------------------
7+
8+
namespace Exiled.Events.Patches.Fixes
9+
{
10+
using System.Collections.Generic;
11+
using System.Reflection.Emit;
12+
13+
using CustomPlayerEffects;
14+
using Exiled.API.Features.Items;
15+
using Exiled.Events.EventArgs.Player;
16+
using HarmonyLib;
17+
using InventorySystem;
18+
19+
/// <summary>
20+
/// Patches <see cref="Flashed.IntensityChanged"/> to fix NW overwritting value multiple time.
21+
/// </summary>
22+
[HarmonyPatch(typeof(Flashed), nameof(Flashed.IntensityChanged))]
23+
internal class FixNWFlashbangDuration
24+
{
25+
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
26+
{
27+
yield return new CodeInstruction(OpCodes.Ret);
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)