Table of Contents

Interface ICharacterInfo

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

The local character: who they are, how they are doing, and what they can do. Values read 0 or empty until the character is in the world.

public interface ICharacterInfo

Properties

AccountName

Authenticated account name; expression surfaces expose only its hash.

string AccountName { get; }

Property Value

string

ActiveEnchantments

Enchantments in force on the local player. Snapshot semantics: the list is rebuilt by the host, never mutated in place under a reader.

IReadOnlyList<PluginActiveEnchantment> ActiveEnchantments { get; }

Property Value

IReadOnlyList<PluginActiveEnchantment>

Attributes

The six primary attributes.

IReadOnlyList<PluginAttributeInfo> Attributes { get; }

Property Value

IReadOnlyList<PluginAttributeInfo>

BaseHealth

The unbuffed maximum health: the maximum with every enchantment layer off — base attributes, no vital enchantments. A host that does not track the split reports the buffed maximum instead, in which case this and MaxHealth are the same number.

uint BaseHealth { get; }

Property Value

uint

BaseMana

The unbuffed maximum health: the maximum with every enchantment layer off — base attributes, no vital enchantments. A host that does not track the split reports the buffed maximum instead, in which case this and MaxHealth are the same number.

uint BaseMana { get; }

Property Value

uint

BaseStamina

The unbuffed maximum health: the maximum with every enchantment layer off — base attributes, no vital enchantments. A host that does not track the split reports the buffed maximum instead, in which case this and MaxHealth are the same number.

uint BaseStamina { get; }

Property Value

uint

CharacterIndex

Which slot of the account's character list this character occupies, or -1 before login.

int CharacterIndex { get; }

Property Value

int

CurrentHealth

Current health.

uint CurrentHealth { get; }

Property Value

uint

CurrentMana

Current mana.

uint CurrentMana { get; }

Property Value

uint

CurrentStamina

Current stamina.

uint CurrentStamina { get; }

Property Value

uint

CurrentTitleId

The title the character has chosen to display, by the server's number for it; 0 when none is chosen, before the server has sent the character's titles, and on a host that does not track them, which is what the default implementation reports. Its text is the matching entry of Titles.

uint CurrentTitleId { get; }

Property Value

uint

IsInWorld

Whether the character is in the world right now.

bool IsInWorld { get; }

Property Value

bool

Level

The character's level; 0 before the server has said.

int Level { get; }

Property Value

int

MainPackFreeSlots

Unused ordinary slots in the main pack.

int MainPackFreeSlots { get; }

Property Value

int

MaxHealth

Health at full.

uint MaxHealth { get; }

Property Value

uint

MaxMana

Mana at full.

uint MaxMana { get; }

Property Value

uint

MaxStamina

Stamina at full.

uint MaxStamina { get; }

Property Value

uint

Name

The character's name; empty before login.

string Name { get; }

Property Value

string

ObjectId

The character's own object id; 0 before login.

uint ObjectId { get; }

Property Value

uint

ServerPopulation

Players the server reported as connected in its login-time world-name message, or -1 before it has said. This is a one-time snapshot: it does not update again for the rest of the session.

int ServerPopulation { get; }

Property Value

int

Skills

Every skill the client can describe, sorted by name. Empty before the server has sent the character's skills.

IReadOnlyList<PluginSkillInfo> Skills { get; }

Property Value

IReadOnlyList<PluginSkillInfo>

SummoningMastery

How many creatures the character may have summoned at once, as the server reports it; 0 when it has said nothing.

int SummoningMastery { get; }

Property Value

int

TimedEnchantments

Timed spell buffs, including those temporarily suppressed by a stronger equipped effect. Equipment enchantments are excluded.

IReadOnlyList<PluginActiveEnchantment> TimedEnchantments { get; }

Property Value

IReadOnlyList<PluginActiveEnchantment>

Titles

Every title the character has earned, in the order the server listed them when the character entered the world, with each title earned since added at the end. Empty before the server has sent the list, and on a host that does not track titles, which is what the default implementation returns.

IReadOnlyList<PluginCharacterTitle> Titles { get; }

Property Value

IReadOnlyList<PluginCharacterTitle>

VitaeMultiplier

What vitae leaves of the character's attributes, skills and vitals, as a fraction: 1 for a character with no vitae penalty, 0.95 for a five percent penalty. It is the product of every vitae effect the server has placed on the character. 1 before the server has sent the character's enchantments, and on a host that does not track them, which is what the default implementation reports.

float VitaeMultiplier { get; }

Property Value

float

VitaePenaltyPercent

The vitae penalty in whole percent: 0 for none, 5 for a character whose stats are held at 95 percent. It is VitaeMultiplier taken from one, times one hundred and rounded to the nearest whole number, and is always between 0 and 100. 0 whenever VitaeMultiplier reports 1, which includes the default implementation.

int VitaePenaltyPercent { get; }

Property Value

int

Vitals

Health, stamina and mana in that order, each with what the server has said about how it was raised. Empty before the server has stated them, and on a host that does not project them.

IReadOnlyList<PluginVitalInfo> Vitals { get; }

Property Value

IReadOnlyList<PluginVitalInfo>

WorldName

Server-advertised world name used to scope global variables.

string WorldName { get; }

Property Value

string

Methods

RequestAdvancement(PluginAdvancementKind, uint, ulong)

Asks the client to spend on one stat: raising an attribute, a pool or a skill with experience, or training a skill with skill credits. The client checks the request and sends it; whether the spend is allowed is the server's own decision and arrives later as an updated stat.

PluginAdvancementResult RequestAdvancement(PluginAdvancementKind kind, uint statId, ulong cost)

Parameters

kind PluginAdvancementKind

Which kind of stat the spend is against.

statId uint

Which stat: StatId for an attribute, StatId for a pool, and SkillId for a skill, trained or raised. Zero names nothing and is refused.

cost ulong

What to spend: experience for the first three kinds, skill credits for TrainSkill. Zero is refused, as is anything above the bound in PluginAdvancement.

Returns

PluginAdvancementResult

What the client did with it, and why not when it refused. A host that cannot send -- no session, or no such surface -- answers Unavailable rather than throwing.

TryGetSkill(uint, out PluginSkillInfo)

Looks up one skill by id. False when the character has no such skill or the server has not sent it yet.

bool TryGetSkill(uint skillId, out PluginSkillInfo skill)

Parameters

skillId uint
skill PluginSkillInfo

Returns

bool

TryGetVital(int, out PluginVitalInfo)

Looks up one pool by its kind: 0 health, 1 stamina, 2 mana. This is the pool's own number, not an index into Vitals, which leaves out any pool the server has not stated yet and so can be shorter than three. False when the number names no pool, when the server has not stated it yet, or on a host that does not project them.

bool TryGetVital(int kind, out PluginVitalInfo vital)

Parameters

kind int

Which pool: 0 health, 1 stamina, 2 mana.

vital PluginVitalInfo

The pool, or a default record when false.

Returns

bool