Skip to content

Commit da46618

Browse files
committed
Added clear methods
1 parent c731e9b commit da46618

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

TLibrary/Helpers/Unturned/UEffectHelper.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,5 +506,23 @@ public static void SendUIEffectVisibility(short key, ITransportConnection transp
506506
/// <param name="visibility">The visibility state to set.</param>
507507
public static void SendUIEffectVisibility(ushort key, ITransportConnection transportConnection, bool reliable,
508508
string childNameOrPath, bool visibility) => SendUIEffectVisibility((short)key, transportConnection, reliable, childNameOrPath, visibility);
509+
510+
/// <summary>
511+
/// Clears a specific effect by its ID for the specified transport connection.
512+
/// </summary>
513+
/// <param name="key">The ID of the effect to clear.</param>
514+
/// <param name="transportConnection">The transport connection to clear the effect for.</param>
515+
public static void AskEffectClearByID(ushort key, ITransportConnection transportConnection)
516+
{
517+
MainThreadDispatcher.RunOnMainThread(() => EffectManager.askEffectClearByID(key, transportConnection));
518+
}
519+
520+
/// <summary>
521+
/// Clears all effects for all transport connections.
522+
/// </summary>
523+
public static void AskEffectClearAll()
524+
{
525+
MainThreadDispatcher.RunOnMainThread(EffectManager.askEffectClearAll);
526+
}
509527
}
510528
}

0 commit comments

Comments
 (0)