Table of Contents

Class CombinationSlotState

Namespace
Nekoyume.Model.State
Assembly
Lib9c.dll
public class CombinationSlotState : State, IState
Inheritance
CombinationSlotState
Implements
Inherited Members
Extension Methods

Constructors

CombinationSlotState(Dictionary)

public CombinationSlotState(Dictionary serialized)

Parameters

serialized Dictionary

CombinationSlotState(Address, int)

public CombinationSlotState(Address address, int index = 0)

Parameters

address Address
index int

Fields

DeriveFormat

public const string DeriveFormat = "combination-slot-{0}"

Field Value

string

Properties

Index

It is a CombinationSlot index. start from 0.

public int Index { get; set; }

Property Value

int

IsUnlocked

public bool IsUnlocked { get; }

Property Value

bool

PetId

public int? PetId { get; }

Property Value

int?

RequiredBlockIndex

public long RequiredBlockIndex { get; }

Property Value

long

Result

public AttachmentActionResult Result { get; }

Property Value

AttachmentActionResult

WorkCompleteBlockIndex

Serialize key is "unlockBlockIndex".

public long WorkCompleteBlockIndex { get; }

Property Value

long

WorkStartBlockIndex

Serialize key is "startBlockIndex".

public long WorkStartBlockIndex { get; }

Property Value

long

Methods

DeriveAddress(Address, int)

Is only used for migration legacy state.

public static Address DeriveAddress(Address address, int slotIndex)

Parameters

address Address
slotIndex int

Returns

Address

Serialize()

public override IValue Serialize()

Returns

IValue

Unlock()

public bool Unlock()

Returns

bool

Update(AttachmentActionResult, long, long, int?)

public void Update(AttachmentActionResult result, long blockIndex, long workCompleteBlockIndex, int? petId = null)

Parameters

result AttachmentActionResult
blockIndex long
workCompleteBlockIndex long
petId int?

Update(long)

public void Update(long blockIndex)

Parameters

blockIndex long

Update(long, Material, int)

public void Update(long blockIndex, Material material, int count)

Parameters

blockIndex long
material Material
count int

UpdateV2(long, Material, int)

public void UpdateV2(long blockIndex, Material material, int count)

Parameters

blockIndex long
material Material
count int

Validate(AvatarState, long)

[Obsolete("Use ValidateV2")]
public bool Validate(AvatarState avatarState, long blockIndex)

Parameters

avatarState AvatarState
blockIndex long

Returns

bool

ValidateSlotIndex(int)

public static bool ValidateSlotIndex(int index)

Parameters

index int

Returns

bool

ValidateV2(long)

public bool ValidateV2(long blockIndex)

Parameters

blockIndex long

Returns

bool