示例#1
0
 void Inject_wcnClick(object sender, EventArgs e)
 {
     if (sav3file.has_mystery_gift == true)
     {
         string path     = null;
         int    filesize = FileIO.load_file(ref wcnnew, ref path, wcnfilter);
         if ((filesize == SAV3.WCN_SIZE && sav3file.isjap == false) || (filesize == SAV3.WCN_SIZE_jap && sav3file.isjap == true))
         {
             sav3file.set_WCN(wcnnew);
             //custom_script.Checked = true;
             //Add fix sav3 checksum func3
             sav3file.update_section_chk(4);
             MessageBox.Show("WC News injected.");
             FileIO.save_data(sav3file.Data, savfilter);
         }
         else if (filesize == -1)
         {
             ;
         }
         else
         {
             MessageBox.Show("Invalid file size.");
         }
     }
     else
     {
         MessageBox.Show("Save file does not have Mystery Gift enabled.");
     }
 }