예제 #1
0
        public void Read(BinaryReader reader)
        {
            statsVersion      = new Value <int>(reader.ReadInt32());
            buffCategoryFlags = (EnumBuffCategoryFlags)reader.ReadInt32();

            //num2
            int immunityLength = reader.ReadInt32();

            for (int i = 0; i < immunityLength; i++)
            {
                int num = reader.ReadInt32();
                if (i < immunity.Length)
                {
                    immunity[i] = num;
                }
            }

            idTable = new Dictionary <ushort, StatModifier>();
            health  = new Stat();
            health.Read(reader, idTable);
            stamina = new Stat();
            stamina.Read(reader, idTable);
            sickness = new Stat();
            sickness.Read(reader, idTable);
            gassiness = new Stat();
            gassiness.Read(reader, idTable);
            speedModifier = new Stat();
            speedModifier.Read(reader, idTable);
            wellness = new Stat();
            wellness.Read(reader, idTable);
            coreTemp = new Stat();
            coreTemp.Read(reader, idTable);
            food = new Stat();
            food.Read(reader, idTable);
            water = new Stat();
            water.Read(reader, idTable);

            waterLevel = new Value <float>(reader.ReadSingle());

            //num4
            int buffListCount = reader.ReadInt32();

            buffList = new List <Buff>();
            for (int j = 0; j < buffListCount; j++)
            {
                Buff buff = Buff.Read(reader, idTable);
                buffList.Add(buff);
            }

            //num5
            int multiBuffVariableDictionaryCount = reader.ReadInt32();

            multiBuffVariableDictionary = new Dictionary <string, MultiBuffVariable>();
            for (int k = 0; k < multiBuffVariableDictionaryCount; k++)
            {
                string key = reader.ReadString();
                multiBuffVariableDictionary[key] = MultiBuffVariable.Read(reader);
            }
        }
예제 #2
0
 public virtual void Read(BinaryReader reader, int version)
 {
     UID               = new Value <int>(reader.ReadInt32());
     fileId            = new Value <ushort>(reader.ReadUInt16());
     buffCategoryFlags = (EnumBuffCategoryFlags)reader.ReadInt32();
     stackCount        = new Value <int>(reader.ReadInt32());
     buffTimer         = BuffTimer.Read(reader);
 }