Skip to content

Commit

Permalink
[HaCreator] Fix 'check all map errors' for 64-bit maplestory
Browse files Browse the repository at this point in the history
  • Loading branch information
lastbattle committed Dec 13, 2022
1 parent 01ce914 commit 7318957
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions HaCreator/GUI/Initialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ private void button_initialise_Click(object sender, EventArgs e)
ApplicationSettings.MapleFolderIndex = pathBox.SelectedIndex;
string wzPath = pathBox.Text;

DirectoryInfo di = new DirectoryInfo(wzPath + "\\Data");

if (wzPath == "Select MapleStory Folder")
{
MessageBox.Show("Please select the MapleStory folder.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Expand All @@ -79,26 +77,7 @@ private void button_initialise_Click(object sender, EventArgs e)
{
ApplicationSettings.MapleFolder = ApplicationSettings.MapleFolder == "" ? wzPath : (ApplicationSettings.MapleFolder + "," + wzPath);
}
WzMapleVersion fileVersion;
/* short version = -1;
if (versionBox.SelectedIndex != 3)
{
string testFile = File.Exists(Path.Combine(wzPath, "Data.wz")) ? "Data.wz" : "Item.wz";
try
{
fileVersion = WzTool.DetectMapleVersion(Path.Combine(wzPath, testFile), out version);
}
catch (Exception ex)
{
HaRepackerLib.Warning.Error("Error initializing " + testFile + " (" + ex.Message + ").\r\nCheck that the directory is valid and the file is not in use.");
return;
}
}
else
{*/
fileVersion = (WzMapleVersion)versionBox.SelectedIndex;
// }

WzMapleVersion fileVersion = (WzMapleVersion)versionBox.SelectedIndex;
InitializeWzFiles(wzPath, fileVersion);

Hide();
Expand Down Expand Up @@ -340,8 +319,8 @@ private void debugButton_Click(object sender, EventArgs e)
// This function iterates over all maps in the game and verifies that we recognize all their props
// It is meant to use by the developer(s) to speed up the process of adjusting this program for different MapleStory versions
string wzPath = pathBox.Text;
short version = -1;
WzMapleVersion fileVersion = WzTool.DetectMapleVersion(Path.Combine(wzPath, "Item.wz"), out version);

WzMapleVersion fileVersion = (WzMapleVersion)versionBox.SelectedIndex;
InitializeWzFiles(wzPath, fileVersion);

MultiBoard mb = new MultiBoard();
Expand Down

0 comments on commit 7318957

Please sign in to comment.