Table of Contents

Class ArenaParticipant

Namespace
Nekoyume.Model.Arena
Assembly
Lib9c.dll

This class combines the information from ArenaScore and ArenaInformation, and brings together information about the arena participant, including additional information.

public class ArenaParticipant : IBencodable, IState
Inheritance
ArenaParticipant
Implements
IBencodable
Inherited Members

Constructors

ArenaParticipant(IValue)

public ArenaParticipant(IValue bencoded)

Parameters

bencoded IValue

ArenaParticipant(Address)

public ArenaParticipant(Address avatarAddr)

Parameters

avatarAddr Address

Fields

AvatarAddr

public readonly Address AvatarAddr

Field Value

Address

Cp

public int Cp

Field Value

int

DefaultScore

public const int DefaultScore = 1000

Field Value

int

LastBattleBlockIndex

public long LastBattleBlockIndex

Field Value

long

Level

public int Level

Field Value

int

Lose

public int Lose

Field Value

int

MaxTicketCount

public const int MaxTicketCount = 8

Field Value

int

Name

If you need to know NameWithHash, check PostConstructor() method of the AvatarState class and you can find the relevant information there. It provides a formatted string that includes the avatar's name and a shortened version of their address.

public string Name

Field Value

string

Examples

$"{name} <size=80%><color=#A68F7E>#{address.ToHex().Substring(0, 4)}</color></size>";

PortraitId

public int PortraitId

Field Value

int

PurchasedTicketCount

public int PurchasedTicketCount

Field Value

int

Score

public int Score

Field Value

int

Ticket

public int Ticket

Field Value

int

TicketResetCount

public int TicketResetCount

Field Value

int

Win

public int Win

Field Value

int

Properties

Bencoded

An Bencodex.Types.IValue representation of this object that can be decoded back to instantiate an equal object. The decoded object must be equal to the original in the sense that Equals(T) should be true.

public IValue Bencoded { get; }

Property Value

IValue

Remarks

Note that the only requirement is that the produced Bencodex.Types.IValue can be decoded back to an equal object. This representation may not be canonical in the sense that additional junk data may be present in an Bencodex.Types.IValue that one may wish to decode and this may be discarded while decoding.

A specific implemnetation may decide to only allow the canonical representation to be decoded.

Methods

AddScore(int)

public void AddScore(int score)

Parameters

score int

BuyTicket(long)

public void BuyTicket(long maxCount)

Parameters

maxCount long

ResetTicket(int)

public void ResetTicket(int resetCount)

Parameters

resetCount int

Serialize()

public IValue Serialize()

Returns

IValue

UpdateRecord(int, int)

public void UpdateRecord(int win, int lose)

Parameters

win int
lose int

UseTicket(int)

public void UseTicket(int ticketCount)

Parameters

ticketCount int