Fixed some stuff

This commit is contained in:
Mega-Mew 2017-09-03 15:45:02 +02:00
parent b953117014
commit f46e7325a8
2 changed files with 28 additions and 7 deletions

View File

@ -3393,7 +3393,7 @@ private void InitializeComponent()
this.CB_Badge06.Name = "CB_Badge06";
this.CB_Badge06.Size = new System.Drawing.Size(121, 21);
this.CB_Badge06.TabIndex = 14;
this.Tool_Info.SetToolTip(this.CB_Badge06, "Baloon");
this.Tool_Info.SetToolTip(this.CB_Badge06, "Balloon");
this.CB_Badge06.SelectedIndexChanged += new System.EventHandler(this.legalBadgeCheck);
//
// PB_Badge09
@ -6293,7 +6293,6 @@ private void InitializeComponent()
this.Controls.Add(this.L_Info);
this.Controls.Add(this.PB_JPEG0);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false;

View File

@ -499,7 +499,7 @@ public Villager(byte[] data, int offset, int size)
Type = Data[2];
Boxed = (Data[0x24E4] & 1) == 1;
CatchPhrase = Encoding.Unicode.GetString(Data.Skip(0x24C6).Take(22).ToArray()).Trim('\0');
HomeTown1 = Encoding.Unicode.GetString(Data.Skip(0x24EE).Take(0x12).ToArray()).Trim('\0');
HomeTown1 = Encoding.Unicode.GetString(Data.Skip(0x24F0).Take(0x12).ToArray()).Trim('\0');
HomeTown2 = Encoding.Unicode.GetString(Data.Skip(0x2504).Take(0x12).ToArray()).Trim('\0');
}
public byte[] Write()
@ -508,7 +508,7 @@ public byte[] Write()
Data[2] = Type;
Data[0x24E4] = (byte)((Data[0x24E4] & ~1) | (Boxed ? 1 : 0));
Array.Copy(Encoding.Unicode.GetBytes(CatchPhrase.PadRight(11, '\0')), 0, Data, 0x24C6, 22);
Array.Copy(Encoding.Unicode.GetBytes(HomeTown1.PadRight(9, '\0')), 0, Data, 0x24EE, 0x12);
Array.Copy(Encoding.Unicode.GetBytes(HomeTown1.PadRight(9, '\0')), 0, Data, 0x24F0, 0x12);
Array.Copy(Encoding.Unicode.GetBytes(HomeTown2.PadRight(9, '\0')), 0, Data, 0x2504, 0x12);
return Data;
}
@ -713,7 +713,7 @@ private byte[] saveData()
Save.Fortune = CB_StreetFortune.Checked == true ? 1 : 0;
Save.Shampoodle = CB_StreetShampoodle.Checked == true ? 2 : 0;
Save.MuseumShop = CB_StreetMuseum.Checked == true ? 1 : 0;
Save.SewingMachine = CB_StreetSewing.Checked == true ? 80 : 0;
Save.SewingMachine = CB_StreetSewing.Checked == true ? 0x80 : 0;
}
byte[] finalData = (byte[])Save.Write().Clone();
@ -812,8 +812,8 @@ private void loadPlayer(int i)
private void savePlayer(int i)
{
Players[i].Name = TB_Name.Text;
Players[i].Comment = TB_Comment.Text;
for (int j = 0; j < PlayerBadges.Length; j++)
Players[i].Badges[j] = (byte)PlayerBadges[j].SelectedIndex;
@ -2641,7 +2641,7 @@ private void BTN_FixBadges_Click(object sender, EventArgs e)
}
}
if (CB_Badge06.SelectedIndex == 1) // ballons
if (CB_Badge06.SelectedIndex == 1) // balloon
{
if (NUD_Badge06.Value < 50)
{
@ -2795,6 +2795,28 @@ private void BTN_FixBadges_Click(object sender, EventArgs e)
}
}
if (CB_Badge14.SelectedIndex == 1) // weed
{
if (NUD_Badge13.Value < 500)
{
NUD_Badge13.Value = 500;
}
}
else if (CB_Badge14.SelectedIndex == 2)
{
if (NUD_Badge13.Value < 2000)
{
NUD_Badge13.Value = 2000;
}
}
else if (CB_Badge14.SelectedIndex == 3)
{
if (NUD_Badge13.Value < 5000)
{
NUD_Badge13.Value = 5000;
}
}
if (CB_Badge15.SelectedIndex == 1) // shopping
{
if (NUD_Badge15.Value < 500000)