Skip to content

Commit

Permalink
Merge pull request #2867 from planetarium/feat/apply-interface-to-rap…
Browse files Browse the repository at this point in the history
…id-combination

feat: apply interface to `RapidCombination` action
  • Loading branch information
boscohyun authored Oct 11, 2024
2 parents e976cfe + 9e51107 commit 9c6208e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
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();

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

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

0 comments on commit 9c6208e

Please sign in to comment.