Beispiel #1
0
 public override Definition ParseMain(BinaryReader f, int RecNo)
 {
     var ret = new Definition();
     if (RConfig.Instance.DatVersionAsEnum >= DatVersion.Gracia_Plus__Epilogue)
     {
         var info = new ChargrpInfo_Gracia_Plus();
         int count = 300;
         info.hair_tab = new UNICODE();
         for (int i = 0; i < count; i++)
         {
             info.hair_tab.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < count - 1)
                 info.hair_tab.Text += ",";
         }
         info = (ChargrpInfo_Gracia_Plus) base.ReadFieldValue(f, info, "face_mesh", "cnt_dmg");
         info.snd_att = new UNICODE();
         for (int i = 0; i < info.cnt_att.Value; i++)
         {
             info.snd_att.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_att.Value - 1)
                 info.snd_att.Text += ",";
         }
         info.snd_def = new UNICODE();
         for (int i = 0; i < info.cnt_def.Value; i++)
         {
             info.snd_def.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_def.Value - 1)
                 info.snd_def.Text += ",";
         }
         info.snd_dmg = new UNICODE();
         for (int i = 0; i < info.cnt_dmg.Value; i++)
         {
             info.snd_dmg.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_dmg.Value - 1)
                 info.snd_dmg.Text += ",";
         }
         info = (ChargrpInfo_Gracia_Plus) base.ReadFieldValue(f, info, "voice_snd_hand", "p2");
         ret = info;
     }
     else if (RConfig.Instance.DatVersionAsEnum >= DatVersion.Kamael)
     {
         var info = new ChargrpInfo_CT1();
         ret = info;
     }
     else
     {
         var info = new ChargrpInfo();
         info = (ChargrpInfo) base.ReadFieldValue(f, info, "face_icon", "cnt_ft");
         info.hair_mesh = new UNICODE();
         for (int i = 0; i < info.cnt_hm.Value; i++)
         {
             info.hair_mesh.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_hm.Value - 1)
                 info.hair_mesh.Text += ",";
         }
         info.hair_tex = new UNICODE();
         for (int i = 0; i < info.cnt_ht.Value; i++)
         {
             info.hair_tex.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_ht.Value - 1)
                 info.hair_tex.Text += ",";
         }
         info.face_mesh = new UNICODE();
         for (int i = 0; i < info.cnt_fm.Value; i++)
         {
             info.face_mesh.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_fm.Value - 1)
                 info.face_mesh.Text += ",";
         }
         info.face_tex = new UNICODE();
         for (int i = 0; i < info.cnt_ft.Value; i++)
         {
             info.face_tex.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_ft.Value - 1)
                 info.face_tex.Text += ",";
         }
         info = (ChargrpInfo) base.ReadFieldValue(f, info, "body_mesh1", "cnt_dmg");
         info.snd_att = new UNICODE();
         for (int i = 0; i < info.cnt_att.Value; i++)
         {
             info.snd_att.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_att.Value - 1)
                 info.snd_att.Text += ",";
         }
         info.snd_def = new UNICODE();
         for (int i = 0; i < info.cnt_def.Value; i++)
         {
             info.snd_def.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_def.Value - 1)
                 info.snd_def.Text += ",";
         }
         info.snd_dmg = new UNICODE();
         for (int i = 0; i < info.cnt_dmg.Value; i++)
         {
             info.snd_dmg.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
             if (i < info.cnt_dmg.Value - 1)
                 info.snd_dmg.Text += ",";
         }
         info = (ChargrpInfo) base.ReadFieldValue(f, info, "voice_snd_hand", "voice_snd_fist");
         ret = info;
     }
     return ret;
 }
Beispiel #2
0
        public override Definition ParseMain(BinaryReader f, int RecNo)
        {
            var ret = new Definition();

            if (RConfig.Instance.DatVersionAsEnum >= DatVersion.Gracia_Plus__Epilogue)
            {
                var info  = new ChargrpInfo_Gracia_Plus();
                int count = 300;
                info.hair_tab = new UNICODE();
                for (int i = 0; i < count; i++)
                {
                    info.hair_tab.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < count - 1)
                    {
                        info.hair_tab.Text += ",";
                    }
                }
                info         = (ChargrpInfo_Gracia_Plus)base.ReadFieldValue(f, info, "face_mesh", "cnt_dmg");
                info.snd_att = new UNICODE();
                for (int i = 0; i < info.cnt_att.Value; i++)
                {
                    info.snd_att.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_att.Value - 1)
                    {
                        info.snd_att.Text += ",";
                    }
                }
                info.snd_def = new UNICODE();
                for (int i = 0; i < info.cnt_def.Value; i++)
                {
                    info.snd_def.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_def.Value - 1)
                    {
                        info.snd_def.Text += ",";
                    }
                }
                info.snd_dmg = new UNICODE();
                for (int i = 0; i < info.cnt_dmg.Value; i++)
                {
                    info.snd_dmg.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_dmg.Value - 1)
                    {
                        info.snd_dmg.Text += ",";
                    }
                }
                info = (ChargrpInfo_Gracia_Plus)base.ReadFieldValue(f, info, "voice_snd_hand", "p2");
                ret  = info;
            }
            else if (RConfig.Instance.DatVersionAsEnum >= DatVersion.Kamael)
            {
                var info = new ChargrpInfo_CT1();
                ret = info;
            }
            else
            {
                var info = new ChargrpInfo();
                info           = (ChargrpInfo)base.ReadFieldValue(f, info, "face_icon", "cnt_ft");
                info.hair_mesh = new UNICODE();
                for (int i = 0; i < info.cnt_hm.Value; i++)
                {
                    info.hair_mesh.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_hm.Value - 1)
                    {
                        info.hair_mesh.Text += ",";
                    }
                }
                info.hair_tex = new UNICODE();
                for (int i = 0; i < info.cnt_ht.Value; i++)
                {
                    info.hair_tex.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_ht.Value - 1)
                    {
                        info.hair_tex.Text += ",";
                    }
                }
                info.face_mesh = new UNICODE();
                for (int i = 0; i < info.cnt_fm.Value; i++)
                {
                    info.face_mesh.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_fm.Value - 1)
                    {
                        info.face_mesh.Text += ",";
                    }
                }
                info.face_tex = new UNICODE();
                for (int i = 0; i < info.cnt_ft.Value; i++)
                {
                    info.face_tex.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_ft.Value - 1)
                    {
                        info.face_tex.Text += ",";
                    }
                }
                info         = (ChargrpInfo)base.ReadFieldValue(f, info, "body_mesh1", "cnt_dmg");
                info.snd_att = new UNICODE();
                for (int i = 0; i < info.cnt_att.Value; i++)
                {
                    info.snd_att.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_att.Value - 1)
                    {
                        info.snd_att.Text += ",";
                    }
                }
                info.snd_def = new UNICODE();
                for (int i = 0; i < info.cnt_def.Value; i++)
                {
                    info.snd_def.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_def.Value - 1)
                    {
                        info.snd_def.Text += ",";
                    }
                }
                info.snd_dmg = new UNICODE();
                for (int i = 0; i < info.cnt_dmg.Value; i++)
                {
                    info.snd_dmg.Text += DatTool.ReadStringSimple_UnicodeInt32Length(f);
                    if (i < info.cnt_dmg.Value - 1)
                    {
                        info.snd_dmg.Text += ",";
                    }
                }
                info = (ChargrpInfo)base.ReadFieldValue(f, info, "voice_snd_hand", "voice_snd_fist");
                ret  = info;
            }
            return(ret);
        }