Beispiel #1
0
 public static void SerializeToXML(PluginSettings settings, string path)
 {
     XmlSerializer serializer = new XmlSerializer(typeof(PluginSettings));
     TextWriter textWriter = new StreamWriter(path);
     serializer.Serialize(textWriter, settings);
     textWriter.Close();
 }
Beispiel #2
0
        public void OnInitialize()
        {
            Logger.DBLog.DebugFormat("fBaseXtensions OnInitialize Started");

            if (File.Exists(FolderPaths.PluginPath + @"\CombatRoutine.cs"))
            {
                try
                {

                    if (File.Exists(FolderPaths.RoutinePath + @"\CombatRoutine.cs"))
                        File.Delete(FolderPaths.RoutinePath + @"\CombatRoutine.cs");

                    File.Copy(FolderPaths.PluginPath + @"\CombatRoutine.cs", FolderPaths.RoutinePath + @"\CombatRoutine.cs");
                    Logger.DBLog.DebugFormat("fBaseXtensions Copied Combat Routine");

                }
                catch (Exception ex)
                {
                    Logger.DBLog.DebugFormat("fBaseXtensions Copy Combat Routine Threw Exception", ex);
                }
            }

            Settings=new PluginSettings();
            PluginSettings.LoadSettings();
            TheCache.ObjectIDCache = new IDCache();
            CharacterControl.OrginalGameDifficultySetting = CharacterSettings.Instance.GameDifficulty;
            BotMain.OnStart += EventHandling.OnBotStart;
            BotMain.OnStop += EventHandling.OnBotStop;
            CustomConditions.Initialize();
            ObjectCache.FakeCacheObject = new CacheObject(Vector3.Zero, TargetType.None, 0d, "Fake Target", 1f);
            CharacterSettings.Instance.PropertyChanged += CharacterControl.OnDBCharacterSettingPropertyChanged;
            Logger.Write("Init Logger Completed!");
            Logger.DBLog.DebugFormat("fBaseXtensions OnInitialize Finished");
        }
Beispiel #3
0
 public static void SerializeToXML(PluginSettings settings)
 {
     SerializeToXML(settings, sFunkySettingsCurrentPath);
 }
Beispiel #4
0
 public static void SerializeToXML(PluginSettings settings)
 {
     SerializeToXML(settings, sFunkySettingsCurrentPath);
 }