Records Dynamic functions

class RecordsDynamicFunctions

Public Static Functions

void ClearRecords()

Clear the data from the records stored on the server.

Return
void

unsigned short GetRecordType()

Get the type of records in the read worldstate’s dynamic records.

Return
The type of records (0 for SPELL, 1 for POTION, 2 for ENCHANTMENT, 3 for NPC).

unsigned int GetRecordCount()

Get the number of records in the read worldstate’s dynamic records.

Return
The number of records.

unsigned int GetRecordEffectCount(unsigned int recordIndex)

Get the number of effects for the record at a certain index in the read worldstate’s current records.

Return
The number of effects.
Parameters
  • recordIndex: The index of the record.

const char *GetRecordId(unsigned int index)

Get the id of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The id of the record.
Parameters
  • index: The index of the record.

const char *GetRecordBaseId(unsigned int index)

Get the base id (i.e. the id this record should inherit default values from) of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The base id of the record.
Parameters
  • index: The index of the record.

int GetRecordSubtype(unsigned int index)

Get the subtype of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The type of the record.
Parameters
  • index: The index of the record.

const char *GetRecordName(unsigned int index)

Get the name of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The name of the record.
Parameters
  • index: The index of the record.

const char *GetRecordModel(unsigned int index)

Get the model of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The model of the record.
Parameters
  • index: The index of the record.

const char *GetRecordIcon(unsigned int index)

Get the icon of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The icon of the record.
Parameters
  • index: The index of the record.

const char *GetRecordScript(unsigned int index)

Get the script of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The script of the record.
Parameters
  • index: The index of the record.

const char *GetRecordEnchantmentId(unsigned int index)

Get the enchantment id of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The enchantment id of the record.
Parameters
  • index: The index of the record.

int GetRecordEnchantmentCharge(unsigned int index)

Get the enchantment charge of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The enchantment charge of the record.
Parameters
  • index: The index of the record.

int GetRecordAutoCalc(unsigned int index)

Get the auto-calculation flag value of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The auto-calculation flag value of the record.
Parameters
  • index: The index of the record.

int GetRecordCharge(unsigned int index)

Get the charge of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The charge of the record.
Parameters
  • index: The index of the record.

int GetRecordCost(unsigned int index)

Get the cost of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The cost of the record.
Parameters
  • index: The index of the record.

int GetRecordFlags(unsigned int index)

Get the flags of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The flags of the spell as an integer.
Parameters
  • index: The index of the record.

int GetRecordValue(unsigned int index)

Get the value of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The value of the record.
Parameters
  • index: The index of the record.

double GetRecordWeight(unsigned int index)

Get the weight of the record at a certain index in the read worldstate’s dynamic records of the current type.

Return
The weight of the record.
Parameters
  • index: The index of the record.

unsigned int GetRecordEffectId(unsigned int recordIndex, unsigned int effectIndex)

Get the ID of the effect at a certain index in the read worldstate’s current records.

Return
The ID of the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

int GetRecordEffectAttribute(unsigned int recordIndex, unsigned int effectIndex)

Get the ID of the attribute modified by the effect at a certain index in the read worldstate’s current records.

Return
The attribute ID for the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

int GetRecordEffectSkill(unsigned int recordIndex, unsigned int effectIndex)

Get the ID of the skill modified by the effect at a certain index in the read worldstate’s current records.

Return
The skill ID for the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

unsigned int GetRecordEffectRangeType(unsigned int recordIndex, unsigned int effectIndex)

Get the range type of the effect at a certain index in the read worldstate’s current records (0 for self, 1 for touch, 2 for target).

Return
The range of the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

int GetRecordEffectArea(unsigned int recordIndex, unsigned int effectIndex)

Get the area of the effect at a certain index in the read worldstate’s current records.

Return
The area of the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

int GetRecordEffectDuration(unsigned int recordIndex, unsigned int effectIndex)

Get the duration of the effect at a certain index in the read worldstate’s current records.

Return
The duration of the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

int GetRecordEffectMagnitudeMax(unsigned int recordIndex, unsigned int effectIndex)

Get the maximum magnitude of the effect at a certain index in the read worldstate’s current records.

Return
The maximum magnitude of the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

int GetRecordEffectMagnitudeMin(unsigned int recordIndex, unsigned int effectIndex)

Get the minimum magnitude of the effect at a certain index in the read worldstate’s current records.

Return
The minimum magnitude of the effect.
Parameters
  • recordIndex: The index of the record.
  • effectIndex: The index of the effect.

void SetRecordType(unsigned int type)

Set which type of temporary records stored on the server should have their data changed via setter functions.

Return
void
Parameters
  • type: The type of records.

void SetRecordId(const char *id)

Set the id of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • id: The id of the record.

void SetRecordBaseId(const char *baseId)

Set the base id (i.e. the id this record should inherit default values from) of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • baseId: The baseId of the record.

void SetRecordInventoryBaseId(const char *inventoryBaseId)

Set the inventory base id (i.e. the id this record should inherit its inventory contents from) of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • inventoryBaseId: The inventoryBaseId of the record.

void SetRecordSubtype(unsigned int subtype)

Set the subtype of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • type: The spell type.

void SetRecordName(const char *name)

Set the name of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • name: The name of the record.

void SetRecordModel(const char *model)

Set the model of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • model: The model of the record.

void SetRecordIcon(const char *icon)

Set the icon of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • icon: The icon of the record.

void SetRecordScript(const char *script)

Set the script of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • script: The script of the record.

void SetRecordEnchantmentId(const char *enchantmentId)

Set the enchantment id of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • enchantmentId: The enchantment id of the record.

void SetRecordEnchantmentCharge(int enchantmentCharge)

Set the enchantment charge of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • enchantmentCharge: The enchantmentCharge of the record.

void SetRecordAutoCalc(int autoCalc)

Set the auto-calculation flag value of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • autoCalc: The auto-calculation flag value of the record.

void SetRecordCharge(int charge)

Set the charge of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • charge: The charge of the record.

void SetRecordCost(int cost)

Set the cost of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • cost: The cost of the record.

void SetRecordFlags(int flags)

Set the flags of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • flags: The flags of the record.

void SetRecordValue(int value)

Set the value of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • value: The value of the record.

void SetRecordWeight(double weight)

Set the weight of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • weight: The weight of the record.

void SetRecordArmorRating(int armorRating)

Set the armor rating of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • armorRating: The armor rating of the record.

void SetRecordHealth(int health)

Set the health of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • health: The health of the record.

void SetRecordDamageChop(unsigned int minDamage, unsigned int maxDamage)

Set the chop damage of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • minDamage: The minimum damage of the record.
  • maxDamage: The maximum damage of the record.

void SetRecordDamageSlash(unsigned int minDamage, unsigned int maxDamage)

Set the slash damage of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • minDamage: The minimum damage of the record.
  • maxDamage: The maximum damage of the record.

void SetRecordDamageThrust(unsigned int minDamage, unsigned int maxDamage)

Set the thrust damage of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • minDamage: The minimum damage of the record.
  • maxDamage: The maximum damage of the record.

void SetRecordReach(double reach)

Set the reach of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • reach: The reach of the record.

void SetRecordSpeed(double speed)

Set the speed of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • speed: The speed of the record.

void SetRecordKeyState(bool keyState)

Set whether the temporary record stored on the server for the currently specified record type is a key.

Note: This is only applicable to Miscellaneous records.

Return
void
Parameters
  • keyState: Whether the record is a key.

void SetRecordScrollState(bool scrollState)

Set whether the temporary record stored on the server for the currently specified record type is a scroll.

Note: This is only applicable to Book records.

Return
void
Parameters
  • scrollState: Whether the record is a scroll.

void SetRecordSkillId(int skillId)

Set the skill ID of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • skillId: The skill ID of the record.

void SetRecordText(const char *text)

Set the text of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • text: The text of the record.

void SetRecordHair(const char *hair)

Set the hair of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • hair: The hair of the record.

void SetRecordHead(const char *head)

Set the head of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • hair: The head of the record.

void SetRecordGender(unsigned int gender)

Set the gender of the temporary record stored on the server for the currently specified record type (0 for female, 1 for male).

Return
void
Parameters
  • hair: The race of the record.

void SetRecordRace(const char *race)

Set the race of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • hair: The race of the record.

void SetRecordClass(const char *charClass)

Set the character class of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • hair: The character class of the record.

void SetRecordFaction(const char *faction)

Set the faction of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • faction: The faction of the record.

void SetRecordLevel(int level)

Set the level of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • level: The level of the record.

void SetRecordMagicka(int magicka)

Set the magicka of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • magicka: The magicka of the record.

void SetRecordFatigue(int fatigue)

Set the fatigue of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • fatigue: The fatigue of the record.

void SetRecordAIFight(int aiFight)

Set the AI fight value of the temporary record stored on the server for the currently specified record type.

Return
void
Parameters
  • aiFight: The AI fight value of the record.

void SetRecordIdByIndex(unsigned int index, const char *id)

Set the id of the record at a certain index in the records stored on the server.

When resending a received RecordsDynamic packet, this allows you to set the server-generated id of a record without having to clear and recreate the packet.

Return
void
Parameters
  • index: The index of the record.
  • id: The id of the record.

void SetRecordEnchantmentIdByIndex(unsigned int index, const char *enchantmentId)

Set the enchantment id of the record at a certain index in the records stored on the server.

When resending a received RecordsDynamic packet, this allows you to set the server-generated enchantment id of a record without having to clear and recreate the packet.

Return
void
Parameters
  • index: The index of the record.
  • enchantmentId: The enchantment id of the record.

void SetRecordEffectId(unsigned int effectId)

Set the ID of the temporary effect stored on the server.

Return
void
Parameters
  • effectId: The ID of the effect.

void SetRecordEffectAttribute(int attributeId)

Set the ID of the attribute modified by the temporary effect stored on the server.

Return
void
Parameters
  • attributeId: The ID of the attribute.

void SetRecordEffectSkill(int skillId)

Set the ID of the skill modified by the temporary effect stored on the server.

Return
void
Parameters
  • skillId: The ID of the skill.

void SetRecordEffectRangeType(unsigned int rangeType)

Set the range type of the temporary effect stored on the server (0 for self, 1 for touch, 2 for target).

Return
void
Parameters
  • rangeType: The range type of the effect.

void SetRecordEffectArea(int area)

Set the area of the temporary effect stored on the server.

Return
void
Parameters
  • area: The area of the effect.

void SetRecordEffectDuration(int duration)

Set the duration of the temporary effect stored on the server.

Return
void
Parameters
  • duration: The duration of the effect.

void SetRecordEffectMagnitudeMax(int magnitudeMax)

Set the maximum magnitude of the temporary effect stored on the server.

Return
void
Parameters
  • magnitudeMax: The maximum magnitude of the effect.

void SetRecordEffectMagnitudeMin(int magnitudeMin)

Set the minimum magnitude of the temporary effect stored on the server.

Return
void
Parameters
  • magnitudeMin: The minimum magnitude of the effect.

void SetRecordBodyPartType(unsigned int partType)

Set the type of the temporary body part stored on the server.

Return
void
Parameters
  • partType: The type of the body part.

void SetRecordBodyPartIdForMale(const char *partId)

Set the id of the male version of the temporary body part stored on the server.

Return
void
Parameters
  • partId: The id of the body part.

void SetRecordBodyPartIdForFemale(const char *partId)

Set the id of the female version of the temporary body part stored on the server.

Return
void
Parameters
  • partId: The id of the body part.

void SetRecordInventoryItemId(const char *itemId)

Set the id of the of the temporary inventory item stored on the server.

Return
void
Parameters
  • partId: The id of the inventory item.

void SetRecordInventoryItemCount(unsigned int count)

Set the count of the of the temporary inventory item stored on the server.

Return
void
Parameters
  • count: The count of the inventory item.

void AddRecord()

Add a copy of the server’s temporary record of the current specified type to the stored records.

In the process, the server’s temporary record will automatically be cleared so a new one can be set up.

Return
void

void AddRecordEffect()

Add a copy of the server’s temporary effect to the temporary record of the current specified type.

In the process, the server’s temporary effect will automatically be cleared so a new one can be set up.

Return
void

void AddRecordBodyPart()

Add a copy of the server’s temporary body part to the temporary record of the current specified type.

In the process, the server’s temporary body part will automatically be cleared so a new one can be set up.

Return
void

void AddRecordInventoryItem()

Add a copy of the server’s temporary inventory item to the temporary record of the current specified type.

In the process, the server’s temporary inventory item will automatically be cleared so a new one can be set up.

Note: Any items added this way will be ignored if the record already has a valid inventoryBaseId.

Return
void

void SendRecordDynamic(unsigned short pid, bool sendToOtherPlayers, bool skipAttachedPlayer)

Send a RecordDynamic packet with the current specified record type.

Return
void
Parameters
  • pid: The player ID attached to the packet.
  • sendToOtherPlayers: Whether this packet should be sent to players other than the player attached to the packet (false by default).
  • skipAttachedPlayer: Whether the packet should skip being sent to the player attached to the packet (false by default).