Ejemplo n.º 1
0
 public AgentEntry Read(DAIIO io)
 {
     NameHash = io.ReadInt32();
     Index    = (short)io.ReadBit2(0x8);
     Entry    = (short)io.ReadBit2(0x10);
     return(this);
 }
Ejemplo n.º 2
0
 public TextureShaderParam Read(DAIIO io)
 {
     xLength           = io.ReadBit2(LengthBits);
     TSParameterHandle = io.ReadBit2(0x20);
     TextureHandle     = io.ReadBit2(0x20);
     return(this);
 }
 public PotionBank Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     Key     = new ItemAsset().Read(io);
     Value   = (byte)io.ReadBit2(0x8);
     return(this);
 }
Ejemplo n.º 4
0
 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 AgentLookup Read(DAIIO io)
 {
     Agent = new int[5];
     Index = (short)io.ReadBit2(0x8);
     for (int j = 0; j < 5; j++)
     {
         Agent[j] = io.ReadBit2(0x1A);
     }
     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);
        }
Ejemplo n.º 7
0
 public BodyShaderHandles Read(DAIIO io)
 {
     xLength     = io.ReadBit2(LengthBits);
     HandleCount = io.ReadBit2(0x10);
     Handles     = new int[HandleCount];
     for (int i = 0; i < HandleCount; i++)
     {
         Handles[i] = io.ReadBit2(0x20);
     }
     return(this);
 }
Ejemplo n.º 8
0
 public BoneOffsetsV1 Read(DAIIO io)
 {
     xLength           = io.ReadBit2(LengthBits);
     BoneOffsetsCount  = (short)io.ReadBit2(0x10);
     BoneOffsetEntries = new BoneOffsetEntryV1[BoneOffsetsCount];
     for (int i = 0; i < BoneOffsetsCount; i++)
     {
         BoneOffsetEntries[i] = new BoneOffsetEntryV1().Read(io);
     }
     return(this);
 }
Ejemplo n.º 9
0
 public AgentToc Read(DAIIO io)
 {
     xLength    = io.ReadBit2(LengthBits);
     AgentCount = io.ReadBit2(0x4);
     Agents     = new AgentEntry[AgentCount];
     for (int i = 0; i < AgentCount; i++)
     {
         Agents[i] = new AgentEntry().Read(io);
     }
     return(this);
 }
 public VectorShaderParam Read(DAIIO io)
 {
     xLength           = io.ReadBit2(LengthBits);
     VSParameterHandle = io.ReadBit2(0x20);
     Value             = new byte[0x10];
     for (int j = 0; j < 0x10; j++)
     {
         Value[j] = (byte)io.ReadBit(0x8);
     }
     return(this);
 }
 public TextureShader Read(DAIIO io)
 {
     xLength             = io.ReadBit2(LengthBits);
     ParamCount          = (short)io.ReadBit2(0x10);
     TextureShaderParams = new TextureShaderParam[ParamCount];
     for (int i = 0; i < ParamCount; i++)
     {
         TextureShaderParams[i] = new TextureShaderParam().Read(io);
     }
     return(this);
 }
Ejemplo n.º 12
0
 public HeadVariations Read(DAIIO io)
 {
     xLength        = io.ReadBit2(LengthBits);
     VariationCount = (short)io.ReadBit2(0x10);
     Variations     = new HeadVariation[VariationCount];
     for (int i = 0; i < VariationCount; i++)
     {
         Variations[i] = new HeadVariation().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);
 }
Ejemplo n.º 14
0
 public LootMap Read(DAIIO io)
 {
     xLength    = io.ReadBit2(LengthBits);
     LevelId    = io.ReadBit2(0x20);
     BufferSize = io.ReadBit2(0x20);
     Buffer     = new byte[BufferSize];
     for (int j = 0; j < BufferSize; j++)
     {
         Buffer[j] = (byte)io.ReadBit(0x8);
     }
     return(this);
 }
 public ExternalReference Read(DAIIO io)
 {
     SubLevel = io.ReadBit2(0x18);
     // x.Bundle = io.ReadBit2(0x18);
     EntityCount = (short)io.ReadBit2(0x10);
     Entities    = new int[EntityCount];
     for (int j = 0; j < EntityCount; j++)
     {
         Entities[j] = io.ReadBit2(0x20);
     }
     return(this);
 }
 public HeadVariation Read(DAIIO io)
 {
     xLength           = io.ReadBit2(LengthBits);
     Index             = (byte)io.ReadBit2(0x8);
     FaceVerticesSize  = io.ReadBit2(0x20);
     FaceVerticesBytes = new byte[FaceVerticesSize];
     for (int j = 0; j < FaceVerticesSize; j++)
     {
         FaceVerticesBytes[j] = (byte)io.ReadBit(0x8);
     }
     return(this);
 }
Ejemplo n.º 17
0
 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);
 }
Ejemplo n.º 18
0
 public Spawner Read(DAIIO io)
 {
     xLength           = io.ReadBit2(LengthBits);
     ID                = io.ReadInt32();
     ControllableCount = (short)io.ReadBit2(0xA);
     Controllables     = new SpawnerControllable[ControllableCount];
     for (int i = 0; i < ControllableCount; i++)
     {
         Controllables[i] = new SpawnerControllable().Read(io);
     }
     return(this);
 }
        public BoneOffsetEntryV2 Read(DAIIO io)
        {
            xLength      = io.ReadBit2(LengthBits);
            BoneNameHash = io.ReadBit2(0x20);
            Value        = new byte[0xC];
            for (int j = 0; j < 0xC; j++)
            {
                Value[j] = (byte)io.ReadBit(0x8);
            }

            return(this);
        }
        public DynamicLootOwners Read(DAIIO io)
        {
            xLength         = io.ReadBit2(LengthBits);
            NextUid         = io.ReadBit2(0x20);
            LootOwnersCount = io.ReadInt16();
            LootOwners      = new LootOwner[LootOwnersCount];
            for (int i = 0; i < LootOwnersCount; i++)
            {
                var x = new LootOwner();
                x.Read(io);
                LootOwners[i] = x;
            }

            return(this);
        }
Ejemplo n.º 21
0
 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 ClientAgent Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     Version = (short)io.ReadBit2(0x10);
     if (Version == 1)
     {
         AgentCount = io.ReadInt16();
         Agents     = new AgentEntryData[AgentCount];
         for (int i = 0; i < AgentCount; i++)
         {
             Agents[i] = new AgentEntryData().Read(io);
         }
     }
     return(this);
 }
Ejemplo n.º 23
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);
        }
Ejemplo n.º 24
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 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);
        }
 public ItemStatsData Read(DAIIO io)
 {
     xLength   = io.ReadBit2(LengthBits);
     StatsData = new ItemAsset().Read(io);
     Value     = io.ReadSingle();
     return(this);
 }
Ejemplo n.º 27
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);
        }
 public StoreItemEntry Read(DAIIO io)
 {
     xLength  = io.ReadBit2(LengthBits);
     NameHash = io.ReadInt32();
     Quantity = io.ReadInt32();
     return(this);
 }
 public ItemMaterial Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     Index   = io.ReadInt32();
     Asset   = new ItemAsset().Read(io);
     return(this);
 }
 public TerrainManager Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     Terrain = new Terrain(SStructure).Read(io);
     Part    = new TerrainPart(SStructure).Read(io);
     return(this);
 }