예제 #1
0
        public void Read(GDFileReader file)
        {
            Block b = new Block();

            if (file.ReadBlockStart(b) != 12)
            {
                throw new Exception();
            }

            if (file.ReadInt() != 1) // version
            {
                throw new Exception();
            }

            names = new List <string>();
            UInt32 n = file.ReadInt();

            for (var i = 0; i < n; i++)
            {
                var name = GDString.Read(file);
                names.Add(name);
            }

            file.ReadBlockEnd(b);
        }
예제 #2
0
        public void Read(GDFileReader file)
        {
            Block b = new Block();

            if (file.ReadBlockStart(b) != 10)
            {
                throw new Exception();
            }

            if (file.ReadInt() != 2) // version
            {
                throw new Exception();
            }

            for (var i = 0; i < 3; i++)
            {
                tokens[i] = new List <string>();
                UInt32 n = file.ReadInt();

                for (var j = 0; j < n; j++)
                {
                    var token = GDString.Read(file);
                    tokens[i].Add(token);
                }
            }

            file.ReadBlockEnd(b);
        }
예제 #3
0
 public override void Read(GDFileReader file)
 {
     name               = GDString.Read(file);
     autoCastSkill      = GDString.Read(file);
     autoCastController = GDString.Read(file);
     itemSlot           = file.ReadInt();
     itemName           = GDString.Read(file);
 }
예제 #4
0
 public override void Read(GDFileReader file)
 {
     name               = GDString.Read(file);
     level              = file.ReadInt();
     enabled            = file.ReadByte();
     devotionLevel      = file.ReadInt();
     experience         = file.ReadInt();
     active             = file.ReadInt();
     unknown1           = file.ReadByte();
     unknown2           = file.ReadByte();
     autoCastSkill      = GDString.Read(file);
     autoCastController = GDString.Read(file);
 }
예제 #5
0
        public void Read(GDFileReader file)
        {
            Block b = new Block();

            if (file.ReadBlockStart(b) != 1)
            {
                throw new Exception();
            }

            var version = file.ReadInt();

            if (version < 3 || version > 5) // version
            {
                throw new Exception("Invalid character info version");
            }

            isInMainQuest      = file.ReadByte();
            hasBeenInGame      = file.ReadByte();
            difficulty         = file.ReadByte();
            greatestDifficulty = file.ReadByte();
            money = file.ReadInt();
            if (version >= 4)
            {
                greatestSurvivalDifficulty = file.ReadByte();
                currentTribute             = file.ReadInt();
            }

            compassState = file.ReadByte();

            if (version >= 2 && version <= 4)
            {
                lootMode = file.ReadInt();
            }

            skillWindowShowHelp    = file.ReadByte();
            alternateConfig        = file.ReadByte();
            alternateConfigEnabled = file.ReadByte();
            texture = GDString.Read(file);
            if (version >= 5)
            {
                uint size = file.ReadInt(true);

                var lootFilters = new byte[size];
                for (int i = 0; i < lootFilters.Length; i++)
                {
                    lootFilters[i] = file.ReadByte();
                }
            }

            file.ReadBlockEnd(b);
        }
예제 #6
0
 public override void Read(GDFileReader file)
 {
     baseName      = GDString.Read(file);
     prefixName    = GDString.Read(file);
     suffixName    = GDString.Read(file);
     modifierName  = GDString.Read(file);
     transmuteName = GDString.Read(file);
     seed          = file.ReadInt();
     relicName     = GDString.Read(file);
     relicBonus    = GDString.Read(file);
     relicSeed     = file.ReadInt();
     augmentName   = GDString.Read(file);
     unknown       = file.ReadInt();
     augmentSeed   = file.ReadInt();
     var1          = file.ReadInt();
     stackCount    = file.ReadInt();
 }
예제 #7
0
        public void Read(GDFileReader file)
        {
            Block b = new Block();

            if (file.ReadBlockStart(b) != 14)
            {
                throw new Exception();
            }

            var version = file.ReadInt();

            if (version != 5 && version != 4) // version
            {
                throw new Exception("Invalid save file version.");
            }

            unknown1 = file.ReadByte();
            unknown2 = file.ReadInt();
            unknown3 = file.ReadByte();

            for (var i = 0; i < 5; i++)
            {
                unknown4[i] = GDString.Read(file);
                unknown5[i] = GDString.Read(file);
                unknown6[i] = file.ReadByte();
            }

            int numberOfSlots = 46;

            if (version == 4)
            {
                numberOfSlots = 36;
            }
            slots = new HotSlot[numberOfSlots];

            for (var i = 0; i < numberOfSlots; i++)
            {
                slots[i] = new HotSlot();
                slots[i].Read(file);
            }

            cameraDistance = file.ReadFloat();

            file.ReadBlockEnd(b);
        }
예제 #8
0
        public override void Read(GDFileReader file)
        {
            type = file.ReadInt();

            if (type == 0)
            {
                skill         = GDString.Read(file);
                isItemSkill   = file.ReadByte();
                item          = GDString.Read(file);
                equipLocation = file.ReadInt();
            }
            else if (type == 4)
            {
                item       = GDString.Read(file);
                bitmapUp   = GDString.Read(file);
                bitmapDown = GDString.Read(file);
                label      = GDWString.Read(file);
            }
        }
예제 #9
0
        public void Read(GDFileReader file)
        {
            var headerVersion = file.ReadInt();

            if (headerVersion != 1 && headerVersion != 2) // Header version. Must be 2.
            {
                throw new Exception("Invalid header version.");
            }

            Name     = GDWString.Read(file);
            Sex      = file.ReadByte();
            Tag      = GDString.Read(file);
            Level    = file.ReadInt();
            Hardcore = file.ReadByte();
            if (headerVersion == 2)
            {
                file.ReadByte(); //expansion status
            }
        }
예제 #10
0
        public void Read(GDFileReader file)
        {
            Block b = new Block();

            if (file.ReadBlockStart(b) != 16)
            {
                throw new Exception();
            }

            var version = file.ReadInt();

            if (version < 7 || version > 11) // version
            {
                throw new Exception();
            }

            playTime                = file.ReadInt();
            deaths                  = file.ReadInt();
            kills                   = file.ReadInt();
            experienceFromKills     = file.ReadInt();
            healthPotionsUsed       = file.ReadInt();
            manaPotionsUsed         = file.ReadInt();
            maxLevel                = file.ReadInt();
            hitsReceived            = file.ReadInt();
            hitsInflicted           = file.ReadInt();
            criticalHitsInflicted   = file.ReadInt();
            criticalHitsReceived    = file.ReadInt();
            greatestDamageInflicted = file.ReadFloat();

            for (var i = 0; i < 3; i++)
            {
                greatestMonsterKilledName[i]        = GDString.Read(file);
                greatestMonsterKilledLevel[i]       = file.ReadInt();
                greatestMonsterKilledLifeAndMana[i] = file.ReadInt();
                lastMonsterHit[i]   = GDString.Read(file);
                lastMonsterHitBy[i] = GDString.Read(file);
            }

            championKills             = file.ReadInt();
            lastHit                   = file.ReadFloat();
            lastHitBy                 = file.ReadFloat();
            greatestDamageReceived    = file.ReadFloat();
            heroKills                 = file.ReadInt();
            itemsCrafted              = file.ReadInt();
            relicsCrafted             = file.ReadInt();
            transcendentRelicsCrafted = file.ReadInt();
            mythicalRelicsCrafted     = file.ReadInt();
            shrinesRestored           = file.ReadInt();
            oneShotChestsOpened       = file.ReadInt();
            loreNotesCollected        = file.ReadInt();

            for (var i = 0; i < 3; i++)
            {
                bossKills[i] = file.ReadInt();
            }

            if (version >= 9)
            {
                survivalWaveTier      = file.ReadInt();
                greatestSurvivalScore = file.ReadInt();
                cooldownRemaining     = file.ReadInt();
                cooldownTotal         = file.ReadInt();
            }

            if (version >= 11)
            {
                var skillTrackingMapCount = file.ReadInt();

                for (int i = 0; i < skillTrackingMapCount; i++)
                {
                    var s = GDString.Read(file);
                    var n = file.ReadInt();
                }

                var endlessSouls   = file.ReadInt();
                var endlessEssence = file.ReadInt();
                var difficultySkip = file.ReadByte();
            }

            uniqueItemsFound     = file.ReadInt();
            randomizedItemsFound = file.ReadInt();

            file.ReadBlockEnd(b);
        }