public string version = "0.1.81"; // Must match version in Version.txt public void Initialize() { try { Directory.CreateDirectory(Application.StartupPath + "\\Profiles\\Wholesome Professions\\"); WholesomeProfessionsSettings.Load(); WholesomeProfessionsSave.Load(); TravelHelper.AddAllOffmeshConnections(); Logger.Log($"{productName} version {version} loaded"); } catch (Exception e) { Logging.WriteError("Main > Initialize(): " + e); } }
public static bool Load() { try { if (File.Exists(AdviserFilePathAndName("WholesomeProfessionsSave", ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load <WholesomeProfessionsSave>( AdviserFilePathAndName("WholesomeProfessionsSave", ObjectManager.Me.Name + "." + Usefuls.RealmName)); return(true); } CurrentSetting = new WholesomeProfessionsSave(); } catch (Exception e) { Logging.WriteError("WholesomeProfessionsSave > Load(): " + e); } return(false); }