public PlotFlagValueMap Read(DAIIO io)
        {
            xLength = io.ReadBit2(LengthBits);
            Version = io.ReadInt16();
            if ((Version & 0xFFFF) >= 2)
            {
                MarkerDataLength = io.ReadInt16();
                MarkerData       = io.ReadString(MarkerDataLength);
            }
            if ((Version & 0xFFFF) >= 1)
            {
                BooleanFlagsThatAreTrue = new BooleanFlags();
                BooleanFlagsThatAreTrue.Read(io);

                BooleanFlagsThatAreFalse = new BooleanFlags();
                BooleanFlagsThatAreFalse.Read(io);

                IntegerFlagsCount = io.ReadInt16();
                IntegerFlags      = new ValueFlag[IntegerFlagsCount];
                for (int i = 0; i < IntegerFlagsCount; i++)
                {
                    IntegerFlags[i] = new ValueFlag();
                    IntegerFlags[i].Read(io);
                }

                FloatFlagsCount = io.ReadInt16();
                FloatFlags      = new ValueFlag[FloatFlagsCount];
                for (int i = 0; i < FloatFlagsCount; i++)
                {
                    FloatFlags[i] = new ValueFlag();
                    FloatFlags[i].Read(io);
                }
            }
            return(this);
        }
Exemplo n.º 2
0
        public PartyData Read(DAIIO io)
        {
            xLength        = io.ReadBit2(LengthBits);
            ArcheTypeCount = io.ReadInt16();
            ArcheTypes     = new ArcheType[ArcheTypeCount];
            for (int i = 0; i < ArcheTypeCount; i++)
            {
                ArcheTypes[i] = new ArcheType().Read(io);
            }
            DesiredPartyMemberIDCount = io.ReadInt16();
            DesiredPartyMemberIDs     = new int[DesiredPartyMemberIDCount];
            for (int i = 0; i < DesiredPartyMemberIDCount; i++)
            {
                DesiredPartyMemberIDs[i] = io.ReadInt32();
            }
            OverridePartyMemberIDCount = io.ReadInt16();
            OverridePartyMemberIDs     = new int[OverridePartyMemberIDCount];
            for (int i = 0; i < OverridePartyMemberIDCount; i++)
            {
                OverridePartyMemberIDs[i] = io.ReadInt32();
            }

            PartyMemberCount = io.ReadInt16();
            PartyMembers     = new PartyMember[PartyMemberCount];
            for (int i = 0; i < PartyMemberCount; i++)
            {
                PartyMembers[i] = new PartyMember().Read(io);
            }
            return(this);
        }
Exemplo n.º 3
0
        public JournalManager Read(DAIIO io)
        {
            xLength = io.ReadBit2(LengthBits);
            Version = io.ReadInt16();
            if (Version > 0)
            {
                ActiveJournalCount = io.ReadInt16();
                ActiveJournals     = new int[ActiveJournalCount];
                for (int i = 0; i < ActiveJournalCount; i++)
                {
                    ActiveJournals[i] = io.ReadInt32();
                }

                ReadJournalCount = io.ReadInt16();
                ReadJournals     = new int[ReadJournalCount];
                for (int i = 0; i < ReadJournalCount; i++)
                {
                    ReadJournals[i] = io.ReadInt32();
                }
            }
            if (Version > 1)
            {
                RewardedJournalCount = io.ReadInt16();
                RewardedJournals     = new int[RewardedJournalCount];
                for (int i = 0; i < RewardedJournalCount; i++)
                {
                    RewardedJournals[i] = io.ReadInt32();
                }
            }
            return(this);
        }
Exemplo n.º 4
0
 public CustomizationData Read(DAIIO io)
 {
     Version             = io.ReadInt16();
     CustomizationLength = io.ReadBit2(LengthBits);
     Options             = io.ReadInt16();
     Customizations      = new Customization[Options];
     for (int i = 0; i < Options; i++)
     {
         Customizations[i] = new Customization(this).Read(io);
     }
     return(this);
 }
Exemplo n.º 5
0
        public CharacterCustomizationManager Read(DAIIO io)
        {
            xLength      = io.ReadBit2(LengthBits);
            Version      = io.ReadInt32();
            ClassId      = io.ReadInt32();
            BackgroundId = io.ReadInt32();
            GenderId     = io.ReadInt32();
            RaceId       = io.ReadInt32();
            var x = io.ReadInt16();

            CharacterName    = io.ReadString(x);
            VoiceVariationID = io.ReadInt32();
            DifficultyModeID = io.ReadInt32();
            if (Version > 9)
            {
                LowestDifficultyModeID = io.ReadInt32();
            }
            CharacterSubclassID = io.ReadInt32();
            if (Version >= 8)
            {
                CharacterID = new byte[0x10];
                io.Read(CharacterID, 0, 0x10);
            }
            if (Version >= 0xD)
            {
                AgeInRealTimeSeconds = io.ReadSingle();
            }
            return(this);
        }
 public ItemDynamicStats Read(DAIIO io)
 {
     StatsCount = io.ReadInt16();
     ItemStats  = new ItemStatsData[StatsCount];
     for (int i = 0; i < StatsCount; i++)
     {
         ItemStats[i] = new ItemStatsData().Read(io);
     }
     return(this);
 }
Exemplo n.º 7
0
 public MapPins Read(DAIIO io)
 {
     PinIdCount = io.ReadInt16();
     PinIds     = new int[PinIdCount];
     for (int i = 0; i < PinIdCount; i++)
     {
         PinIds[i] = io.ReadInt32();
     }
     return(this);
 }
Exemplo n.º 8
0
 public ItemMaterials Read(DAIIO io)
 {
     Count     = io.ReadInt16();
     Materials = new ItemMaterial[Count];
     for (int i = 0; i < Count; i++)
     {
         Materials[i] = new ItemMaterial().Read(io);
     }
     return(this);
 }
 public ItemUpgrades Read(DAIIO io)
 {
     Count    = io.ReadInt16();
     Upgrades = new ItemUpgrade[Count];
     for (int i = 0; i < Count; i++)
     {
         Upgrades[i] = new ItemUpgrade().Read(io);
     }
     return(this);
 }
Exemplo n.º 10
0
 public DynamicPinsMaps Read(DAIIO io)
 {
     Count = io.ReadInt16();
     Pins  = new DynamicPinsMap[Count];
     for (int i = 0; i < Count; i++)
     {
         Pins[i] = new DynamicPinsMap().Read(io);
     }
     return(this);
 }
Exemplo n.º 11
0
 public ItemAbilities Read(DAIIO io)
 {
     Count     = io.ReadInt16();
     Abilities = new ItemAsset[Count];
     for (int i = 0; i < Count; i++)
     {
         Abilities[i] = new ItemAsset().Read(io);
     }
     return(this);
 }
 public CompositionDisplay Read(DAIIO io)
 {
     StringIdCount = io.ReadInt16();
     StringIds     = new int[StringIdCount];
     for (int i = 0; i < StringIdCount; i++)
     {
         StringIds[i] = io.ReadInt32();
     }
     return(this);
 }
 public CraftedStatIntances Read(DAIIO io)
 {
     StatsCount = io.ReadInt16();
     Stats      = new CraftedStatInstance[StatsCount];
     for (int i = 0; i < StatsCount; i++)
     {
         Stats[i] = new CraftedStatInstance().Read(io);
     }
     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);
        }
Exemplo n.º 15
0
 public LootManager Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     Version = io.ReadInt16();
     if (Version > 2)
     {
         PersistentLoot    = new PersistentLoot().Read(io);
         DynamicLootOwners = new DynamicLootOwners().Read(io);
     }
     return(this);
 }
Exemplo n.º 16
0
 public WorldStateManager Read(DAIIO io)
 {
     xLength           = io.ReadBit2(LengthBits);
     StateHistoryCount = io.ReadInt16();
     StateHistories    = new StateHistory[StateHistoryCount];
     for (int i = 0; i < StateHistoryCount; i++)
     {
         StateHistories[i] = new StateHistory().Read(io);
     }
     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 SpawnerCreateManager Read(DAIIO io)
 {
     xLength            = io.ReadBit2(LengthBits);
     SpawnerCreateCount = io.ReadInt16();
     SpawnerCreates     = new SpawnerCreate[SpawnerCreateCount];
     for (int i = 0; i < SpawnerCreateCount; i++)
     {
         SpawnerCreates[i] = new SpawnerCreate().Read(io);
     }
     return(this);
 }
Exemplo n.º 19
0
 public FogArchive Read(DAIIO io)
 {
     xLength  = io.ReadBit2(LengthBits);
     MapCount = io.ReadInt16();
     Maps     = new Map[MapCount];
     for (int i = 0; i < MapCount; i++)
     {
         Maps[i] = new Map().Read(io);
     }
     return(this);
 }
 public Inventory Read(DAIIO io)
 {
     xLength   = io.ReadBit2(LengthBits);
     ItemCount = io.ReadInt16();
     Items     = new ItemEntry[ItemCount];
     for (int i = 0; i < ItemCount; i++)
     {
         Items[i] = new ItemEntry().Read(io);
     }
     return(this);
 }
Exemplo n.º 21
0
 public MasterInfo Read(DAIIO io)
 {
     DestructionInfoCount = io.ReadInt16();
     PosAndImpacts        = new byte[DestructionInfoCount][];
     for (int i = 0; i < DestructionInfoCount; i++)
     {
         PosAndImpacts[i] = new byte[0x10];
         io.Read(PosAndImpacts[i], 0, 0x10);
     }
     return(this);
 }
 public PersistentLoot Read(DAIIO io)
 {
     xLength      = io.ReadBit2(LengthBits);
     LootMapCount = io.ReadInt16();
     LootMaps     = new LootMap[LootMapCount];
     for (int i = 0; i < LootMapCount; i++)
     {
         LootMaps[i] = new LootMap().Read(io);
     }
     return(this);
 }
 public DA3PartyMemberDataCache Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     Count   = io.ReadInt16();
     Caches  = new PartyMemberDataCache[Count];
     for (int i = 0; i < Count; i++)
     {
         Caches[i] = new PartyMemberDataCache().Read(io);
     }
     return(this);
 }
Exemplo n.º 24
0
 public CraftedStatInstance Read(DAIIO io)
 {
     xLength    = io.ReadBit2(LengthBits);
     StatsCount = io.ReadInt16();
     Stats      = new CraftedItemStats[StatsCount];
     for (int i = 0; i < StatsCount; i++)
     {
         Stats[i] = new CraftedItemStats().Read(io);
     }
     return(this);
 }
 public SpawnerInits Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     Count   = io.ReadInt16();
     Inits   = new Spawner[Count];
     for (int i = 0; i < Count; i++)
     {
         Inits[i] = new Spawner().Read(io);
     }
     return(this);
 }
 public PartDestructionComplex Read(DAIIO io)
 {
     xLength        = io.ReadBit2(LengthBits);
     OwnerInfoCount = io.ReadInt16();
     OwnerInfos     = new OwnerInfo[OwnerInfoCount];
     for (int i = 0; i < OwnerInfoCount; i++)
     {
         OwnerInfos[i] = new OwnerInfo(SStructure).Read(io);
     }
     return(this);
 }
 public OwnerInfo Read(DAIIO io)
 {
     xLength       = io.ReadBit2(LengthBits);
     Id            = io.ReadInt32();
     CallbackCount = io.ReadInt16();
     Callbacks     = new CallBackData[CallbackCount];
     for (int i = 0; i < CallbackCount; i++)
     {
         Callbacks[i] = new CallBackData().Read(io);
     }
     return(this);
 }
 public StoreInventories Read(DAIIO io)
 {
     xLength        = io.ReadBit2(LengthBits);
     Version        = io.ReadInt32();
     InventoryCount = io.ReadInt16();
     Inventories    = new StoreInventory[InventoryCount];
     for (int i = 0; i < InventoryCount; i++)
     {
         Inventories[i] = new StoreInventory(SStructure).Read(io);
     }
     return(this);
 }
 public SpawnerCreate Read(DAIIO io)
 {
     xLength            = io.ReadBit2(LengthBits);
     ID                 = io.ReadBit2(0x20);
     ControllablesCount = io.ReadInt16();
     Controllables      = new ControllableCreate[ControllablesCount];
     for (int i = 0; i < ControllablesCount; i++)
     {
         Controllables[i] = new ControllableCreate().Read(io);
     }
     return(this);
 }
Exemplo n.º 30
0
 public DynamicPinsMap Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     MapGuid = new byte[0x10];
     io.Read(MapGuid, 0, 0x10);
     PinsCount = io.ReadInt16();
     Pins      = new DynamicMapPinInfo[PinsCount];
     for (int i = 0; i < PinsCount; i++)
     {
         Pins[i] = new DynamicMapPinInfo().Read(io);
     }
     return(this);
 }