跳到主要内容
版本:1.0.0

Struct EnchantedItemFormComponent

Namespace: ReadyM.Relay.Common.Oblivion.ECS.Components
Assembly: ReadyM.Relay.Common.Oblivion.dll

Everything needed to materialize one dynamic enchanted item form (created at runtime, like a weapon, armor or clothing the player enchanted). The engine makes such a form as a copy of an item from the game files with a new enchantment attached, but nothing on the copy remembers which item that was, so this carries every field the engine's copy takes over, plus the enchantment.

public struct EnchantedItemFormComponent : IComponent, INetSerializable, IDisposable

Implements​

IComponent, INetSerializable, IDisposable

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks​

An entity with this component is a form entity that identifies this form across network, so all clients and the server can reference that form in network messages even though the form itself doesn't exist on server and each client materializes it locally with a different dynamic formID.

Fields that a form type does not have stay at their defaults: weapons have no biped data or armor rating, armor has no model, icon, damage or weapon data of its own (its models and icons are in the biped data), clothing additionally has no health.

Constructors​

EnchantedItemFormComponent(AllocatorKind)​

Everything needed to materialize one dynamic enchanted item form (created at runtime, like a weapon, armor or clothing the player enchanted). The engine makes such a form as a copy of an item from the game files with a new enchantment attached, but nothing on the copy remembers which item that was, so this carries every field the engine's copy takes over, plus the enchantment.

public EnchantedItemFormComponent(AllocatorKind allocatorKind)

Parameters​

allocatorKind AllocatorKind

Remarks​

An entity with this component is a form entity that identifies this form across network, so all clients and the server can reference that form in network messages even though the form itself doesn't exist on server and each client materializes it locally with a different dynamic formID.

Fields that a form type does not have stay at their defaults: weapons have no biped data or armor rating, armor has no model, icon, damage or weapon data of its own (its models and icons are in the biped data), clothing additionally has no health.

Properties​

ArmorRating​

The armor's rating, as the engine stores it.

public ushort ArmorRating { get; set; }

Property Value​

ushort

AttackDamage​

The weapon's base damage.

public ushort AttackDamage { get; set; }

Property Value​

ushort

BipedFlags​

The armor's or clothing's biped flags.

public byte BipedFlags { get; set; }

Property Value​

byte

BipedSlots​

The body slots the armor or clothing covers.

public ushort BipedSlots { get; set; }

Property Value​

ushort

BlueprintClassPath​

The UE actor class that shows the item in the world and in hand (the item's UObject's BlueprintClass), as a soft object path "/Package.Asset". The engine copies it from the game-file item an enchanted item is made of, so a client that creates the item from this data has to be told; without it UE uses a placeholder actor.

public NativeString256 BlueprintClassPath { get; set; }

Property Value​

NativeString256

BodyPartActorClassPath​

The UE actor class of armor or clothing worn on a body (the item's BodyPartActorClass), as an object path "/Package.Asset"; empty for weapons. Copied from the game-file item the same way as the blueprint class.

public NativeString256 BodyPartActorClassPath { get; set; }

Property Value​

NativeString256

EffectsCount​

public int EffectsCount { get; }

Property Value​

int

EnchantmentCharge​

The enchantment's own charge amount; -1 on enchantments the player made.

public int EnchantmentCharge { get; set; }

Property Value​

int

EnchantmentCost​

The enchantment's per-use charge cost, used only when its auto-calculation flag is off; -1 on enchantments the player made.

public int EnchantmentCost { get; set; }

Property Value​

int

EnchantmentFlags​

The enchantment's flags; bit 0 turns off the auto-calculated cost.

public byte EnchantmentFlags { get; set; }

Property Value​

byte

EnchantmentType​

The kind of item the enchantment is made for.

public EnchantmentType EnchantmentType { get; set; }

Property Value​

EnchantmentType

FemaleBipedModelBound​

The bound radius of the model worn by a female character.

public float FemaleBipedModelBound { get; set; }

Property Value​

float

FemaleBipedModelPath​

The path of the model worn by a female character.

public NativeString256 FemaleBipedModelPath { get; set; }

Property Value​

NativeString256

FemaleGroundModelBound​

The bound radius of the female ground model.

public float FemaleGroundModelBound { get; set; }

Property Value​

float

FemaleGroundModelPath​

The path of the model shown when the female version lies on the ground.

public NativeString256 FemaleGroundModelPath { get; set; }

Property Value​

NativeString256

FemaleIconPath​

The path of the female version's inventory icon.

public NativeString256 FemaleIconPath { get; set; }

Property Value​

NativeString256

Health​

The item's full durability (weapons and armor).

public uint Health { get; set; }

Property Value​

uint

IconPath​

The path of the weapon's inventory icon.

public NativeString256 IconPath { get; set; }

Property Value​

NativeString256

ItemFormType​

The engine form type of the item: armor (0x14), clothing (0x16) or weapon (0x21).

public byte ItemFormType { get; set; }

Property Value​

byte

MaleBipedModelBound​

The bound radius of the model worn by a male character.

public float MaleBipedModelBound { get; set; }

Property Value​

float

MaleBipedModelPath​

The path of the model worn by a male character.

public NativeString256 MaleBipedModelPath { get; set; }

Property Value​

NativeString256

MaleGroundModelBound​

The bound radius of the male ground model.

public float MaleGroundModelBound { get; set; }

Property Value​

float

MaleGroundModelPath​

The path of the model shown when the male version lies on the ground.

public NativeString256 MaleGroundModelPath { get; set; }

Property Value​

NativeString256

MaleIconPath​

The path of the male version's inventory icon.

public NativeString256 MaleIconPath { get; set; }

Property Value​

NativeString256

MaxCharge​

The item's full enchantment charge.

public ushort MaxCharge { get; set; }

Property Value​

ushort

ModelBound​

The bound radius of the weapon's model.

public float ModelBound { get; set; }

Property Value​

float

ModelPath​

The path of the weapon's 3D model, used in the inventory preview, in hand and when dropped.

public NativeString256 ModelPath { get; set; }

Property Value​

NativeString256

Name​

The item's display name.

public NativeString256 Name { get; set; }

Property Value​

NativeString256

ScriptFormId​

The form ID of the script attached to the item, from the game files; 0 when it has none.

public uint ScriptFormId { get; set; }

Property Value​

uint

Value​

The item's gold value.

public int Value { get; set; }

Property Value​

int

WeaponFlags​

The weapon's flags.

public uint WeaponFlags { get; set; }

Property Value​

uint

WeaponReach​

The weapon's reach.

public float WeaponReach { get; set; }

Property Value​

float

WeaponSpeed​

The weapon's speed.

public float WeaponSpeed { get; set; }

Property Value​

float

WeaponType​

The weapon's type (blade, blunt, staff, bow, ...).

public uint WeaponType { get; set; }

Property Value​

uint

Weight​

The item's weight.

public float Weight { get; set; }

Property Value​

float

Methods​

AddEffects(in MagicEffectEntry)​

public void AddEffects(in MagicEffectEntry value)

Parameters​

value MagicEffectEntry

ClearEffects()​

public void ClearEffects()

ContainsEffects(in MagicEffectEntry)​

public bool ContainsEffects(in MagicEffectEntry value)

Parameters​

value MagicEffectEntry

Returns​

bool

GetEffects()​

public NativeList<MagicEffectEntry>.ReadOnly GetEffects()

Returns​

NativeList<MagicEffectEntry>.ReadOnly

GetEffects(int)​

public MagicEffectEntry GetEffects(int index)

Parameters​

index int

Returns​

MagicEffectEntry

InsertEffects(int, in MagicEffectEntry)​

public void InsertEffects(int index, in MagicEffectEntry value)

Parameters​

index int

value MagicEffectEntry

RemoveAtEffects(int)​

public MagicEffectEntry RemoveAtEffects(int index)

Parameters​

index int

Returns​

MagicEffectEntry

SetEffects(in NativeList<MagicEffectEntry>)​

public void SetEffects(in NativeList<MagicEffectEntry> value)

Parameters​

value NativeList<MagicEffectEntry>

SetEffects(int, in MagicEffectEntry)​

public void SetEffects(int index, in MagicEffectEntry value)

Parameters​

index int

value MagicEffectEntry

  • Remarks
  • Constructors
    • EnchantedItemFormComponent(AllocatorKind)
  • Properties
    • ArmorRating
    • AttackDamage
    • BipedFlags
    • BipedSlots
    • BlueprintClassPath
    • BodyPartActorClassPath
    • EffectsCount
    • EnchantmentCharge
    • EnchantmentCost
    • EnchantmentFlags
    • EnchantmentType
    • FemaleBipedModelBound
    • FemaleBipedModelPath
    • FemaleGroundModelBound
    • FemaleGroundModelPath
    • FemaleIconPath
    • Health
    • IconPath
    • ItemFormType
    • MaleBipedModelBound
    • MaleBipedModelPath
    • MaleGroundModelBound
    • MaleGroundModelPath
    • MaleIconPath
    • MaxCharge
    • ModelBound
    • ModelPath
    • Name
    • ScriptFormId
    • Value
    • WeaponFlags
    • WeaponReach
    • WeaponSpeed
    • WeaponType
    • Weight
  • Methods
    • AddEffects(in MagicEffectEntry)
    • ClearEffects()
    • ContainsEffects(in MagicEffectEntry)
    • GetEffects()
    • GetEffects(int)
    • InsertEffects(int, in MagicEffectEntry)
    • RemoveAtEffects(int)
    • SetEffects(in NativeList<MagicEffectEntry>)
    • SetEffects(int, in MagicEffectEntry)