Пример #1
0
        private static void AddXmlInstruction(string assemblyPath, PatchingManifest patchingManifest, bool enabled = true)
        {
            List <XmlInstruction> instructions = SettingsManager.XmlData.Instructions;

            Logger.Debug("Adding patch instruction: {0}", assemblyPath);

            var xmlInstruction = new XmlInstruction
            {
                IsEnabled = true,
                Name      = patchingManifest.PatchInfo.PatchName,
                Location  = assemblyPath
            };

            instructions.Add(xmlInstruction);

            SettingsManager.XmlData.Instructions = instructions;
        }
Пример #2
0
        private static void AddPatchesFromFolder()
        {
            List <XmlInstruction> instructions = SettingsManager.XmlData.Instructions;

            foreach (string assemblyPath in Files)
            {
                XmlInstruction collision = instructions.SingleOrDefault(x => x.Location.EqualsIgnoreCase(assemblyPath));

                if (collision != null)
                {
                    Logger.Debug("Patch already loaded: {0}", assemblyPath);

                    continue;
                }

                Logger.Debug("Loading patch: {0}", assemblyPath);

                TryAddPatch(assemblyPath);
            }
        }