1
- using System ;
1
+ using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Diagnostics ;
4
4
using System . IO ;
@@ -89,6 +89,7 @@ public void CalculateHashes()
89
89
{
90
90
FileHashes fh = new ( )
91
91
{
92
+ ClientDefinitionsHash = CalculateSHA1ForFile ( SafePath . CombineFilePath ( ProgramConstants . GetBaseResourcePath ( ) , ClientConfiguration . CLIENT_DEFS ) ) ,
92
93
GameOptionsHash = CalculateSHA1ForFile ( SafePath . CombineFilePath ( ProgramConstants . GamePath , ProgramConstants . BASE_RESOURCE_PATH , ClientConfiguration . GAME_OPTIONS ) ) ,
93
94
ClientDXHash = CalculateSHA1ForFile ( SafePath . CombineFilePath ( ProgramConstants . GetBaseResourcePath ( ) , "clientdx.exe" ) ) ,
94
95
ClientXNAHash = CalculateSHA1ForFile ( SafePath . CombineFilePath ( ProgramConstants . GetBaseResourcePath ( ) , "clientxna.exe" ) ) ,
@@ -105,6 +106,7 @@ public void CalculateHashes()
105
106
FHCConfigHash = CalculateSHA1ForFile ( SafePath . CombineFilePath ( ProgramConstants . BASE_RESOURCE_PATH , CONFIGNAME ) ) ,
106
107
} ;
107
108
109
+ Logger . Log ( $ "Hash for { ProgramConstants . BASE_RESOURCE_PATH } \\ { ClientConfiguration . CLIENT_DEFS } : { fh . ClientDefinitionsHash } ") ;
108
110
Logger . Log ( $ "Hash for { ProgramConstants . BASE_RESOURCE_PATH } \\ { CONFIGNAME } : { fh . FHCConfigHash } ") ;
109
111
Logger . Log ( $ "Hash for { ProgramConstants . BASE_RESOURCE_PATH } \\ { ClientConfiguration . GAME_OPTIONS } : { fh . GameOptionsHash } ") ;
110
112
Logger . Log ( $ "Hash for { ProgramConstants . BASE_RESOURCE_PATH } \\ clientdx.exe: { fh . ClientDXHash } ") ;
@@ -239,6 +241,7 @@ private static string BytesToString(byte[] bytes) =>
239
241
240
242
private class FileHashes ( )
241
243
{
244
+ public string ClientDefinitionsHash ;
242
245
public string GameOptionsHash ;
243
246
public string ClientDXHash ;
244
247
public string ClientXNAHash ;
@@ -276,6 +279,7 @@ public string AddHashForFileIfExists(string relativePath, string filePath)
276
279
public string GetFinalHash ( )
277
280
{
278
281
var sb = new StringBuilder ( ) ;
282
+ sb . Append ( ClientDefinitionsHash ) ;
279
283
sb . Append ( GameOptionsHash ) ;
280
284
sb . Append ( ClientDXHash ) ;
281
285
sb . Append ( ClientXNAHash ) ;
0 commit comments