mirror of
https://github.com/suloku/wc-tool.git
synced 2026-04-25 08:04:28 -05:00
Correct spelling.
Fix: buttons were not updated when manually changing game type.
This commit is contained in:
parent
45b21358c8
commit
d978b12581
2
wc3_tool/EventTool.Designer.cs
generated
2
wc3_tool/EventTool.Designer.cs
generated
|
|
@ -385,7 +385,7 @@ namespace WC3_TOOL
|
|||
this.Controls.Add(this.sav3_path);
|
||||
this.Controls.Add(this.load_save_but);
|
||||
this.Name = "EventTool";
|
||||
this.Text = "Gen3 Event Tool 0.1 by suloku";
|
||||
this.Text = "Gen3 Event Tool 0.1c by suloku";
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.EventToolDragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.EventToolDragEnter);
|
||||
this.JAP_group.ResumeLayout(false);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace WC3_TOOL
|
|||
public string savfilter = "RAW Save file|*.sav;*sa1;*sa2|All Files (*.*)|*.*";
|
||||
public string wc3filter = "Wonder Card file|*.wc3|All Files (*.*)|*.*";
|
||||
public string wcnfilter = "Wonder News file|*.wn3|All Files (*.*)|*.*";
|
||||
public string me3filter = "Mistery Event file|*.me3|All Files (*.*)|*.*";
|
||||
public string me3filter = "Mystery Event file|*.me3|All Files (*.*)|*.*";
|
||||
public string ectfilter = "e-card Trainer file|*.ect|All Files (*.*)|*.*";
|
||||
public string berryfilter = "e-card Berry file|*.ecb|All Files (*.*)|*.*";
|
||||
public byte[] savbuffer;
|
||||
|
|
@ -135,7 +135,7 @@ namespace WC3_TOOL
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref wc3new, ref path, wc3filter);
|
||||
|
|
@ -155,7 +155,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
}else
|
||||
{
|
||||
MessageBox.Show("Save file does not have Mistery Gift enabled.");
|
||||
MessageBox.Show("Save file does not have Mystery Gift enabled.");
|
||||
}
|
||||
}
|
||||
void Export_wcnClick(object sender, EventArgs e)
|
||||
|
|
@ -167,7 +167,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
void Inject_wcnClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref wcnnew, ref path, wcnfilter);
|
||||
|
|
@ -187,7 +187,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
}else
|
||||
{
|
||||
MessageBox.Show("Save file does not have Mistery Gift enabled.");
|
||||
MessageBox.Show("Save file does not have Mystery Gift enabled.");
|
||||
}
|
||||
}
|
||||
void Wcn_edit_butClick(object sender, EventArgs e)
|
||||
|
|
@ -199,19 +199,19 @@ namespace WC3_TOOL
|
|||
{
|
||||
int check = sav3file.has_ME3();
|
||||
if(check == 0)
|
||||
MessageBox.Show("Save file does not contain Mistery Event Data.");
|
||||
MessageBox.Show("Save file does not contain Mystery Event Data.");
|
||||
else if(check == 2)
|
||||
MessageBox.Show("Save file does contain Mistery Event Data, but the script has already been erased from savedata.");
|
||||
MessageBox.Show("Save file does contain Mystery Event Data, but the script has already been erased from savedata.");
|
||||
|
||||
if (check != 0)
|
||||
FileIO.save_data(sav3file.get_ME3(), me3filter);
|
||||
}
|
||||
void Inject_me3_butClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true || sav3file.game == 1)
|
||||
if (sav3file.has_mystery_event == true || sav3file.game == 1)
|
||||
{
|
||||
if (sav3file.game == 1)
|
||||
MessageBox.Show("Mistery Event was removed from non Japanesse Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
MessageBox.Show("Mystery Event was removed from non Japanesse Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref me3file, ref path, me3filter);
|
||||
if( filesize == sav3file.me3_size )
|
||||
|
|
@ -226,7 +226,7 @@ namespace WC3_TOOL
|
|||
//custom_script.Checked = true;
|
||||
//Add fix sav3 checksum func3
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Mistery event injected.");
|
||||
MessageBox.Show("Mystery event injected.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
}else
|
||||
{
|
||||
MessageBox.Show("Save file does not have Mistery Event enabled.");
|
||||
MessageBox.Show("Save file does not have Mystery Event enabled.");
|
||||
}
|
||||
}
|
||||
void Me3_editor_butClick(object sender, EventArgs e)
|
||||
|
|
@ -249,12 +249,12 @@ namespace WC3_TOOL
|
|||
{
|
||||
MessageBox.Show("This will enable the Eon ticket event as distributed in Japan.\nKeep in mind this event was never available outside Japan.\nIf you want a legit EON ticket in Emerald, you have to Mix Records with a Ruby/Saphire game with distributable EON ticket.");
|
||||
sav3file.enable_eon_emerald();
|
||||
MessageBox.Show("Mistery event EON Ticket injected.\n\nNote: if you saved in the 2nd floor of Pokémon Center, you'll have to exit and enter for the Blue man to appear.");
|
||||
MessageBox.Show("Mystery event EON Ticket injected.\n\nNote: if you saved in the 2nd floor of Pokémon Center, you'll have to exit and enter for the Blue man to appear.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
void EnableMisteryGiftEventToolStripMenuItemClick(object sender, EventArgs e)
|
||||
void EnableMysteryGiftEventToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
sav3file.enable_Mistery();
|
||||
sav3file.enable_Mystery();
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
void Region_butClick(object sender, EventArgs e)
|
||||
|
|
@ -288,19 +288,19 @@ namespace WC3_TOOL
|
|||
{
|
||||
/*int check = sav3file.has_ME3();
|
||||
if(check == 0)
|
||||
MessageBox.Show("Save file does not contain Mistery Event Data.");
|
||||
MessageBox.Show("Save file does not contain Mystery Event Data.");
|
||||
else if(check == 2)
|
||||
MessageBox.Show("Save file does contain Mistery Event Data, but the script has already been erased from savedata.");
|
||||
MessageBox.Show("Save file does contain Mystery Event Data, but the script has already been erased from savedata.");
|
||||
|
||||
if (check != 0)*/
|
||||
FileIO.save_data(sav3file.get_ECT(), ectfilter);
|
||||
}
|
||||
void Inject_ect_butClick(object sender, EventArgs e)
|
||||
{
|
||||
//if (sav3file.has_mistery_event == true || sav3file.game == 1)
|
||||
//if (sav3file.has_mystery_event == true || sav3file.game == 1)
|
||||
//{
|
||||
if (sav3file.game == 1)
|
||||
MessageBox.Show("Mistery Event was removed from non Japanesse Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
MessageBox.Show("Mystery Event was removed from non Japanesse Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref ectfile, ref path, ectfilter);
|
||||
if( filesize == ECT.SIZE_ECT )
|
||||
|
|
@ -317,7 +317,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
//}else
|
||||
//{
|
||||
// MessageBox.Show("Save file does not have Mistery Event enabled.");
|
||||
// MessageBox.Show("Save file does not have Mystery Event enabled.");
|
||||
//}
|
||||
}
|
||||
void EventToolDragEnter(object sender, DragEventArgs e)
|
||||
|
|
@ -460,32 +460,32 @@ namespace WC3_TOOL
|
|||
case 0://JAP
|
||||
if (jap_eon.Checked == true)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true)
|
||||
if (sav3file.has_mystery_event == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 0) //RS
|
||||
{
|
||||
sav3file.set_ME3((byte[]) Tickets.GetObject("JAP_EON_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
else if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
sav3file.enable_eon_emerald();
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\nGo see the man in blue at pokemon's center 2nd floor.\nNote: if you saved in the 2nd floor of Pokémon Center, you'll have to exit and enter for the Blue man to appear.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\nGo see the man in blue at pokemon's center 2nd floor.\nNote: if you saved in the 2nd floor of Pokémon Center, you'll have to exit and enter for the Blue man to appear.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Event in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Event in the savefile.");
|
||||
}
|
||||
}
|
||||
else if (jap_aurora.Checked == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("JAP_AURORA_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -494,7 +494,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -503,7 +503,7 @@ namespace WC3_TOOL
|
|||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("JAP_MYSTIC_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -512,13 +512,13 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Gift in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
else if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("JAP_MYSTIC_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -527,7 +527,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Gift in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -536,7 +536,7 @@ namespace WC3_TOOL
|
|||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("JAP_OLDMAP_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -545,7 +545,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Gift in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -554,43 +554,43 @@ namespace WC3_TOOL
|
|||
case 1://English
|
||||
if (usa_eon_ecard.Checked == true)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true)
|
||||
if (sav3file.has_mystery_event == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 0) //RS
|
||||
{
|
||||
sav3file.set_ME3((byte[]) Tickets.GetObject("USA_EON_ECARD_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Event in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Event in the savefile.");
|
||||
}
|
||||
}
|
||||
else if (usa_eon_italy.Checked == true)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true)
|
||||
if (sav3file.has_mystery_event == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 0) //RS
|
||||
{
|
||||
sav3file.set_ME3((byte[]) Tickets.GetObject("USA_EON_ITALY_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Event in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Event in the savefile.");
|
||||
}
|
||||
}
|
||||
else if (usa_aurora.Checked == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("USA_AURORA_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -599,13 +599,13 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
else if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("USA_AURORA_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -614,7 +614,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -623,7 +623,7 @@ namespace WC3_TOOL
|
|||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("USA_MYSTIC_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -632,14 +632,14 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Gift in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Gift in the savefile.");
|
||||
}
|
||||
|
||||
}/*
|
||||
else if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("USA_MYSTIC_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -648,7 +648,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Gift in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Gift in the savefile.");
|
||||
}
|
||||
}*/
|
||||
|
||||
|
|
@ -657,26 +657,26 @@ namespace WC3_TOOL
|
|||
case 2://French
|
||||
if (eur_eon.Checked == true)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true)
|
||||
if (sav3file.has_mystery_event == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 0) //RS
|
||||
{
|
||||
sav3file.set_ME3((byte[]) Tickets.GetObject("FR_EON_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Event in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Event in the savefile.");
|
||||
}
|
||||
}
|
||||
else if (eur_aurora.Checked == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("FR_AURORA_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -685,13 +685,13 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
else if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("FR_AURORA_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -700,7 +700,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -709,26 +709,26 @@ namespace WC3_TOOL
|
|||
case 3://Italian
|
||||
if (eur_eon.Checked == true)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true)
|
||||
if (sav3file.has_mystery_event == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 0) //RS
|
||||
{
|
||||
sav3file.set_ME3((byte[]) Tickets.GetObject("IT_EON_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Event in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Event in the savefile.");
|
||||
}
|
||||
}
|
||||
else if (eur_aurora.Checked == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("IT_AURORA_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -737,13 +737,13 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
else if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("IT_AURORA_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -752,7 +752,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -761,26 +761,26 @@ namespace WC3_TOOL
|
|||
case 4://German
|
||||
if (eur_eon.Checked == true)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true)
|
||||
if (sav3file.has_mystery_event == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 0) //RS
|
||||
{
|
||||
sav3file.set_ME3((byte[]) Tickets.GetObject("DE_EON_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Event in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Event in the savefile.");
|
||||
}
|
||||
}
|
||||
else if (eur_aurora.Checked == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("DE_AURORA_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -789,13 +789,13 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
else if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("DE_AURORA_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -804,7 +804,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -815,26 +815,26 @@ namespace WC3_TOOL
|
|||
case 6://Spanish
|
||||
if (eur_eon.Checked == true)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true)
|
||||
if (sav3file.has_mystery_event == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 0) //RS
|
||||
{
|
||||
sav3file.set_ME3((byte[]) Tickets.GetObject("SP_EON_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Eon Ticket Mistery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
MessageBox.Show("Eon Ticket Mystery Event injected.\n\nGo see your father at Petalburg Gym.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable Mistery Event in the savefile.");
|
||||
MessageBox.Show("Please enable Mystery Event in the savefile.");
|
||||
}
|
||||
}
|
||||
else if (eur_aurora.Checked == true)
|
||||
{
|
||||
if (game_box.SelectedIndex == 1) //E
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("SP_AURORA_E_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -843,13 +843,13 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
else if (game_box.SelectedIndex == 2) //FRLG
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
sav3file.set_WC3((byte[]) Tickets.GetObject("SP_AURORA_FRLG_FILE"));
|
||||
sav3file.update_section_chk(4);
|
||||
|
|
@ -858,7 +858,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enable mistery gift in the savefile.");
|
||||
MessageBox.Show("Please enable mystery gift in the savefile.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
24
wc3_tool/MainScreen.Designer.cs
generated
24
wc3_tool/MainScreen.Designer.cs
generated
|
|
@ -30,7 +30,7 @@ namespace WC3_TOOL
|
|||
private System.Windows.Forms.Button me3_editor_but;
|
||||
private System.Windows.Forms.Button eon_em_but;
|
||||
private System.Windows.Forms.ToolStripMenuItem extraToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem enableMisteryGiftMainScreenStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem enableMysteryGiftMainScreenStripMenuItem;
|
||||
private System.Windows.Forms.Button region_but;
|
||||
private System.Windows.Forms.ToolStripMenuItem fixSectionChecksumsToolStripMenuItem;
|
||||
private System.Windows.Forms.Button decor_but;
|
||||
|
|
@ -87,7 +87,7 @@ namespace WC3_TOOL
|
|||
this.exportOldSaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fixSectionChecksumsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extraToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.enableMisteryGiftMainScreenStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.enableMysteryGiftMainScreenStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.clearEggEventFlagToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.export_wcn = new System.Windows.Forms.Button();
|
||||
|
|
@ -229,19 +229,19 @@ namespace WC3_TOOL
|
|||
// extraToolStripMenuItem
|
||||
//
|
||||
this.extraToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.enableMisteryGiftMainScreenStripMenuItem,
|
||||
this.enableMysteryGiftMainScreenStripMenuItem,
|
||||
this.clearEggEventFlagToolStripMenuItem});
|
||||
this.extraToolStripMenuItem.Name = "extraToolStripMenuItem";
|
||||
this.extraToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.extraToolStripMenuItem.Text = "Extra";
|
||||
//
|
||||
// enableMisteryGiftMainScreenStripMenuItem
|
||||
// enableMysteryGiftMainScreenStripMenuItem
|
||||
//
|
||||
this.enableMisteryGiftMainScreenStripMenuItem.Enabled = false;
|
||||
this.enableMisteryGiftMainScreenStripMenuItem.Name = "enableMisteryGiftMainScreenStripMenuItem";
|
||||
this.enableMisteryGiftMainScreenStripMenuItem.Size = new System.Drawing.Size(207, 22);
|
||||
this.enableMisteryGiftMainScreenStripMenuItem.Text = "Enable Mistery Gift/Event";
|
||||
this.enableMisteryGiftMainScreenStripMenuItem.Click += new System.EventHandler(this.EnableMisteryGiftMainScreenStripMenuItemClick);
|
||||
this.enableMysteryGiftMainScreenStripMenuItem.Enabled = false;
|
||||
this.enableMysteryGiftMainScreenStripMenuItem.Name = "enableMysteryGiftMainScreenStripMenuItem";
|
||||
this.enableMysteryGiftMainScreenStripMenuItem.Size = new System.Drawing.Size(207, 22);
|
||||
this.enableMysteryGiftMainScreenStripMenuItem.Text = "Enable Mystery Gift/Event";
|
||||
this.enableMysteryGiftMainScreenStripMenuItem.Click += new System.EventHandler(this.EnableMysteryGiftMainScreenStripMenuItemClick);
|
||||
//
|
||||
// clearEggEventFlagToolStripMenuItem
|
||||
//
|
||||
|
|
@ -483,7 +483,7 @@ namespace WC3_TOOL
|
|||
this.groupBox1.Size = new System.Drawing.Size(219, 136);
|
||||
this.groupBox1.TabIndex = 28;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Mistery Gift";
|
||||
this.groupBox1.Text = "Mystery Gift";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
|
|
@ -496,7 +496,7 @@ namespace WC3_TOOL
|
|||
this.groupBox2.Size = new System.Drawing.Size(215, 136);
|
||||
this.groupBox2.TabIndex = 29;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Mistery Event";
|
||||
this.groupBox2.Text = "Mystery Event";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
|
|
@ -553,7 +553,7 @@ namespace WC3_TOOL
|
|||
this.Controls.Add(this.load_save_but);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Name = "MainScreen";
|
||||
this.Text = "Mistery Gift Tool 0.1 by suloku";
|
||||
this.Text = "Mystery Gift Tool 0.1c by suloku";
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.MainScreenDragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.MainScreenDragEnter);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace WC3_TOOL
|
|||
public static string savfilter = "RAW Save file|*.sav;*sa1;*sa2|All Files (*.*)|*.*";
|
||||
public string wc3filter = "Wonder Card file|*.wc3|All Files (*.*)|*.*";
|
||||
public string wcnfilter = "Wonder News file|*.wn3|All Files (*.*)|*.*";
|
||||
public string me3filter = "Mistery Event file|*.me3|All Files (*.*)|*.*";
|
||||
public string me3filter = "Mystery Event file|*.me3|All Files (*.*)|*.*";
|
||||
public string ectfilter = "e-card Trainer file|*.ect|All Files (*.*)|*.*";
|
||||
public string berryfilter = "e-card Berry file|*.ecb|All Files (*.*)|*.*";
|
||||
public byte[] savbuffer;
|
||||
|
|
@ -54,14 +54,9 @@ namespace WC3_TOOL
|
|||
Form wc3edit = new WC3_editor();
|
||||
wc3edit.ShowDialog();
|
||||
}
|
||||
void Load_save(string path)
|
||||
|
||||
void update_button_state()
|
||||
{
|
||||
int filesize = FileIO.load_file(ref savbuffer, ref path, savfilter);
|
||||
if( filesize == SAV3.SAVE_SIZE)
|
||||
{
|
||||
sav3_path.Text = path;
|
||||
sav3file = new SAV3(savbuffer);
|
||||
|
||||
export_wc3but.Enabled = false;
|
||||
inject_wc3_but.Enabled = false;
|
||||
export_wcn.Enabled = false;
|
||||
|
|
@ -80,7 +75,7 @@ namespace WC3_TOOL
|
|||
|
||||
toolStripMenuItem1.Enabled = false;
|
||||
exportOldSaveToolStripMenuItem.Enabled = false;
|
||||
enableMisteryGiftMainScreenStripMenuItem.Enabled = false;
|
||||
enableMysteryGiftMainScreenStripMenuItem.Enabled = false;
|
||||
fixSectionChecksumsToolStripMenuItem.Enabled = false;
|
||||
|
||||
switch(sav3file.game)
|
||||
|
|
@ -120,7 +115,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
toolStripMenuItem1.Enabled = true;
|
||||
exportOldSaveToolStripMenuItem.Enabled = true;
|
||||
enableMisteryGiftMainScreenStripMenuItem.Enabled = true;
|
||||
enableMysteryGiftMainScreenStripMenuItem.Enabled = true;
|
||||
fixSectionChecksumsToolStripMenuItem.Enabled = true;
|
||||
clearEggEventFlagToolStripMenuItem.Enabled = sav3file.has_EggEvent_Flag();
|
||||
|
||||
|
|
@ -133,6 +128,17 @@ namespace WC3_TOOL
|
|||
region_lab.Text = "USA/EUR";
|
||||
|
||||
region_but.Enabled = true;
|
||||
}
|
||||
|
||||
void Load_save(string path)
|
||||
{
|
||||
int filesize = FileIO.load_file(ref savbuffer, ref path, savfilter);
|
||||
if( filesize == SAV3.SAVE_SIZE)
|
||||
{
|
||||
sav3_path.Text = path;
|
||||
sav3file = new SAV3(savbuffer);
|
||||
|
||||
update_button_state();
|
||||
|
||||
language_box.SelectedIndex = sav3file.language-1;
|
||||
game_box.SelectedIndex = sav3file.game;
|
||||
|
|
@ -181,7 +187,7 @@ namespace WC3_TOOL
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref wc3new, ref path, wc3filter);
|
||||
|
|
@ -201,7 +207,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
}else
|
||||
{
|
||||
MessageBox.Show("Save file does not have Mistery Gift enabled.");
|
||||
MessageBox.Show("Save file does not have Mystery Gift enabled.");
|
||||
}
|
||||
}
|
||||
void Export_wcnClick(object sender, EventArgs e)
|
||||
|
|
@ -213,7 +219,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
void Inject_wcnClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sav3file.has_mistery_gift == true)
|
||||
if (sav3file.has_mystery_gift == true)
|
||||
{
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref wcnnew, ref path, wcnfilter);
|
||||
|
|
@ -233,7 +239,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
}else
|
||||
{
|
||||
MessageBox.Show("Save file does not have Mistery Gift enabled.");
|
||||
MessageBox.Show("Save file does not have Mystery Gift enabled.");
|
||||
}
|
||||
}
|
||||
void Wcn_edit_butClick(object sender, EventArgs e)
|
||||
|
|
@ -245,19 +251,19 @@ namespace WC3_TOOL
|
|||
{
|
||||
int check = sav3file.has_ME3();
|
||||
if(check == 0)
|
||||
MessageBox.Show("Save file does not contain Mistery Event Data.");
|
||||
MessageBox.Show("Save file does not contain Mystery Event Data.");
|
||||
else if(check == 2)
|
||||
MessageBox.Show("Save file does contain Mistery Event Data, but the script has already been erased from savedata.");
|
||||
MessageBox.Show("Save file does contain Mystery Event Data, but the script has already been erased from savedata.");
|
||||
|
||||
if (check != 0)
|
||||
FileIO.save_data(sav3file.get_ME3(), me3filter);
|
||||
}
|
||||
void Inject_me3_butClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sav3file.has_mistery_event == true || sav3file.game == 1)
|
||||
if (sav3file.has_mystery_event == true || sav3file.game == 1)
|
||||
{
|
||||
if (sav3file.game == 1)
|
||||
MessageBox.Show("Mistery Event was removed from non Japanese Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
MessageBox.Show("Mystery Event was removed from non Japanese Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref me3file, ref path, me3filter);
|
||||
if( filesize == sav3file.me3_size )
|
||||
|
|
@ -272,7 +278,7 @@ namespace WC3_TOOL
|
|||
//custom_script.Checked = true;
|
||||
//Add fix sav3 checksum func3
|
||||
sav3file.update_section_chk(4);
|
||||
MessageBox.Show("Mistery event injected.");
|
||||
MessageBox.Show("Mystery event injected.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
|
||||
|
|
@ -283,7 +289,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
}else
|
||||
{
|
||||
MessageBox.Show("Save file does not have Mistery Event enabled.");
|
||||
MessageBox.Show("Save file does not have Mystery Event enabled.");
|
||||
}
|
||||
}
|
||||
void Me3_editor_butClick(object sender, EventArgs e)
|
||||
|
|
@ -295,12 +301,12 @@ namespace WC3_TOOL
|
|||
{
|
||||
MessageBox.Show("This will enable the Eon ticket event as distributed in Japan.\nKeep in mind this event was never available outside Japan.\nIf you want a legit EON ticket in Emerald, you have to Mix Records with a Ruby/Saphire game with distributable EON ticket.");
|
||||
sav3file.enable_eon_emerald();
|
||||
MessageBox.Show("Mistery event EON Ticket injected.\n\nNote: if you saved in the 2nd floor of Pokémon Center, you'll have to exit and enter for the Blue man to appear.");
|
||||
MessageBox.Show("Mystery event EON Ticket injected.\n\nNote: if you saved in the 2nd floor of Pokémon Center, you'll have to exit and enter for the Blue man to appear.");
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
void EnableMisteryGiftMainScreenStripMenuItemClick(object sender, EventArgs e)
|
||||
void EnableMysteryGiftMainScreenStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
sav3file.enable_Mistery();
|
||||
sav3file.enable_Mystery();
|
||||
FileIO.save_data(sav3file.Data, savfilter);
|
||||
}
|
||||
void Region_butClick(object sender, EventArgs e)
|
||||
|
|
@ -334,19 +340,19 @@ namespace WC3_TOOL
|
|||
{
|
||||
/*int check = sav3file.has_ME3();
|
||||
if(check == 0)
|
||||
MessageBox.Show("Save file does not contain Mistery Event Data.");
|
||||
MessageBox.Show("Save file does not contain Mystery Event Data.");
|
||||
else if(check == 2)
|
||||
MessageBox.Show("Save file does contain Mistery Event Data, but the script has already been erased from savedata.");
|
||||
MessageBox.Show("Save file does contain Mystery Event Data, but the script has already been erased from savedata.");
|
||||
|
||||
if (check != 0)*/
|
||||
FileIO.save_data(sav3file.get_ECT(), ectfilter);
|
||||
}
|
||||
void Inject_ect_butClick(object sender, EventArgs e)
|
||||
{
|
||||
//if (sav3file.has_mistery_event == true || sav3file.game == 1)
|
||||
//if (sav3file.has_mystery_event == true || sav3file.game == 1)
|
||||
//{
|
||||
if (sav3file.game == 1)
|
||||
MessageBox.Show("Mistery Event was removed from non Japanese Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
MessageBox.Show("Mystery Event was removed from non Japanese Emerald.\n\tYou can still inject the data at your own risk.");
|
||||
string path = null;
|
||||
int filesize = FileIO.load_file(ref ectfile, ref path, ectfilter);
|
||||
if( filesize == ECT.SIZE_ECT )
|
||||
|
|
@ -363,7 +369,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
//}else
|
||||
//{
|
||||
// MessageBox.Show("Save file does not have Mistery Event enabled.");
|
||||
// MessageBox.Show("Save file does not have Mystery Event enabled.");
|
||||
//}
|
||||
}
|
||||
void MainScreenDragEnter(object sender, DragEventArgs e)
|
||||
|
|
@ -378,6 +384,7 @@ namespace WC3_TOOL
|
|||
void Game_boxSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
sav3file.game = game_box.SelectedIndex;
|
||||
update_button_state();
|
||||
sav3file.updateOffsets();
|
||||
}
|
||||
void Language_boxSelectedIndexChanged(object sender, EventArgs e)
|
||||
|
|
@ -394,6 +401,7 @@ namespace WC3_TOOL
|
|||
else
|
||||
region_lab.Text = "USA/EUR";
|
||||
|
||||
update_button_state();
|
||||
sav3file.updateOffsets();
|
||||
}
|
||||
void ExportOldSaveToolStripMenuItemClick(object sender, EventArgs e)
|
||||
|
|
@ -455,7 +463,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
void AboutToolStripMenuItem1Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Mistery Gift Tool 0.1 by suloku ("+version()+")\n\nMany thanks to ajxpkm, Real.96, BlackShark, lostaddict, Háčky and many more involved in Mistery Event research!\n\nThe research thread at projectpokemon.org might be of your interest.\n\nIf you want to contribute any missing event, contact suloku or ajxpkm at projectpokemon's forums or gen3mysterygift@gmail.com");
|
||||
MessageBox.Show("Mystery Gift Tool 0.1c by suloku ("+version()+")\n\nMany thanks to ajxpkm, Real.96, BlackShark, lostaddict, Háčky and many more involved in Mystery Event research!\n\nThe research thread at projectpokemon.org might be of your interest.\n\nIf you want to contribute any missing event, contact suloku or ajxpkm at projectpokemon's forums or gen3mysterygift@gmail.com");
|
||||
}
|
||||
void Tvswarm_butClick(object sender, EventArgs e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace WC3_TOOL
|
|||
isemerald = 1;
|
||||
return isemerald;
|
||||
}else{
|
||||
DialogResult dialogResult = MessageBox.Show("ME3 file script has wrong checksum. Is this a Ruby/Sapphire mistery event?", "Wrong checksum", MessageBoxButtons.YesNo);
|
||||
DialogResult dialogResult = MessageBox.Show("ME3 file script has wrong checksum. Is this a Ruby/Sapphire mystery event?", "Wrong checksum", MessageBoxButtons.YesNo);
|
||||
if(dialogResult == DialogResult.Yes)
|
||||
{
|
||||
isemerald = 0;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace WC3_TOOL
|
|||
//
|
||||
}
|
||||
|
||||
public string me3filter = "Mistery Event file|*.me3|All Files (*.*)|*.*";
|
||||
public string me3filter = "Mystery Event file|*.me3|All Files (*.*)|*.*";
|
||||
public string scriptfilter = "Script file|*.script|All Files (*.*)|*.*";
|
||||
public string xsescriptfilter = "XSE padded script file|*.gba";
|
||||
public byte[] me3buffer;
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@ namespace WC3_TOOL
|
|||
public int game = -1;
|
||||
public bool has_WC = false;
|
||||
public bool has_WCN = false;
|
||||
public bool has_mistery_gift = false;
|
||||
public bool has_mistery_event = false;
|
||||
public bool has_mystery_gift = false;
|
||||
public bool has_mystery_event = false;
|
||||
|
||||
public bool isjap = false;
|
||||
public int language = 0;
|
||||
|
|
@ -313,7 +313,7 @@ namespace WC3_TOOL
|
|||
|
||||
break;
|
||||
}
|
||||
has_Mistery();
|
||||
has_Mystery();
|
||||
has_WC3();
|
||||
hasWCN();
|
||||
has_EggEvent_Flag();
|
||||
|
|
@ -477,45 +477,45 @@ namespace WC3_TOOL
|
|||
else
|
||||
has_WC = true;
|
||||
}
|
||||
public void has_Mistery()
|
||||
public void has_Mystery()
|
||||
{
|
||||
//Check if save has enabled mistery gift
|
||||
//Check if save has enabled mystery gift
|
||||
byte[] check = new byte[1];
|
||||
switch (game)
|
||||
{
|
||||
case 0://Not that it has wondercards...but let's see the code for it
|
||||
check = getDataFromBlock(0x3A9, 1, 2);
|
||||
if ( (check[0]&0x10) == 0)
|
||||
has_mistery_event = false;
|
||||
has_mystery_event = false;
|
||||
else
|
||||
has_mistery_event = true;
|
||||
has_mystery_event = true;
|
||||
break;
|
||||
|
||||
case 1: //Emerald
|
||||
check = getDataFromBlock(0x405, 1, 2);
|
||||
if ( (check[0]&0x10) == 0)
|
||||
has_mistery_event = false;
|
||||
has_mystery_event = false;
|
||||
else
|
||||
has_mistery_event = true;
|
||||
has_mystery_event = true;
|
||||
|
||||
check = getDataFromBlock(0x40B, 1, 2);
|
||||
if ( (check[0]&0x8) == 0)
|
||||
has_mistery_gift = false;
|
||||
has_mystery_gift = false;
|
||||
else
|
||||
has_mistery_gift = true;
|
||||
has_mystery_gift = true;
|
||||
break;
|
||||
case 2: //FRLG
|
||||
check = getDataFromBlock(0x67, 1, 2);
|
||||
if ( (check[0]&0x2) == 0)
|
||||
has_mistery_gift = false;
|
||||
has_mystery_gift = false;
|
||||
else
|
||||
has_mistery_gift = true;
|
||||
has_mystery_gift = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void enable_Mistery() //TO DO: emerald mistery event on non-jap?
|
||||
public void enable_Mystery() //TO DO: emerald mystery event on non-jap?
|
||||
{
|
||||
//Check if save has enabled mistery gift
|
||||
//Check if save has enabled mystery gift
|
||||
byte[] check = new byte[1];
|
||||
switch (game)
|
||||
{
|
||||
|
|
@ -528,7 +528,7 @@ namespace WC3_TOOL
|
|||
break;
|
||||
|
||||
case 1: //Emerald
|
||||
if (isjap == true) // Mistery event. Save gets deleted if enabled in EUR/USA version
|
||||
if (isjap == true) // Mystery event. Save gets deleted if enabled in EUR/USA version
|
||||
{
|
||||
check = getDataFromBlock(0x405, 1, 2);
|
||||
if ( (check[0]&0x10) == 0){
|
||||
|
|
@ -551,7 +551,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
break;
|
||||
}
|
||||
has_Mistery();
|
||||
has_Mystery();
|
||||
}
|
||||
public byte[] get_WC3()
|
||||
{
|
||||
|
|
@ -879,16 +879,16 @@ namespace WC3_TOOL
|
|||
}
|
||||
public bool has_EggEvent_Flag()
|
||||
{
|
||||
//Check if save has enabled mistery gift
|
||||
//Check if save has enabled mystery gift
|
||||
byte[] check = new byte[1];
|
||||
switch (game)
|
||||
{
|
||||
/* case 0://Not that it has wondercards...but let's see the code for it
|
||||
check = getDataFromBlock(0x3A9, 1, 2);
|
||||
if ( (check[0]&0x10) == 0)
|
||||
has_mistery_event = false;
|
||||
has_mystery_event = false;
|
||||
else
|
||||
has_mistery_event = true;
|
||||
has_mystery_event = true;
|
||||
break;
|
||||
*/
|
||||
case 1: //Emerald
|
||||
|
|
@ -910,7 +910,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
public void clear_EggEvent_Flag()
|
||||
{
|
||||
//Check if save has enabled mistery gift
|
||||
//Check if save has enabled mystery gift
|
||||
byte[] check = new byte[1];
|
||||
switch (game)
|
||||
{
|
||||
|
|
@ -936,7 +936,7 @@ namespace WC3_TOOL
|
|||
}
|
||||
public void set_Enigma_Flag()
|
||||
{
|
||||
//Check if save has enabled mistery gift
|
||||
//Check if save has enabled mystery gift
|
||||
byte[] check = new byte[1];
|
||||
switch (game)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user