Table of Contents

Class LegacyModule

Namespace
Nekoyume.Module
Assembly
Lib9c.dll
public static class LegacyModule
Inheritance
LegacyModule
Inherited Members

Methods

GetArenaAvatarState(IWorldState, Address, AvatarState)

public static ArenaAvatarState GetArenaAvatarState(this IWorldState worldState, Address arenaAvatarStateAddress, AvatarState avatarState)

Parameters

worldState IWorldState
arenaAvatarStateAddress Address
avatarState AvatarState

Returns

ArenaAvatarState

GetArenaInfo(IWorldState, Address, AvatarState, CharacterSheet, CostumeStatSheet)

public static (Address arenaInfoAddress, ArenaInfo arenaInfo, bool isNewArenaInfo) GetArenaInfo(this IWorldState worldState, Address weeklyArenaAddress, AvatarState avatarState, CharacterSheet characterSheet, CostumeStatSheet costumeStatSheet)

Parameters

worldState IWorldState
weeklyArenaAddress Address
avatarState AvatarState
characterSheet CharacterSheet
costumeStatSheet CostumeStatSheet

Returns

(Address arenaInfoAddress, ArenaInfo arenaInfo, bool isNewArenaInfo)

GetArenaParticipants(IWorldState, Address, int, int)

public static ArenaParticipants GetArenaParticipants(this IWorldState worldState, Address arenaParticipantsAddress, int id, int round)

Parameters

worldState IWorldState
arenaParticipantsAddress Address
id int
round int

Returns

ArenaParticipants

GetAvatarSheets(IWorldState)

public static AvatarSheets GetAvatarSheets(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

AvatarSheets

GetCombinationSlotStateLegacy(IWorldState, Address, int)

[Obsolete("Use AllCombinationSlotState.GetRuneState() instead.")]
public static CombinationSlotState GetCombinationSlotStateLegacy(this IWorldState worldState, Address avatarAddress, int index)

Parameters

worldState IWorldState
avatarAddress Address
index int

Returns

CombinationSlotState

GetCouponWallet(IWorldState, Address)

public static IImmutableDictionary<Guid, Coupon> GetCouponWallet(this IWorldState worldState, Address agentAddress)

Parameters

worldState IWorldState
agentAddress Address

Returns

IImmutableDictionary<Guid, Coupon>

GetCrystalCostState(IWorldState, Address)

public static CrystalCostState GetCrystalCostState(this IWorldState worldState, Address address)

Parameters

worldState IWorldState
address Address

Returns

CrystalCostState

GetCrystalCostStates(IWorldState, long, long)

public static (CrystalCostState DailyCostState, CrystalCostState WeeklyCostState, CrystalCostState PrevWeeklyCostState, CrystalCostState BeforePrevWeeklyCostState) GetCrystalCostStates(this IWorldState worldState, long blockIndex, long interval)

Parameters

worldState IWorldState
blockIndex long
interval long

Returns

(CrystalCostState DailyCostState, CrystalCostState WeeklyCostState, CrystalCostState PrevWeeklyCostState, CrystalCostState BeforePrevWeeklyCostState)

GetGameConfigState(IWorldState)

public static GameConfigState GetGameConfigState(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

GameConfigState

GetGoldBalanceState(IWorldState, Address, Currency)

public static GoldBalanceState GetGoldBalanceState(this IWorldState worldState, Address address, Currency currency)

Parameters

worldState IWorldState
address Address
currency Currency

Returns

GoldBalanceState

GetGoldCurrency(IWorldState)

public static Currency GetGoldCurrency(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

Currency

GetGoldDistribution(IWorldState)

public static IEnumerable<GoldDistribution> GetGoldDistribution(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

IEnumerable<GoldDistribution>

GetItemSheet(IWorldState)

public static ItemSheet GetItemSheet(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

ItemSheet

GetLegacyState(IWorldState, Address)

public static IValue GetLegacyState(this IWorldState worldState, Address address)

Parameters

worldState IWorldState
address Address

Returns

IValue

GetLegacyStates(IWorldState, IReadOnlyList<Address>)

public static IReadOnlyList<IValue?> GetLegacyStates(this IWorldState worldState, IReadOnlyList<Address> addresses)

Parameters

worldState IWorldState
addresses IReadOnlyList<Address>

Returns

IReadOnlyList<IValue>

GetLegacyStatesAsDict(IWorldState, params Address[])

public static Dictionary<Address, IValue> GetLegacyStatesAsDict(this IWorldState worldState, params Address[] addresses)

Parameters

worldState IWorldState
addresses Address[]

Returns

Dictionary<Address, IValue>

GetQuestSheet(IWorldState)

public static QuestSheet GetQuestSheet(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

QuestSheet

GetRaiderState(IWorldState, Address)

public static RaiderState GetRaiderState(this IWorldState worldState, Address raiderAddress)

Parameters

worldState IWorldState
raiderAddress Address

Returns

RaiderState

GetRaiderState(IWorldState, Address, int)

public static RaiderState GetRaiderState(this IWorldState worldState, Address avatarAddress, int raidId)

Parameters

worldState IWorldState
avatarAddress Address
raidId int

Returns

RaiderState

GetRankingSimulatorSheets(IWorldState)

public static RankingSimulatorSheets GetRankingSimulatorSheets(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

RankingSimulatorSheets

GetRankingSimulatorSheetsV1(IWorldState)

public static RankingSimulatorSheetsV1 GetRankingSimulatorSheetsV1(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

RankingSimulatorSheetsV1

GetRankingState(IWorldState)

public static RankingState GetRankingState(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

RankingState

GetRankingState0(IWorldState)

public static RankingState0 GetRankingState0(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

RankingState0

GetRankingState1(IWorldState)

public static RankingState1 GetRankingState1(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

RankingState1

GetRedeemCodeState(IWorldState)

public static RedeemCodeState GetRedeemCodeState(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

RedeemCodeState

GetSheetCsv(IWorldState, Address)

public static string GetSheetCsv(this IWorldState worldState, Address address)

Parameters

worldState IWorldState
address Address

Returns

string

GetSheetCsv<T>(IWorldState)

public static string GetSheetCsv<T>(this IWorldState worldState) where T : ISheet, new()

Parameters

worldState IWorldState

Returns

string

Type Parameters

T

GetSheet<T>(IWorldState)

public static T GetSheet<T>(this IWorldState worldState) where T : ISheet, new()

Parameters

worldState IWorldState

Returns

T

Type Parameters

T

GetSheet<T>(IWorldState, Address)

public static T GetSheet<T>(this IWorldState worldState, Address sheetAddr) where T : ISheet, new()

Parameters

worldState IWorldState
sheetAddr Address

Returns

T

Type Parameters

T

GetSheets(IWorldState, bool, bool, bool, bool, bool, bool, bool, bool, bool, IEnumerable<Type>)

public static Dictionary<Type, (Address address, ISheet sheet)> GetSheets(this IWorldState worldState, bool containAvatarSheets = false, bool containItemSheet = false, bool containQuestSheet = false, bool containSimulatorSheets = false, bool containStageSimulatorSheets = false, bool containRankingSimulatorSheets = false, bool containArenaSimulatorSheets = false, bool containValidateItemRequirementSheets = false, bool containRaidSimulatorSheets = false, IEnumerable<Type> sheetTypes = null)

Parameters

worldState IWorldState
containAvatarSheets bool
containItemSheet bool
containQuestSheet bool
containSimulatorSheets bool
containStageSimulatorSheets bool
containRankingSimulatorSheets bool
containArenaSimulatorSheets bool
containValidateItemRequirementSheets bool
containRaidSimulatorSheets bool
sheetTypes IEnumerable<Type>

Returns

Dictionary<Type, (Address address, ISheet sheet)>

GetSheets(IWorldState, params Type[])

public static Dictionary<Type, (Address address, ISheet sheet)> GetSheets(this IWorldState worldState, params Type[] sheetTypes)

Parameters

worldState IWorldState
sheetTypes Type[]

Returns

Dictionary<Type, (Address address, ISheet sheet)>

GetSheets(IWorldState, params (Type sheetType, string sheetName)[])

public static Dictionary<Type, (Address address, ISheet sheet)> GetSheets(this IWorldState worldState, params (Type sheetType, string sheetName)[] sheetTuples)

Parameters

worldState IWorldState
sheetTuples (Type sheetType, string sheetName)[]

Returns

Dictionary<Type, (Address address, ISheet sheet)>

GetSheetsV1(IWorldState, bool, bool, bool, bool, bool, bool, bool, bool, bool, IEnumerable<Type>)

public static Dictionary<Type, (Address address, ISheet sheet)> GetSheetsV1(this IWorldState worldState, bool containAvatarSheets = false, bool containItemSheet = false, bool containQuestSheet = false, bool containSimulatorSheets = false, bool containStageSimulatorSheets = false, bool containRankingSimulatorSheets = false, bool containArenaSimulatorSheets = false, bool containValidateItemRequirementSheets = false, bool containRaidSimulatorSheets = false, IEnumerable<Type> sheetTypes = null)

Parameters

worldState IWorldState
containAvatarSheets bool
containItemSheet bool
containQuestSheet bool
containSimulatorSheets bool
containStageSimulatorSheets bool
containRankingSimulatorSheets bool
containArenaSimulatorSheets bool
containValidateItemRequirementSheets bool
containRaidSimulatorSheets bool
sheetTypes IEnumerable<Type>

Returns

Dictionary<Type, (Address address, ISheet sheet)>

GetSheetsV100291(IWorldState, bool, bool, bool, bool, bool, bool, bool, bool, IEnumerable<Type>)

public static Dictionary<Type, (Address address, ISheet sheet)> GetSheetsV100291(this IWorldState worldState, bool containAvatarSheets = false, bool containItemSheet = false, bool containQuestSheet = false, bool containSimulatorSheets = false, bool containStageSimulatorSheets = false, bool containRankingSimulatorSheets = false, bool containArenaSimulatorSheets = false, bool containValidateItemRequirementSheets = false, IEnumerable<Type> sheetTypes = null)

Parameters

worldState IWorldState
containAvatarSheets bool
containItemSheet bool
containQuestSheet bool
containSimulatorSheets bool
containStageSimulatorSheets bool
containRankingSimulatorSheets bool
containArenaSimulatorSheets bool
containValidateItemRequirementSheets bool
sheetTypes IEnumerable<Type>

Returns

Dictionary<Type, (Address address, ISheet sheet)>

GetShopState(IWorldState)

public static ShopState GetShopState(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

ShopState

GetStageSimulatorSheets(IWorldState)

public static StageSimulatorSheets GetStageSimulatorSheets(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

StageSimulatorSheets

GetStageSimulatorSheetsV1(IWorldState)

public static StageSimulatorSheetsV1 GetStageSimulatorSheetsV1(this IWorldState worldState)

Parameters

worldState IWorldState

Returns

StageSimulatorSheetsV1

GetStakedAmount(IWorldState, Address)

public static FungibleAssetValue GetStakedAmount(this IWorldState worldState, Address agentAddr)

Parameters

worldState IWorldState
agentAddr Address

Returns

FungibleAssetValue

GetWeeklyArenaState(IWorldState, Address)

public static WeeklyArenaState GetWeeklyArenaState(this IWorldState worldState, Address address)

Parameters

worldState IWorldState
address Address

Returns

WeeklyArenaState

GetWeeklyArenaState(IWorldState, int)

public static WeeklyArenaState GetWeeklyArenaState(this IWorldState worldState, int index)

Parameters

worldState IWorldState
index int

Returns

WeeklyArenaState

MarkBalanceChanged(IWorld, IActionContext, Currency, params Address[])

public static IWorld MarkBalanceChanged(this IWorld world, IActionContext context, Currency currency, params Address[] accounts)

Parameters

world IWorld
context IActionContext
currency Currency
accounts Address[]

Returns

IWorld

Mead(IWorld, IActionContext, Address, BigInteger)

public static IWorld Mead(this IWorld world, IActionContext context, Address signer, BigInteger rawValue)

Parameters

world IWorld
context IActionContext
signer Address
rawValue BigInteger

Returns

IWorld

RemoveLegacyState(IWorld, Address)

public static IWorld RemoveLegacyState(this IWorld world, Address address)

Parameters

world IWorld
address Address

Returns

IWorld

SetCouponWallet(IWorld, Address, IImmutableDictionary<Guid, Coupon>)

public static IWorld SetCouponWallet(this IWorld world, Address agentAddress, IImmutableDictionary<Guid, Coupon> couponWallet)

Parameters

world IWorld
agentAddress Address
couponWallet IImmutableDictionary<Guid, Coupon>

Returns

IWorld

SetLegacyState(IWorld, Address, IValue)

public static IWorld SetLegacyState(this IWorld world, Address address, IValue state)

Parameters

world IWorld
address Address
state IValue

Returns

IWorld

SetWorldBossKillReward(IWorld, IActionContext, Address, WorldBossKillRewardRecord, int, WorldBossState, RuneWeightSheet, WorldBossKillRewardSheet, RuneSheet, MaterialItemSheet, IRandom, Inventory, Address, Address)

public static IWorld SetWorldBossKillReward(this IWorld world, IActionContext context, Address rewardInfoAddress, WorldBossKillRewardRecord rewardRecord, int rank, WorldBossState bossState, RuneWeightSheet runeWeightSheet, WorldBossKillRewardSheet worldBossKillRewardSheet, RuneSheet runeSheet, MaterialItemSheet materialItemSheet, IRandom random, Inventory inventory, Address avatarAddress, Address agentAddress)

Parameters

world IWorld
context IActionContext
rewardInfoAddress Address
rewardRecord WorldBossKillRewardRecord
rank int
bossState WorldBossState
runeWeightSheet RuneWeightSheet
worldBossKillRewardSheet WorldBossKillRewardSheet
runeSheet RuneSheet
materialItemSheet MaterialItemSheet
random IRandom
inventory Inventory
avatarAddress Address
agentAddress Address

Returns

IWorld

TryGetArenaAvatarState(IWorldState, Address, out ArenaAvatarState)

public static bool TryGetArenaAvatarState(this IWorldState worldState, Address arenaAvatarStateAddress, out ArenaAvatarState arenaAvatarState)

Parameters

worldState IWorldState
arenaAvatarStateAddress Address
arenaAvatarState ArenaAvatarState

Returns

bool

TryGetArenaInformation(IWorldState, Address, out ArenaInformation)

public static bool TryGetArenaInformation(this IWorldState worldState, Address arenaInformationAddress, out ArenaInformation arenaInformation)

Parameters

worldState IWorldState
arenaInformationAddress Address
arenaInformation ArenaInformation

Returns

bool

TryGetArenaParticipants(IWorldState, Address, out ArenaParticipants)

public static bool TryGetArenaParticipants(this IWorldState worldState, Address arenaParticipantsAddress, out ArenaParticipants arenaParticipants)

Parameters

worldState IWorldState
arenaParticipantsAddress Address
arenaParticipants ArenaParticipants

Returns

bool

TryGetArenaScore(IWorldState, Address, out ArenaScore)

public static bool TryGetArenaScore(this IWorldState worldState, Address arenaScoreAddress, out ArenaScore arenaScore)

Parameters

worldState IWorldState
arenaScoreAddress Address
arenaScore ArenaScore

Returns

bool

TryGetGoldBalance(IWorldState, Address, Currency, out FungibleAssetValue)

public static bool TryGetGoldBalance(this IWorldState worldState, Address address, Currency currency, out FungibleAssetValue balance)

Parameters

worldState IWorldState
address Address
currency Currency
balance FungibleAssetValue

Returns

bool

TryGetLegacyStakeState(IWorldState, Address, out LegacyStakeState)

public static bool TryGetLegacyStakeState(this IWorldState worldState, Address agentAddress, out LegacyStakeState legacyStakeState)

Parameters

worldState IWorldState
agentAddress Address
legacyStakeState LegacyStakeState

Returns

bool

TryGetLegacyState<T>(IWorldState, Address, out T)

public static bool TryGetLegacyState<T>(this IWorldState worldState, Address address, out T result) where T : IValue

Parameters

worldState IWorldState
address Address
result T

Returns

bool

Type Parameters

T

TryGetSheet<T>(IWorldState, Address, out T)

public static bool TryGetSheet<T>(this IWorldState worldState, Address address, out T sheet) where T : ISheet, new()

Parameters

worldState IWorldState
address Address
sheet T

Returns

bool

Type Parameters

T

TryGetSheet<T>(IWorldState, out T)

public static bool TryGetSheet<T>(this IWorldState worldState, out T sheet) where T : ISheet, new()

Parameters

worldState IWorldState
sheet T

Returns

bool

Type Parameters

T

TryGetStakeState(IWorldState, Address, out StakeState)

public static bool TryGetStakeState(this IWorldState worldState, Address agentAddr, out StakeState stakeState)

Parameters

worldState IWorldState
agentAddr Address
stakeState StakeState

Returns

bool

ValidateWorldId(IWorldState, Address, int)

public static void ValidateWorldId(this IWorldState worldState, Address avatarAddress, int worldId)

Parameters

worldState IWorldState
avatarAddress Address
worldId int