示例#1
0
        public void SaveIBsaTypes()
        {
            ClearBsaLists();

            foreach (var bsaEntry in IBsaTypes)
            {
                if (bsaEntry is BSA_Type0 type)
                {
                    Type0.Add(type);
                }
                else if (bsaEntry is BSA_Type1 type1)
                {
                    Type1.Add(type1);
                }
                else if (bsaEntry is BSA_Type2 type2)
                {
                    Type2.Add(type2);
                }
                else if (bsaEntry is BSA_Type3 type3)
                {
                    Type3.Add(type3);
                }
                else if (bsaEntry is BSA_Type4 type4)
                {
                    Type4.Add(type4);
                }
                else if (bsaEntry is BSA_Type6 type6)
                {
                    Type6.Add(type6);
                }
                else if (bsaEntry is BSA_Type7 type7)
                {
                    Type7.Add(type7);
                }
                else if (bsaEntry is BSA_Type8 type8)
                {
                    Type8.Add(type8);
                }
            }
        }
示例#2
0
        List <Type_3> GetType3(short count, int offset, List <Type_3> Type3, int idx)
        {
            if (Type3 == null)
            {
                Type3 = new List <Type_3>();
            }

            for (int i = 0; i < count; i++)
            {
                Type3.Add(new Type_3()
                {
                    Idx  = idx,
                    I_00 = BitConverter.ToUInt16(rawBytes, offset + 0),
                    I_02 = (ushort)(BitConverter.ToUInt16(rawBytes, offset + 2) - BitConverter.ToUInt16(rawBytes, offset + 0)),
                    I_04 = BitConverter.ToInt32(rawBytes, offset + 4),
                    I_08 = BitConverter.ToInt32(rawBytes, offset + 8),
                });

                offset += 12;
            }

            return(Type3);
        }