Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 public PartyMemberDataCache Read(DAIIO io)
 {
     PartyMemberID = io.ReadInt32();
     BufferSize    = io.ReadInt32();
     Buffer        = new byte[BufferSize];
     io.Read(Buffer, 0, BufferSize);
     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);
 }
Ejemplo n.º 4
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 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);
 }
Ejemplo n.º 6
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);
 }
        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);
        }
Ejemplo n.º 8
0
        public StateHistory Read(DAIIO io)
        {
            xLength = io.ReadBit2(LengthBits);
            Name    = "";
            var xpos  = io.Position;
            var count = (ushort)io.ReadBit(0x10);

            if (count == 0)
            {
                Unknown = io.ReadData(xLength - 0x10);
            }
            else
            {
                Name  = io.ReadString(count);
                count = (ushort)io.ReadBit(0x10);
                var xl = io.Position - xpos;
                Hash = new byte[count];
                if (count == 0)
                {
                    Unknown = io.ReadData((int)(xLength - xl));
                }
                else
                {
                    io.Read(Hash, 0, count);
                }
                xl = io.Position - xpos;
                if (xl < xLength)
                {
                    //var x1 = io.ReadBit2(0x18);
                    var d = io.ReadData((int)(xLength - xl));
                    Console.WriteLine(BitConverter.ToString(d).Replace("-", "") + @" ==== > ");
                }
            }

            return(this);
        }