public WzFile(short gameVersion, WzMapleVersionType version) { Version = gameVersion; MapleVersionType = version; _wzIv = WzTool.GetIvByMapleVersion(version); WzDirectory.WzIv = _wzIv; }
/// <summary> /// Open a wz file from a file on the disk /// </summary> /// <param name="filePath">Path to the wz file</param> /// <param name="gameVersion"></param> /// <param name="version"></param> public WzFile(string filePath, short gameVersion, WzMapleVersionType version) { Name = Path.GetFileName(filePath); FilePath = filePath; Version = gameVersion; MapleVersionType = version; _wzIv = WzTool.GetIvByMapleVersion(version); }
public static byte[] GetIvByMapleVersion(WzMapleVersionType ver) { switch (ver) { case WzMapleVersionType.Ems: return(CryptoConstants.WzMseaiv); case WzMapleVersionType.Gms: return(CryptoConstants.WzGmsiv); case WzMapleVersionType.Bms: case WzMapleVersionType.Classic: case WzMapleVersionType.Generate: return(new byte[4]); default: throw new ArgumentOutOfRangeException(nameof(ver), ver, null); } }
/// <inheritdoc /> /// <summary> /// Open a wz file from a file on the disk /// </summary> /// <param name="filePath">Path to the wz file</param> /// <param name="version"></param> public WzFile(string filePath, WzMapleVersionType version) : this(filePath, -1, version) { }
public static void SaveToDisk(string path, WzMapleVersionType version, List <string> listEntries) { SaveToDisk(path, WzTool.GetIvByMapleVersion(version), listEntries); }
/// <summary> /// Parses a wz list file on the disk /// </summary> /// <param name="filePath">Path to the wz file</param> /// <param name="version"></param> public static List <string> ParseListFile(string filePath, WzMapleVersionType version) { return(ParseListFile(filePath, WzTool.GetIvByMapleVersion(version))); }
public WzImage(string name, Stream dataStream, WzMapleVersionType mapleVersion) { Name = name; Reader = new WzBinaryReader(dataStream, WzTool.GetIvByMapleVersion(mapleVersion)); }