コード例 #1
0
 public void Read(BinaryReader br, float ver)
 {
     sex.read(br, ver);
     DBG.dbg1(sex.log());
     if (ver > 3)
     {
         bon.read(br, ver);
     }
     DBG.dbg1(bon.log());
     for (int i = 0; i < proplist.Count; i++)
     {
         proplist[i].read(br, ver);
         DBG.dbg1(proplist[i].log());
     }
     weightcnt = br.ReadUInt16();
     DBG.dbg1("weight=" + weightcnt.ToString());
     for (int i = 0; i < weightcnt; i++)
     {
         weights.Add(br.ReadUInt32());
         DBG.dbg1("weight[" + i.ToString() + "]=" + weights[i].ToString());
     }
     borndate.read(br, ver);
     DBG.dbg1(borndate.log());
     gencnt = br.ReadUInt16();
     for (int i = 0; i < gencnt; i++)
     {
         genesis.Add(br.ReadUInt16());
     }
     if (sex.value() == 1)
     {
         lastfuck = new MFDate("lastfuck");
         status   = new MFByte("status");
         lastfuck.read(br, ver);
         status.read(br, ver);
     }
     if (sex.value() == 2)
     {
         female = new RabFemale(br, ver, males, females);
     }
 }
コード例 #2
0
ファイル: mia_file_complex.cs プロジェクト: x-plora/miakro911
        public IMFCommon Getobj(char code, bool create)
        {
            IMFCommon obj = null;

            switch (code)
            {
            case 'a': if (create)
                {
                    Age = new MFUShort("age");
                }
                obj = Age; break;

            case 'w': if (create)
                {
                    Sweight = new MFUShort("weight");
                }
                obj = Sweight; break;

            case 'W': if (create)
                {
                    Lweight = new MFULong("weight");
                }
                obj = Lweight; break;

            case 'P': if (create)
                {
                    Price = new MFString("price");
                }
                obj = Price; break;

            case 'p': if (create)
                {
                    Partner = new MFString("partner");
                }
                obj = Partner; break;

            case 'S': if (create)
                {
                    Issold = new MFByte("is_sold");
                }
                obj = Issold; break;

            case 's': if (create)
                {
                    Skintype = new MFByte("skintype");
                }
                obj = Skintype; break;

            case 'n': if (create)
                {
                    Name = new MFString("name");
                }
                obj = Name; break;

            case 'b': if (create)
                {
                    Breed = new MFUShort("breed");
                }
                obj = Breed; break;

            case 'k': if (create)
                {
                    Kind = new MFString("kind");
                }
                obj = Kind; break;

            case 'm': if (create)
                {
                    Murder = new MFDate("murder");
                }
                obj = Murder; break;

            case 'B': if (create)
                {
                    Brutto = new MFUShort("brutto");
                }
                obj = Brutto; break;

            case 'N': if (create)
                {
                    Netto = new MFUShort("netto");
                }
                obj = Netto; break;

            case 'A': if (create)
                {
                    Address = new MFString("address");
                }
                obj = Address; break;

            case 'X': if (create)
                {
                    Sex = new MFByte("sex");
                }
                obj = Sex; break;
            }
            return(obj);
        }