Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apply interface to RapidCombination action #2867

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Lib9c.Abstractions/IRapidCombinationV2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#nullable enable

using System.Collections.Generic;
using Libplanet.Crypto;

namespace Lib9c.Abstractions
{
public interface IRapidCombinationV2
{
Address AvatarAddress { get; }
List<int> SlotIndexList { get; }
}
}
6 changes: 5 additions & 1 deletion Lib9c/Action/RapidCombination.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Immutable;
using System.Linq;
using Bencodex.Types;
using Lib9c.Abstractions;
using Libplanet.Action;
using Libplanet.Action.State;
using Libplanet.Crypto;
Expand All @@ -22,11 +23,14 @@ namespace Nekoyume.Action
/// </summary>
[Serializable]
[ActionType("rapid_combination10")]
public class RapidCombination : GameAction
public class RapidCombination : GameAction, IRapidCombinationV2
{
public Address avatarAddress;
public List<int> slotIndexList = new List<int>();

Address IRapidCombinationV2.AvatarAddress => avatarAddress;
List<int> IRapidCombinationV2.SlotIndexList => slotIndexList;

public override IWorld Execute(IActionContext context)
{
context.UseGas(1);
Expand Down
Loading