Пример #1
0
 // Token: 0x06000EFE RID: 3838 RVA: 0x000665A8 File Offset: 0x000649A8
 private void initializeModules()
 {
     if (ModuleHook.modules == null)
     {
         return;
     }
     for (int i = 0; i < ModuleHook.modules.Count; i++)
     {
         Module       module = ModuleHook.modules[i];
         ModuleConfig config = module.config;
         module.isEnabled = (config.IsEnabled && ModuleHook.areModuleDependenciesEnabled(i) && !ModuleHook.isModuleDisabledByCommandLine(config.Name));
     }
     if (ModuleHook.onModulesInitialized != null)
     {
         ModuleHook.onModulesInitialized();
     }
 }
Пример #2
0
 // Token: 0x06000EF7 RID: 3831 RVA: 0x00065FC8 File Offset: 0x000643C8
 private static void updateModuleEnabled(int index, bool enable)
 {
     if (enable)
     {
         if (ModuleHook.modules[index].config.IsEnabled && ModuleHook.areModuleDependenciesEnabled(index) && !ModuleHook.isModuleDisabledByCommandLine(ModuleHook.modules[index].config.Name))
         {
             ModuleHook.modules[index].isEnabled = true;
             for (int i = index + 1; i < ModuleHook.modules.Count; i++)
             {
                 for (int j = 0; j < ModuleHook.modules[i].config.Dependencies.Count; j++)
                 {
                     ModuleDependency moduleDependency = ModuleHook.modules[i].config.Dependencies[j];
                     if (moduleDependency.Name == ModuleHook.modules[index].config.Name)
                     {
                         ModuleHook.updateModuleEnabled(i, true);
                         break;
                     }
                 }
             }
         }
     }
     else
     {
         for (int k = ModuleHook.modules.Count - 1; k > index; k--)
         {
             for (int l = 0; l < ModuleHook.modules[k].config.Dependencies.Count; l++)
             {
                 ModuleDependency moduleDependency2 = ModuleHook.modules[k].config.Dependencies[l];
                 if (moduleDependency2.Name == ModuleHook.modules[index].config.Name)
                 {
                     ModuleHook.updateModuleEnabled(k, false);
                     break;
                 }
             }
         }
         ModuleHook.modules[index].isEnabled = false;
     }
 }