Skip to content

Commit 0f10bbf

Browse files
authored
Merge pull request #814 from CnCNet/develop
Release 2.12.9
2 parents c193cf2 + 8622d4b commit 0f10bbf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DXMainClient/Online/FileHashCalculator.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
44
using System.IO;
@@ -89,6 +89,7 @@ public void CalculateHashes()
8989
{
9090
FileHashes fh = new()
9191
{
92+
ClientDefinitionsHash = CalculateSHA1ForFile(SafePath.CombineFilePath(ProgramConstants.GetBaseResourcePath(), ClientConfiguration.CLIENT_DEFS)),
9293
GameOptionsHash = CalculateSHA1ForFile(SafePath.CombineFilePath(ProgramConstants.GamePath, ProgramConstants.BASE_RESOURCE_PATH, ClientConfiguration.GAME_OPTIONS)),
9394
ClientDXHash = CalculateSHA1ForFile(SafePath.CombineFilePath(ProgramConstants.GetBaseResourcePath(), "clientdx.exe")),
9495
ClientXNAHash = CalculateSHA1ForFile(SafePath.CombineFilePath(ProgramConstants.GetBaseResourcePath(), "clientxna.exe")),
@@ -105,6 +106,7 @@ public void CalculateHashes()
105106
FHCConfigHash = CalculateSHA1ForFile(SafePath.CombineFilePath(ProgramConstants.BASE_RESOURCE_PATH, CONFIGNAME)),
106107
};
107108

109+
Logger.Log($"Hash for {ProgramConstants.BASE_RESOURCE_PATH}\\{ClientConfiguration.CLIENT_DEFS}: {fh.ClientDefinitionsHash}");
108110
Logger.Log($"Hash for {ProgramConstants.BASE_RESOURCE_PATH}\\{CONFIGNAME}: {fh.FHCConfigHash}");
109111
Logger.Log($"Hash for {ProgramConstants.BASE_RESOURCE_PATH}\\{ClientConfiguration.GAME_OPTIONS}: {fh.GameOptionsHash}");
110112
Logger.Log($"Hash for {ProgramConstants.BASE_RESOURCE_PATH}\\clientdx.exe: {fh.ClientDXHash}");
@@ -239,6 +241,7 @@ private static string BytesToString(byte[] bytes) =>
239241

240242
private class FileHashes()
241243
{
244+
public string ClientDefinitionsHash;
242245
public string GameOptionsHash;
243246
public string ClientDXHash;
244247
public string ClientXNAHash;
@@ -276,6 +279,7 @@ public string AddHashForFileIfExists(string relativePath, string filePath)
276279
public string GetFinalHash()
277280
{
278281
var sb = new StringBuilder();
282+
sb.Append(ClientDefinitionsHash);
279283
sb.Append(GameOptionsHash);
280284
sb.Append(ClientDXHash);
281285
sb.Append(ClientXNAHash);

0 commit comments

Comments
 (0)