public ArcheType Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); ArcheTypeID = io.ReadInt32(); Enabled = io.ReadBoolean(); Unlocked = io.ReadBoolean(); return(this); }
public PartyMember Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); PartyMemberID = io.ReadInt32(); FixedIndex = (byte)io.ReadBit2(8); Player = io.ReadInt32(); IsLeader = io.ReadBoolean(); IsUnspawned = io.ReadBoolean(); return(this); }
public Controllable Read(DAIIO io) { ShouldSave = io.ReadBoolean(); if (ShouldSave) { IsHuman = io.ReadBoolean(); HasPlayer = io.ReadBoolean(); if (HasPlayer) { PlayerID = io.ReadInt32(); } } return(this); }
public LookupTable Read(DAIIO io) { Id = io.ReadBit2(0x20); HasCreatePos = io.ReadBoolean(); if (HasCreatePos) { CreatePos = io.ReadBit2(0x1A); } HasInitPos = io.ReadBoolean(); if (HasInitPos) { InitPos = io.ReadBit2(0x1A); } return(this); }
public Map Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); MapID = io.ReadInt32(); IsPersistent = io.ReadBoolean(); UncompressedSize = io.ReadInt32(); IsCompressed = io.ReadBoolean(); Size = io.ReadInt32(); Blob = new byte[Size]; for (int i = 0; i < Size; i++) { Blob[i] = (byte)io.ReadBit(0x8); } return(this); }
public DynamicMapPinInfo Read(DAIIO io) { xLength = (short)io.ReadBit2(LengthBits); PinGuid = new byte[0x10]; io.Read(PinGuid, 0, 0x10); WorldPos = new byte[0xc]; io.Read(WorldPos, 0, 0xc); FloorId = io.ReadInt16(); VisibilityOverridden = io.ReadBoolean(); if (VisibilityOverridden) { Visible = io.ReadBoolean(); } DisplayAsDiscovered = io.ReadBoolean(); DisplayAsExplored = io.ReadBoolean(); DeadOrDying = io.ReadBoolean(); return(this); }
public PlayerManager Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); long xpos = io.Position; InventoryExist = io.ReadBoolean(); if (InventoryExist) { Inventory = new Inventory().Read(io); } if (SStructure.EntityVersion > 8) { ItemManagerExists = io.ReadBoolean(); if (ItemManagerExists) { ResearchedUpgradesCount = io.ReadInt16(); ResearchedUpgradeIndexes = new int[ResearchedUpgradesCount]; for (int i = 0; i < ResearchedUpgradesCount; i++) { ResearchedUpgradeIndexes[i] = io.ReadInt32(); } if (SStructure.ProjectVersion > 0x20) { PotionBankCount = io.ReadInt16(); PotionBanks = new PotionBank[PotionBankCount]; for (int i = 0; i < PotionBankCount; i++) { PotionBanks[i] = new PotionBank().Read(io); } //if (PotionBankCount > 0) //{ // UnknownBankCount = io.ReadInt16(); // UnknownBanks = new PotionBank[UnknownBankCount]; // for (int i = 0; i < UnknownBankCount; i++) // UnknownBanks[i] = new PotionBank().Read(io); //} } } } return(this); }
public ItemAsset Read(DAIIO io) { IsNull = io.ReadBoolean(); if (!IsNull) { Value1 = io.ReadInt32(); Value2 = io.ReadInt32(); DataIsNull = io.ReadBoolean(); if (!DataIsNull) { DataBytes = new byte[0x10]; for (int i = 0; i < 0x10; i++) { DataBytes[i] = (byte)io.ReadByte(); } } } return(this); }
public BluePrint Read(DAIIO io) { IsNull = io.ReadBoolean(); if (!IsNull) { Value1 = io.ReadInt32(); Value2 = io.ReadInt32(); IsEmpty = io.ReadBoolean(); if (!IsEmpty) { DataBytes = new byte[0x10]; for (int i = 0; i < 0x10; i++) { DataBytes[i] = (byte)io.ReadByte(); } } } return(this); }
public CharacterCustomization Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); CustomizationManagerExists = io.ReadBoolean(); if (CustomizationManagerExists) { CustomizationManager = new CharacterCustomizationManager().Read(io); } return(this); }
public AgentEntryData Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); NameHash = io.ReadBit2(0x20); Version = (short)io.ReadBit2(0x10); HasCustomizationData = io.ReadBoolean(); if (HasCustomizationData) { CustomizationData = new CustomizationData().Read(io); } return(this); }
public WarTable Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); ID = io.ReadInt32(); HasNoGuid = io.ReadBoolean(); if (!HasNoGuid) { Guid = new byte[0x10]; io.Read(Guid, 0, 0x10); } return(this); }
public WarTableEntry Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); IsEmpty = io.ReadBoolean(); if (!IsEmpty) { WarTable = new WarTable().Read(io); } if (_isfirst) { ProgressTime = SStructure.ProjectVersion < 0x1A ? io.ReadInt32().ToUnixTime() : ((int)io.ReadInt64()).ToUnixTime(); } return(this); }
public SpawnerControllable Read(DAIIO io) { xLength = (short)io.ReadBit2(LengthBits); IsInVehicle = io.ReadBoolean(); if (IsInVehicle) { InVehicleControllable = new InVehicleControllable { ID = io.ReadInt32(), EntryID = io.ReadInt32() }; } return(this); }
public SubLevelInfo Read(DAIIO io) { XLength = io.ReadBit2(LengthBits); var count = (ushort)io.ReadBit2(0x10); Name = io.ReadString(count); BundleHash = io.ReadBit2(0x20); ParentBundleHash = io.ReadBit2(0x20); HeapType = io.ReadBit2(0x8); InitSize = io.ReadBit2(0x20); AllowGrow = io.ReadBoolean(); Status = io.ReadBit2(0x8); BundleType = io.ReadBit2(0x8); GroupID = io.ReadBit2(0x20); return(this); }
public ItemEntry Read(DAIIO io) { ItemStats = new ItemStatsInstance().Read(io); if ((io.Position - ItemStats.Offset) < ItemStats.xLength) { if (ItemStats.Version >= 6) { MasterworkSuccesses = (byte)io.ReadBit2(5); } else { MasterworkSuccess = io.ReadBoolean(); } } return(this); }
public ItemStatsInstance Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Offset = io.Position; Version = io.ReadInt16(); StatsData = new ItemAsset().Read(io); if (Version < 8) { Uid = io.ReadInt32(); } IsForSale = io.ReadBoolean(); IsNew = io.ReadBoolean(); IsCrafted = io.ReadBoolean(); StringId = io.ReadInt32(); if (xLength > 0x8a) { StatsInstance = new ItemStatInstance(this, IsCrafted).Read(io); if ((io.Position - Offset) < xLength) { Upgrades = new ItemUpgrades().Read(io); SuppressClassRestriction = io.ReadBoolean(); if (Version > 6) { IsPlaceHolder = io.ReadBoolean(); } if (Version > 0xA) { HasSoundActionsReference = io.ReadBoolean(); if (HasSoundActionsReference) { SoundActionsReference = new ItemAsset().Read(io); } } } } if ((io.Position - Offset) + 8 <= xLength) { StackSize = (byte)io.ReadBit2(0x8); } else { StackSize = 0xff; } if (Version >= 9 && ((io.Position - Offset) + 8 <= xLength)) { MaxStackSize = (byte)io.ReadBit2(0x8); } else { MaxStackSize = 0xff; } return(this); }
public CallBackData Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Id = io.ReadInt32(); DestroyedPartsCount = io.ReadInt32(); KeepInfoOnUnregister = io.ReadBoolean(); PartIdsCount = io.ReadInt16(); PartIds = new int[PartIdsCount]; for (int i = 0; i < PartIdsCount; i++) { PartIds[i] = io.ReadInt32(); } BitCount = io.ReadInt32(); int x = BitCount.NumberOfSetBits() << 2; BitArray = new byte[x]; io.Read(BitArray, 0, x); return(this); }
public ItemStatInstance Read(DAIIO io) { if (_info.Version > 1) { HasDynamicStats = io.ReadBoolean(); if (HasDynamicStats) { DynamicStats = new ItemDynamicStats().Read(io); } else if (_info.Version > 3) { DynamicStats = new ItemDynamicStats().Read(io); } } else if (_iscrafted) { CraftedStatIntances = new CraftedStatIntances().Read(io); } if (_info.Version > 9) { ItemAbilities = new ItemAbilities().Read(io); } if (_info.Version < 3) { ItemTimelines = new ItemTimelines().Read(io); } ItemMaterials = new ItemMaterials().Read(io); if (_info.Version < 5) { CompositionDisplay = new CompositionDisplay().Read(io); } else { short count = io.ReadInt16(); DisplayString = io.ReadString(count); } Level = io.ReadInt32(); DamageType = io.ReadInt32(); Quality = io.ReadInt32(); return(this); }
public ControllableCreate Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); HasControllable = io.ReadBoolean(); if (HasControllable) { Controllable = new Controllable().Read(io); if (Controllable.ShouldSave) { TransForm = new byte[4][]; for (int i = 0; i < 4; i++) { TransForm[i] = new byte[0xc]; for (int j = 0; j < 0xc; j++) { TransForm[i][j] = (byte)io.ReadByte(); } } IndexUsedByUniqueId = io.ReadInt16(); } } return(this); }
public SaveDataStructure Read(DAIIO io) { byte[] xdm = io.ReadBytes(0x41, false); if (!xdm.MemCompare(DataMagic, 0)) { throw new Exception("Invalid Save Data Header!"); } SavedTime = io.ReadInt64().ToUnixTime(); ushort count = io.ReadUInt16(); SID = io.ReadString(count); GameVersion = io.ReadUInt16(); SaveVersion = io.ReadUInt16(); ProjectVersion = io.ReadUInt16(); BitstreamFeatures = io.ReadUInt16(); ChangeList = io.ReadUInt32(); count = io.ReadUInt16(); Level = io.ReadString(count); Difficulty = io.ReadUInt32(); BundleCount = io.ReadUInt16(); BundleList = new string[BundleCount]; for (int i = 0; i < BundleCount; i++) { count = io.ReadUInt16(); BundleList[i] = io.ReadString(count); } InclusionCount = io.ReadUInt16(); Inclusions = new Inclusion[InclusionCount]; for (int i = 0; i < InclusionCount; i++) { Inclusions[i] = new Inclusion().Read(io); } SubLevelInfoCount = io.ReadBit2(0xc); if (SubLevelInfoCount <= 0x40 && SubLevelInfoCount > 0) { SubLevelEntries = new SubLevelInfo[SubLevelInfoCount]; for (int i = 0; i < SubLevelInfoCount; i++) { SubLevelEntries[i] = new SubLevelInfo().Read(io); } } LevelChecksum = new byte[0x10]; for (int i = 0; i < 0x10; i++) { LevelChecksum[i] = (byte)io.ReadBit(0x8); } DLC = io.ReadBit2(0x14); EntityVersion = (short)io.ReadBit2(0x10); ProjectVersionContext = (short)io.ReadBit2(0x10); HasDebugInfo = io.ReadBoolean(); AgentTocBookmark = io.ReadBit2(0x1A); ClientDataBookmark = io.ReadBit2(0x1A); EntityContentLength = io.ReadBit2(0x20); /////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////UNFINISHED SECTION!!!!!///////////////////////////////// var xpos = io.Position; //////// EntityContent = new EntityData(this).Read(io); //////// tmpdata = io.ReadData((int)(EntityContentLength - (io.Position - xpos))); //////// ////////////////////////////////////////////////////////////////////////////////// SaveEntityComplexLength = io.ReadBit2(6); SaveEntityComplex = io.ReadData((int)SaveEntityComplexLength); SaveEntityBookmark = io.ReadBit2(0x1A); SaveEntity = new SaveEntity(this).Read(io); EntityMetaData = new EntityMeta(this).Read(io); AgentToc = new AgentToc().Read(io); //var xdio = new DAIIO(io.xbaseStream, io.Position, ClientDataLength) {IsBigEndian = true}; ClientData = new ClientAgent().Read(io); //io.Position += ClientDataLength; LastPartSeedLength = (int)(io.Length - io.Position); if (LastPartSeedLength > 0) { LastPartSeed = io.ReadBit2((uint)LastPartSeedLength); } return(this); }