How to use the restructure.uint32le function in restructure

To help you get started, we’ve selected a few restructure examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wowserhq / blizzardry / src / lib / dbc / entities / creature-display-info-extra.js View on Github external
import StringRef from '../string-ref';

export default Entity({
  id: r.uint32le,
  raceID: r.uint32le,
  gender: r.uint32le,

  skinColor: r.uint32le,
  faceType: r.uint32le,
  hairType: r.uint32le,
  hairStyle: r.uint32le,
  beardStyle: r.uint32le,

  helmID: r.uint32le,
  shoulderID: r.uint32le,
  shirtID: r.uint32le,
  cuirassID: r.uint32le,
  beltID: r.uint32le,
  legsID: r.uint32le,
  bootsID: r.uint32le,
  wristID: r.uint32le,
  glovesID: r.uint32le,
  tabardID: r.uint32le,
  capeID: r.uint32le,

  canEquip: new r.Boolean(r.uint32le),
  texture: StringRef,
});
github wowserhq / blizzardry / src / lib / dbc / entities / spell.js View on Github external
casterAuraSpellExcluded: r.uint32le,
  targetAuraSpellExcluded: r.uint32le,

  castingTimeID: r.uint32le,
  recoveryTime: r.uint32le,
  categoryRecoveryTime: r.uint32le,
  interruptFlags: r.uint32le,
  auraInterruptFlags: r.uint32le,
  channelInterruptFlags: r.uint32le,
  procFlags: r.uint32le,
  procChance: r.uint32le,
  procCharges: r.uint32le,
  maxLevel: r.uint32le,
  baseLevel: r.uint32le,
  spellLevel: r.uint32le,
  durationID: r.uint32le,
  powerType: r.uint32le,
  manaCost: r.uint32le,
  manaCostPerlevel: r.uint32le,
  manaPerSecond: r.uint32le,
  manaPerSecondPerLevel: r.uint32le,
  rangeID: r.uint32le,
  speed: r.floatle,
  modalNextSpell: r.uint32le,
  stackAmount: r.uint32le,

  totemIDs: new r.Array(r.uint32le, 2),
  reagentIDs: new r.Array(r.uint32le, 8),
  reagentCounts: new r.Array(r.uint32le, 8),

  equippedItemClassID: r.int32le,
  equippedItemSubClassMask: r.int32le,
github wowserhq / blizzardry / src / lib / dbc / entities / zone-intro-music-table.js View on Github external
import r from 'restructure';

import Entity from '../entity';
import StringRef from '../string-ref';

export default Entity({
  id: r.uint32le,
  name: StringRef,
  soundID: r.uint32le,
  priority: r.uint32le,
  minDelay: r.uint32le,
});
github wowserhq / blizzardry / src / lib / dbc / entities / chr-classes.js View on Github external
export default Entity({
  id: r.uint32le,

  skip: new r.Reserved(r.uint32le),

  powerType: r.uint32le,
  petType: r.uint32le,

  name: LocalizedStringRef,
  nameFemale: LocalizedStringRef,
  nameMale: LocalizedStringRef,
  filename: StringRef,

  spellClassSet: r.uint32le,
  flags: r.uint32le,
  cameraID: r.uint32le,
  expansionID: r.uint32le,
});
github wowserhq / blizzardry / lib / dbc / entities / chr-races.js View on Github external
var Entity = require('../entity');
var LocalizedStringRef = require('../localized-string-ref');
var StringRef = require('../string-ref');

module.exports = Entity({
  id: r.uint32le,
  flags: r.uint32le,

  factionID: r.uint32le,
  explorationSoundID: r.uint32le,
  maleDisplayID: r.uint32le,
  femaleDisplayID: r.uint32le,

  clientPrefix: StringRef,

  skip: new r.Reserved(r.uint32le),

  baseLanguage: r.uint32le,
  resSicknessSpellID: r.uint32le,
  splashSoundID: r.uint32le,
  clientFileString: StringRef,
  cinematicSequenceID: r.uint32le,

  name: LocalizedStringRef,
  nameFemale: LocalizedStringRef,
  nameMale: LocalizedStringRef,

  facialHairCustomization: StringRef,
  facialHairCustomization2: StringRef,
  hairCustomization: StringRef,

  expansionID: r.uint32le
github wowserhq / blizzardry / src / lib / dbc / entities / spell.js View on Github external
casterAuraStateExcluded: r.uint32le,
  targetAuraStateExcluded: r.uint32le,
  casterAuraSpellID: r.uint32le,
  targetAuraSpellID: r.uint32le,
  casterAuraSpellExcluded: r.uint32le,
  targetAuraSpellExcluded: r.uint32le,

  castingTimeID: r.uint32le,
  recoveryTime: r.uint32le,
  categoryRecoveryTime: r.uint32le,
  interruptFlags: r.uint32le,
  auraInterruptFlags: r.uint32le,
  channelInterruptFlags: r.uint32le,
  procFlags: r.uint32le,
  procChance: r.uint32le,
  procCharges: r.uint32le,
  maxLevel: r.uint32le,
  baseLevel: r.uint32le,
  spellLevel: r.uint32le,
  durationID: r.uint32le,
  powerType: r.uint32le,
  manaCost: r.uint32le,
  manaCostPerlevel: r.uint32le,
  manaPerSecond: r.uint32le,
  manaPerSecondPerLevel: r.uint32le,
  rangeID: r.uint32le,
  speed: r.floatle,
  modalNextSpell: r.uint32le,
  stackAmount: r.uint32le,

  totemIDs: new r.Array(r.uint32le, 2),
  reagentIDs: new r.Array(r.uint32le, 8),
github wowserhq / blizzardry / src / lib / dbc / entities / spell-difficulty.js View on Github external
import r from 'restructure';

import Entity from '../entity';

export default Entity({
  id: r.uint32le,
  normal10ManSpellID: r.uint32le,
  normal25ManSpellID: r.uint32le,
  heroic10ManSpellID: r.uint32le,
  heroic25ManSpellID: r.uint32le,
});
github wowserhq / blizzardry / src / lib / dbc / entities / char-sections.js View on Github external
import r from 'restructure';

import Entity from '../entity';
import StringRef from '../string-ref';

export default Entity({
  id: r.uint32le,
  raceID: r.uint32le,
  gender: r.uint32le,
  generalType: r.uint32le,
  textures: new r.Array(StringRef, 3),
  flags: r.uint32le,
  type: r.uint32le,
  variation: r.uint32le,
});
github wowserhq / blizzardry / src / lib / dbc / entities / barber-shop-style.js View on Github external
import r from 'restructure';

import Entity from '../entity';
import LocalizedStringRef from '../localized-string-ref';

export default Entity({
  id: r.uint32le,
  type: r.uint32le,
  name: LocalizedStringRef,
  additionalName: LocalizedStringRef,
  costModifier: r.floatle,
  raceID: r.uint32le,
  gender: r.uint32le,
  hairID: r.uint32le,
});
github wowserhq / blizzardry / lib / dbc / entities / dungeon-encounter.js View on Github external
'use strict';

var r = require('restructure');
var Entity = require('../entity');
var LocalizedStringRef = require('../localized-string-ref');

module.exports = Entity({
  id: r.uint32le,
  mapID: r.uint32le,
  difficulty: r.uint32le,
  order: r.int32le,
  bit: r.uint32le,
  name: LocalizedStringRef,
  spellIconID: r.uint32le
});