예제 #1
0
        void UserSettings_Loaded(object sender, EventArgs e)
        {
            autoHeal         = Config.Profile.UserSettings.GetAttribute(true, "Value", "AutoHeal");
            healMoby         = Config.Profile.UserSettings.GetAttribute(true, "Value", "HealMoby");
            destroySpiderWeb = Config.Profile.UserSettings.GetAttribute(true, "Value", "DestroySpiderWeb");
            handleFrozen     = Config.Profile.UserSettings.GetAttribute(true, "Value", "HandleFrozen");
            rename           = (RenameType)Config.Profile.UserSettings.GetAttribute((int)RenameType.OnAppeared, "Value", "Rename");

            healMinDamagePerc = Config.Profile.UserSettings.GetAttribute(0, "Value", "HealMinDamagePerc");
            attackDelay       = Config.Profile.UserSettings.GetAttribute(1500, "Value", "AttackDelay");
            useWatcher        = Config.Profile.UserSettings.GetAttribute(false, "Value", "UseWatcher");

            healType = (AutoHealType)Config.Profile.UserSettings.GetAttribute((int)AutoHealType.Automatic, "Value", "HealType");
            loot     = (LootType)Config.Profile.UserSettings.GetAttribute((int)LootType.OpenCorpse, "Value", "Loot");

            trainPoison = Config.Profile.UserSettings.GetAttribute(true, "Value", "TrainPoison");

            friendHitsMessageType = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "FriendHitsMessageType");
            enemyHitsMessageType  = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "EnemyHitsMessageType");
            castMessageType       = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "CastMessageType");
            playerHitsMessageType = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "PlayerHitsMessageType");

            useWallTime = Config.Profile.UserSettings.GetAttribute(true, "Value", "UseWallTime");


            salatAlertHp = Config.Profile.UserSettings.GetAttribute("33%", "Value", "SalatAlertHp");

            lootItemTypes = Config.Profile.UserSettings.GetAttribute(CalExtension.UOExtensions.Loot.LootDefaultItemTypes, "Value", "LootItemTypes");
            // playerAliases = Config.Profile.UserSettings.GetAttribute(String.Empty, "Value", "PlayerAliases");
            playerAliases        = GetGlobalFile("PlayerAliases.txt", "");
            bakGlobalCalebConfig = globalCalebConfig = GetGlobalFile("globalCalebConfig.xml", "<Config></Config>");
            globalDocument       = null;
            OnPropertyChanged(EventArgs.Empty);
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CorpsesAutoopen"/> class.
        /// </summary>
        public CalebConfig()
        {
            // Pozn: Snazim se mit staticky jen uplne minimum, protoze co je v instanci sezere pri rekompilaci GC

            autoHeal          = Config.Profile.UserSettings.GetAttribute(true, "Value", "AutoHeal");
            healMoby          = Config.Profile.UserSettings.GetAttribute(true, "Value", "HealMoby");
            destroySpiderWeb  = Config.Profile.UserSettings.GetAttribute(true, "Value", "DestroySpiderWeb");
            handleFrozen      = Config.Profile.UserSettings.GetAttribute(true, "Value", "HandleFrozen");
            rename            = (RenameType)Config.Profile.UserSettings.GetAttribute((int)RenameType.OnAppeared, "Value", "Rename");
            healMinDamagePerc = Config.Profile.UserSettings.GetAttribute(0, "Value", "HealMinDamagePerc");
            attackDelay       = Config.Profile.UserSettings.GetAttribute(1500, "Value", "AttackDelay");
            useWatcher        = Config.Profile.UserSettings.GetAttribute(false, "Value", "UseWatcher");

            healType = (AutoHealType)Config.Profile.UserSettings.GetAttribute((int)AutoHealType.Automatic, "Value", "HealType");
            loot     = (LootType)Config.Profile.UserSettings.GetAttribute((int)LootType.OpenCorpse, "Value", "Loot");

            trainPoison = Config.Profile.UserSettings.GetAttribute(true, "Value", "TrainPoison");

            friendHitsMessageType = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "FriendHitsMessageType");
            enemyHitsMessageType  = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "EnemyHitsMessageType");
            castMessageType       = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "CastMessageType");
            playerHitsMessageType = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "PlayerHitsMessageType");

            useWallTime = Config.Profile.UserSettings.GetAttribute(true, "Value", "UseWallTime");

            lootItemTypes = Config.Profile.UserSettings.GetAttribute(CalExtension.UOExtensions.Loot.LootDefaultItemTypes, "Value", "LootItemTypes");

            Config.Profile.UserSettings.Loaded += new EventHandler(UserSettings_Loaded);
            Config.Profile.UserSettings.Saving += new EventHandler(UserSettings_Saving);
        }
예제 #3
0
        //private SynchronizedSettings globalsettings;
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CorpsesAutoopen"/> class.
        /// </summary>
        public CalebConfig()
        {
            // Pozn: Snazim se mit staticky jen uplne minimum, protoze co je v instanci sezere pri rekompilaci GC
            // globalsettings = new SynchronizedSettings("Phoenix");

            // Core.Directory;

            autoHeal          = Config.Profile.UserSettings.GetAttribute(true, "Value", "AutoHeal");
            healMoby          = Config.Profile.UserSettings.GetAttribute(true, "Value", "HealMoby");
            destroySpiderWeb  = Config.Profile.UserSettings.GetAttribute(true, "Value", "DestroySpiderWeb");
            handleFrozen      = Config.Profile.UserSettings.GetAttribute(true, "Value", "HandleFrozen");
            rename            = (RenameType)Config.Profile.UserSettings.GetAttribute((int)RenameType.OnAppeared, "Value", "Rename");
            healMinDamagePerc = Config.Profile.UserSettings.GetAttribute(0, "Value", "HealMinDamagePerc");
            attackDelay       = Config.Profile.UserSettings.GetAttribute(1500, "Value", "AttackDelay");
            useWatcher        = Config.Profile.UserSettings.GetAttribute(false, "Value", "UseWatcher");

            healType = (AutoHealType)Config.Profile.UserSettings.GetAttribute((int)AutoHealType.Automatic, "Value", "HealType");
            loot     = (LootType)Config.Profile.UserSettings.GetAttribute((int)LootType.OpenCorpse, "Value", "Loot");

            trainPoison = Config.Profile.UserSettings.GetAttribute(true, "Value", "TrainPoison");

            friendHitsMessageType = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "FriendHitsMessageType");
            enemyHitsMessageType  = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "EnemyHitsMessageType");
            castMessageType       = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "CastMessageType");
            playerHitsMessageType = (MessagePrintType)Config.Profile.UserSettings.GetAttribute((int)MessagePrintType.Default, "Value", "PlayerHitsMessageType");

            useWallTime = Config.Profile.UserSettings.GetAttribute(true, "Value", "UseWallTime");

            lootItemTypes = Config.Profile.UserSettings.GetAttribute(CalExtension.UOExtensions.Loot.LootDefaultItemTypes, "Value", "LootItemTypes");
            playerAliases = GetGlobalFile("PlayerAliases.txt", "");// Config.Profile.UserSettings.GetAttribute(String.Empty, "Value", "PlayerAliases");

            salatAlertHp = Config.Profile.UserSettings.GetAttribute("33%", "Value", "SalatAlertHp");

            bakGlobalCalebConfig = globalCalebConfig = GetGlobalFile("globalCalebConfig.xml", "<Config></Config>");// Config.Profile.UserSettings.GetAttribute(String.Empty, "Value", "PlayerAliases");

            Config.Profile.UserSettings.Loaded += new EventHandler(UserSettings_Loaded);
            Config.Profile.UserSettings.Saving += new EventHandler(UserSettings_Saving);
            globalDocument = null;
            //globalsettings.Loaded += Globalsettings_Loaded;
            //globalsettings.Saving += Globalsettings_Saving;
        }