Skip to content

Commit

Permalink
Combine extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaioru committed Sep 20, 2024
1 parent 3166645 commit 0c8037a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System;
using System.Threading.Tasks;
using Edelstein.Protocol.Gameplay.Entities.Inventories.Modifiers;
using Edelstein.Protocol.Gameplay.Entities.Modifiers;
using Edelstein.Protocol.Gameplay.Game.Contracts.Packets.Send;
using Edelstein.Protocol.Gameplay.Game.Objects.Users.Messages;
using Edelstein.Protocol.Network.Packets.Types;
Expand All @@ -16,4 +19,10 @@ public static Task Message(this IFieldUser user, string chat)
Chat = new LPString(chat)
}
});

public static Task ModifyStats(this IFieldUser user, Action<IModifyStatContext>? action = null, bool exclRequest = false)
=> user.Modify(m => m.Stats(action, exclRequest));

public static Task ModifyInventory(this IFieldUser user, Action<IModifyInventoryContextGroup>? action = null, bool exclRequest = false)
=> user.Modify(m => m.Inventory(action, exclRequest));
}

0 comments on commit 0c8037a

Please sign in to comment.