Skip to content

Commit

Permalink
[MapleLib] Fix for KMS v.1.360.1.0 -- saving WZ
Browse files Browse the repository at this point in the history
  • Loading branch information
lastbattle committed Feb 19, 2022
1 parent 1e8bb63 commit 60fa381
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
11 changes: 4 additions & 7 deletions MapleLib/ClientLib/MapleStoryLocalisation.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MapleLib.ClientLib
namespace MapleLib.ClientLib
{
/// <summary>
/// The localisation number for each regional MapleStory version.
Expand All @@ -13,7 +7,10 @@ public enum MapleStoryLocalisation : int
{
MapleStoryKorea = 1,
MapleStoryKoreaTespia = 2,
Unknown3 = 3,
Unknown4 = 4,
MapleStoryTespia = 5,
Unknown6 = 6,
MapleStorySEA = 7,
MapleStoryGlobal = 8,
MapleStoryEurope = 9,
Expand Down
4 changes: 2 additions & 2 deletions MapleLib/WzLib/WzFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ public void SaveToDisk(string path, bool? override_saveAs64BitWZ, WzMapleVersion
{
wzWriter.Hash = versionHash;

uint totalLen = wzDir.GetImgOffsets(wzDir.GetOffsets(Header.FStart + (bSaveAs64BitWZ ? 0 : 2u)));
uint totalLen = wzDir.GetImgOffsets(wzDir.GetOffsets(Header.FStart + (bSaveAs64BitWZ && !this.b64BitClient_withVerHeader ? 0 : 2u)));
Header.FSize = totalLen - Header.FStart;
for (int i = 0; i < 4; i++)
{
Expand All @@ -591,7 +591,7 @@ public void SaveToDisk(string path, bool? override_saveAs64BitWZ, WzMapleVersion
{
wzWriter.Write(new byte[(int)extraHeaderLength]);
}
if (!bSaveAs64BitWZ)
if (!bSaveAs64BitWZ || this.b64BitClient_withVerHeader)
wzWriter.Write(wzVersionHeader);

wzWriter.Header = Header;
Expand Down
2 changes: 0 additions & 2 deletions MapleLib/WzLib/WzImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
using System;
using MapleLib.WzLib.Util;
using MapleLib.WzLib.WzProperties;
using System.Diagnostics;
using MapleLib.PacketLib;

namespace MapleLib.WzLib
{
Expand Down

0 comments on commit 60fa381

Please sign in to comment.