Esempio n. 1
0
        //DateTime CooldownResetSince = DateTime.MinValue;

        public override void Initialize(PlayerTimersGroup parentGroup, string player, string timerId, WurmServer.ServerInfo.ServerGroup serverGroup, string compactId)
        {
            base.Initialize(parentGroup, player, timerId, serverGroup, compactId);
            TimerDisplay.SetCooldown(SermonPreacherCooldown);

            PerformAsyncInits();
        }
Esempio n. 2
0
        public override void Initialize(PlayerTimersGroup parentGroup, string player, string timerId, Aldurcraft.WurmOnline.WurmState.WurmServer.ServerInfo.ServerGroup serverGroup, string compactId)
        {
            base.Initialize(parentGroup, player, timerId, serverGroup, compactId);
            //MoreOptionsAvailable = true;
            TimerDisplay.SetCooldown(Options.Duration);

            PerformAsyncInits();
        }
Esempio n. 3
0
 public override void Initialize(PlayerTimersGroup parentGroup, string player, string timerId,
     WurmServer.ServerInfo.ServerGroup serverGroup, string compactId)
 {
     base.Initialize(parentGroup, player, timerId, serverGroup, compactId);
     Settings = new PersistentObject<JunkSaleTimerSettings>(new JunkSaleTimerSettings());
     Settings.SetFilePathAndLoad(SettingsSavePath);
     TimerDisplay.ShowSkill = true;
     VerifyMoneyAmountAgainstCd();
     UpdateMoneyCounter();
     InitCompleted = true;
 }
Esempio n. 4
0
 public override void Initialize(PlayerTimersGroup parentGroup, string player, string timerId, Aldurcraft.WurmOnline.WurmState.WurmServer.ServerInfo.ServerGroup serverGroup, string compactId)
 {
     base.Initialize(parentGroup, player, timerId, serverGroup, compactId);
     TimerDisplay.SetCooldown(CD_duration);
     this.InitCompleted = true;
 }
Esempio n. 5
0
        public override void Initialize(PlayerTimersGroup parentGroup, string player, string timerId, ServerInfo.ServerGroup serverGroup, string compactId)
        {
            base.Initialize(parentGroup, player, timerId, serverGroup, compactId);
            //more inits
            TimerDisplay.SetCooldown(ShortMeditCooldown);
            //load settings
            Settings = new PersistentObject<MeditTimerSettings>(new MeditTimerSettings());
            Settings.FilePath = SettingsSavePath;
            if (!Settings.Load()) Settings.Save();

            SleepNotify = new SleepBonusNotify(Player, "Can turn off sleep bonus now");
            SleepNotify.Enabled = SleepBonusReminder;

            TimerDisplay.UpdateSkill(MeditationSkill);
            TimerDisplay.ShowSkill = Settings.Value.ShowMeditSkill;
            TimerDisplay.ShowMeditCount = Settings.Value.ShowMeditCount;

            MoreOptionsAvailable = true;
            PerformAsyncInits();
        }
 public UControlPlayerLayout(PlayerTimersGroup playerTimersGroup)
     : this()
 {
     this.ParentGroup = playerTimersGroup;
     this.label1.Text = ParentGroup.Player + " (conjuring, please wait)";
 }
Esempio n. 7
0
        public override void Initialize(PlayerTimersGroup parentGroup, string player, string timerId, Aldurcraft.WurmOnline.WurmState.WurmServer.ServerInfo.ServerGroup serverGroup, string compactId)
        {
            base.Initialize(parentGroup, player, timerId, serverGroup, compactId);
            TimerDisplay.SetCooldown(TimeSpan.FromDays(1));

            Settings = new PersistentObject<MeditPathSettings>(new MeditPathSettings());
            Settings.SetFilePathAndLoad(SettingsSavePath);

            MoreOptionsAvailable = true;

            PerformAsyncInits();
        }
Esempio n. 8
0
        public virtual void Initialize(PlayerTimersGroup parentGroup, string player, string timerId, ServerInfo.ServerGroup serverGroup, string compactId)
        {
            //derived must call this base before their own inits!
            this.TimerID = timerId;
            this.TimerShortID = compactId;
            this.ParentGroup = parentGroup;
            this.Player = player;
            this.TargetServerGroup = serverGroup;

            SettingsSavePath = Path.Combine(
                ParentGroup.ThisGroupDir,
                TimerID.Replace(" ", "").Replace("(", "_").Replace(")", "") + ".xml");
            DefaultSettings = new PersistentObject<TimerDefaultSettings>(new TimerDefaultSettings());
            DefaultSettings.FilePath = SettingsSavePath.Replace(".xml", "_default.xml");
            if (!DefaultSettings.Load()) DefaultSettings.Save();

            TimerDisplay = new UControlTimerDisplay(this);
            ParentGroup.RegisterNewControlTimer(TimerDisplay);

            CDNotify = new CooldownHandler();
            CDNotify.Duration = DefaultSettings.Value.PopupDuration;
            CDNotify.Title = Player;
            CDNotify.Message = timerId + " cooldown finished";
            CDNotify.SoundEnabled = DefaultSettings.Value.SoundNotify;
            CDNotify.PopupEnabled = DefaultSettings.Value.PopupNotify;
            CDNotify.PersistPopup = DefaultSettings.Value.PersistentPopup;
            CDNotify.SoundName = DefaultSettings.Value.SoundName;
            if (PopupOnWALaunch) CDNotify.ResetShownAndPlayed();

            Aldurcraft.WurmOnline.WurmState.WurmServer.OnPotentialWurmDateAndUptimeChange += _handleServerChange;
        }