@@ -31,6 +31,7 @@ public bool TryPatch(Overwolf ow, out Exception error)
3131 }
3232 this . PrintHeader ( ) ;
3333 var resolver = new DefaultAssemblyResolver ( ) ;
34+ // resolver.AddSearchDirectory(ow.WindowsDesktopApp.FullName);
3435 resolver . AddSearchDirectory ( versionFolder . FullName ) ;
3536 var reader = new ReaderParameters { AssemblyResolver = resolver , ReadWrite = true , ReadingMode = ReadingMode . Immediate , InMemory = true } ;
3637
@@ -71,7 +72,8 @@ public bool TryPatch(Overwolf ow, out Exception error)
7172 try
7273 {
7374 overwolfCoreGES = OverwolfSubscriptionsGetExtensionSubscriptions ( ref overwolfSubscriptions , overwolfCoreGES ) ;
74- } catch ( Exception e )
75+ }
76+ catch ( Exception e )
7577 {
7678 Console . WriteLine ( "Error, Overwolf.Subscriptions will not be patched: " ) ;
7779 Console . WriteLine ( e ) ;
@@ -85,14 +87,17 @@ public bool TryPatch(Overwolf ow, out Exception error)
8587 fullPath . Backup ( true ) ;
8688 overwolfSubscriptions . Write ( fullPath . FullName ) ;
8789 Console . WriteLine ( Utils . Pad ( "Patched successfully" ) ) ;
88- } catch ( UnauthorizedAccessException ) { Console . WriteLine ( $ "Permission denied for file { fileString } ") ; } catch ( Exception e )
90+ }
91+ catch ( UnauthorizedAccessException ) { Console . WriteLine ( $ "Permission denied for file { fileString } ") ; }
92+ catch ( Exception e )
8993 {
9094 fullPath . Restore ( ) ;
9195 Console . WriteLine ( e ) ;
9296 }
9397 resolver . Dispose ( ) ;
94- Console . WriteLine ( "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" ) ;
95- } catch ( Exception ex )
98+ Console . WriteLine ( Utils . Fill ( '|' ) ) ;
99+ }
100+ catch ( Exception ex )
96101 {
97102 error = ex ;
98103 return false ;
@@ -164,7 +169,7 @@ public static MethodDefinition OverwolfSubscriptionsGetExtensionSubscriptions(re
164169 overwolfCoreGES . Body . Instructions [ 25 ] = Instruction . Create ( OpCodes . Ldloc_0 ) ;
165170 overwolfCoreGES . Body . Instructions [ 26 ] = Instruction . Create ( OpCodes . Callvirt , overwolfSubscriptions . MainModule . GetType ( "Overwolf.Subscriptions.Model.Subscription" ) . Methods . First ( x => x . Name == "set_PlanId" ) ) ;
166171 overwolfCoreGES . Body . Instructions [ 27 ] = Instruction . Create ( OpCodes . Ldloc_1 ) ;
167- overwolfCoreGES . Body . Instructions [ 28 ] = Instruction . Create ( OpCodes . Ldc_I8 , 1735682400000 ) ;
172+ overwolfCoreGES . Body . Instructions [ 28 ] = Instruction . Create ( OpCodes . Ldc_I8 , 1893530343000 ) ;
168173 overwolfCoreGES . Body . Instructions [ 29 ] = Instruction . Create ( OpCodes . Callvirt , overwolfSubscriptions . MainModule . GetType ( "Overwolf.Subscriptions.Model.Subscription" ) . Methods . First ( x => x . Name == "set_Expiry" ) ) ;
169174 overwolfCoreGES . Body . Instructions [ 30 ] = Instruction . Create ( OpCodes . Ldloc_1 ) ;
170175 overwolfCoreGES . Body . Instructions [ 31 ] = Instruction . Create ( OpCodes . Newobj , overwolfSubscriptions . MainModule . GetType ( "Overwolf.Subscriptions.Model.Subscription/Info" ) . Methods . First ( x => x . Name == ".ctor" ) ) ;
@@ -207,7 +212,7 @@ public static MethodDefinition OverwolfSubscriptionsGetExtensionSubscriptions(re
207212 overwolfCoreGES . Body . Instructions [ 66 ] = Instruction . Create ( OpCodes . Add ) ;
208213 overwolfCoreGES . Body . Instructions [ 67 ] = Instruction . Create ( OpCodes . Stloc_0 ) ;
209214 overwolfCoreGES . Body . Instructions [ 68 ] = Instruction . Create ( OpCodes . Ldloc_0 ) ;
210- overwolfCoreGES . Body . Instructions [ 69 ] = Instruction . Create ( OpCodes . Ldc_I4 , 9999 ) ;
215+ overwolfCoreGES . Body . Instructions [ 69 ] = Instruction . Create ( OpCodes . Ldc_I4 , 99999 ) ;
211216 overwolfCoreGES . Body . Instructions [ 70 ] = Instruction . Create ( OpCodes . Blt , overwolfCoreGES . Body . Instructions [ 19 ] ) ;
212217
213218 overwolfCoreGES . Body . Instructions [ 71 ] = Instruction . Create ( OpCodes . Ldc_I4_1 ) ;
0 commit comments