Example #1
0
        /// <summary>
        /// A simple constructor that initializes the object with the given dependencies.
        /// </summary>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <param name="p_gmdGameMode">The game mode for which plugins are being managed.</param>
        /// <param name="p_futFileUtility">The file utility class.</param>
        /// <param name="p_strMasterlistPath">The path to the masterlist file to use.</param>
        public BossSorter(IEnvironmentInfo p_eifEnvironmentInfo, GamebryoGameModeBase p_gmdGameMode, FileUtil p_futFileUtility, string p_strMasterlistPath)
        {
            EnvironmentInfo = p_eifEnvironmentInfo;
            GameMode        = p_gmdGameMode;
            FileUtility     = p_futFileUtility;

            string strBAPIPath = Path.Combine(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "data"), p_eifEnvironmentInfo.Is64BitProcess ? "boss64.dll" : "boss32.dll");

            m_ptrBossApi = LoadLibrary(strBAPIPath);
            if (m_ptrBossApi == IntPtr.Zero)
            {
                throw new BossException(String.Format("Could not load BAPI library: {0}", strBAPIPath));
            }

            LoadMethods();

            m_ptrBossDb = CreateBossDb();

            MasterlistPath = p_strMasterlistPath;
            UserlistPath   = null;

            if (!String.IsNullOrEmpty(MasterlistPath) && File.Exists(MasterlistPath) ||
                !String.IsNullOrEmpty(UserlistPath) && File.Exists(UserlistPath))
            {
                Load(MasterlistPath, UserlistPath);
            }
        }
Example #2
0
        /// <summary>
        /// A simple constructor that initializes the object with the given dependencies.
        /// </summary>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <param name="p_gmdGameMode">The game mode for which plugins are being managed.</param>
        /// <param name="p_futFileUtility">The file utility class.</param>
        /// <param name="p_strMasterlistPath">The path to the masterlist file to use.</param>
        public PluginOrderManager(IEnvironmentInfo p_eifEnvironmentInfo, GamebryoGameModeBase p_gmdGameMode, FileUtil p_futFileUtility)
        {
            EnvironmentInfo = p_eifEnvironmentInfo;
            GameMode        = p_gmdGameMode;
            FileUtility     = p_futFileUtility;

            InitializeManager();
        }
Example #3
0
        /// <summary>
        /// A simple constructor that initializes the object with the given dependencies.
        /// </summary>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <param name="p_gmdGameMode">The game mode for which plugins are being managed.</param>
        /// <param name="p_futFileUtility">The file utility class.</param>
        /// <param name="p_strMasterlistPath">The path to the masterlist file to use.</param>
        public PluginSorter(IEnvironmentInfo p_eifEnvironmentInfo, GamebryoGameModeBase p_gmdGameMode, FileUtil p_futFileUtility, string p_strMasterlistPath)
        {
            EnvironmentInfo = p_eifEnvironmentInfo;
            GameMode        = p_gmdGameMode;
            FileUtility     = p_futFileUtility;

            string strSorterAPIPath = Path.Combine(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "data"), p_eifEnvironmentInfo.Is64BitProcess ? "loot64.dll" : "loot32.dll");

            m_ptrSorterApi = LoadLibrary(strSorterAPIPath);
            if (m_ptrSorterApi == IntPtr.Zero)
            {
                throw new SorterException(String.Format("Could not load BAPI library: {0}", strSorterAPIPath));
            }

            LoadMethods();

            m_ptrSorterDb = CreateSorterDb();

            if (m_ptrSorterDb == IntPtr.Zero)
            {
                m_booInitialized = false;
            }
            else
            {
                MasterlistPath = p_strMasterlistPath;
                string strUserList = Path.Combine(Path.GetDirectoryName(p_strMasterlistPath), "userlist.yaml");
                if (File.Exists(strUserList))
                {
                    UserlistPath = strUserList;
                }
                else
                {
                    UserlistPath = null;
                }

                if (!String.IsNullOrEmpty(MasterlistPath) && File.Exists(MasterlistPath))
                {
                    Load(MasterlistPath, UserlistPath);
                }

                m_booInitialized = true;
            }
        }
		/// <summary>
		/// A simple constructor that initializes the object with the given dependencies.
		/// </summary>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_gmdGameMode">The game mode for which plugins are being managed.</param>
		/// <param name="p_futFileUtility">The file utility class.</param>
		/// <param name="p_strMasterlistPath">The path to the masterlist file to use.</param>
		public PluginSorter(IEnvironmentInfo p_eifEnvironmentInfo, GamebryoGameModeBase p_gmdGameMode, FileUtil p_futFileUtility, string p_strMasterlistPath)
		{
			EnvironmentInfo = p_eifEnvironmentInfo;
			GameMode = p_gmdGameMode;
			FileUtility = p_futFileUtility;

			string strSorterAPIPath = Path.Combine(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "data"), p_eifEnvironmentInfo.Is64BitProcess ? "loot64.dll" : "loot32.dll");

			m_ptrSorterApi = LoadLibrary(strSorterAPIPath);
			if (m_ptrSorterApi == IntPtr.Zero)
				throw new SorterException(String.Format("Could not load BAPI library: {0}", strSorterAPIPath));

			LoadMethods();

			m_ptrSorterDb = CreateSorterDb();

			if (m_ptrSorterDb == IntPtr.Zero)
				m_booInitialized = false;
			else
			{
				MasterlistPath = p_strMasterlistPath;
				string strUserList = Path.Combine(Path.GetDirectoryName(p_strMasterlistPath), "userlist.yaml");
				if (File.Exists(strUserList))
					UserlistPath = strUserList;
				else
					UserlistPath = null;

				if (!String.IsNullOrEmpty(MasterlistPath) && File.Exists(MasterlistPath))
					Load(MasterlistPath, UserlistPath);

				m_booInitialized = true;
			}
		}
 /// <summary>
 /// Initialized the object with the given values.
 /// </summary>
 /// <param name="p_gmdGameMode">The current game mode.</param>
 public ArchiveInvalidationBase(GamebryoGameModeBase p_gmdGameMode)
 {
     GameMode      = p_gmdGameMode;
     LaunchCommand = new CheckedCommand("Archive Invalidation", "Toggles Archive Invalidation.", IsActive(), ToggleArchiveInvalidation);
 }
		/// <summary>
		/// A simple constructor that initializes the object with the given dependencies.
		/// </summary>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_gmdGameMode">The game mode for which plugins are being managed.</param>
		/// <param name="p_futFileUtility">The file utility class.</param>
		/// <param name="p_strMasterlistPath">The path to the masterlist file to use.</param>
		public PluginOrderManager(IEnvironmentInfo p_eifEnvironmentInfo, GamebryoGameModeBase p_gmdGameMode, FileUtil p_futFileUtility)
		{
			EnvironmentInfo = p_eifEnvironmentInfo;
			GameMode = p_gmdGameMode;
			FileUtility = p_futFileUtility;

			InitializeManager();
		}
 /// <summary>
 /// A simple constructor the initializes the object with the given values.
 /// </summary>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 public BsaManager(GamebryoGameModeBase p_gmdGameMode)
 {
     GameMode = p_gmdGameMode;
 }
		/// <summary>
		/// Initialized the object with the given values.
		/// </summary>
		/// <param name="p_gmdGameMode">The current game mode.</param>
		public ArchiveInvalidationBase(GamebryoGameModeBase p_gmdGameMode)
		{
			GameMode = p_gmdGameMode;
			LaunchCommand = new CheckedCommand("Archive Invalidation", "Toggles Archive Invalidation.", IsActive(), ToggleArchiveInvalidation);
		}
		/// <summary>
		/// A simple constructor the initializes the object with the given values.
		/// </summary>
		/// <param name="p_gmdGameMode">The game mode currently being managed.</param>
		public BsaManager(GamebryoGameModeBase p_gmdGameMode)
		{
			GameMode = p_gmdGameMode;
		}