Beispiel #1
0
        private void OnLogout(bool fake)
        {
            if (!fake)
            {
                PacketHandlers.Party.Clear();

                SetTitleStr("");
                Engine.MainWindow.UpdateTitle();
                UOAssist.PostLogout();
                m_ConnStart = DateTime.MinValue;
            }

            World.Player = null;
            World.Items.Clear();
            World.Mobiles.Clear();
            Macros.MacroManager.Stop();
            ActionQueue.Stop();
            Counter.Reset();
            GoldPerHourTimer.Stop();
            DamageTracker.Stop();
            BandageTimer.Stop();
            GateTimer.Stop();
            BuffsTimer.Stop();
            StealthSteps.Unhide();
            Engine.MainWindow.OnLogout();
            if (Engine.MainWindow.MapWindow != null)
            {
                Engine.MainWindow.MapWindow.Close();
            }
            PacketHandlers.Party.Clear();
            PacketHandlers.IgnoreGumps.Clear();
            Config.Save();

            //TranslateEnabled = false;
        }
Beispiel #2
0
        private void OnDisconnected()
        {
            PacketHandlers.Party.Clear();
            //TODO reset window title
            Engine.MainWindow.UpdateTitle();
            UOAssist.PostLogout();

            World.Player = null;
            World.Items.Clear();
            World.Mobiles.Clear();
            Macros.MacroManager.Stop();
            ActionQueue.Stop();
            Counter.Reset();
            GoldPerHourTimer.Stop();
            BandageTimer.Stop();
            GateTimer.Stop();
            BuffsTimer.Stop();
            StealthSteps.Unhide();
            Engine.MainWindow.OnLogout();
            if (Engine.MainWindow.MapWindow != null)
            {
                Engine.MainWindow.MapWindow.Close();
            }
            PacketHandlers.Party.Clear();
            PacketHandlers.IgnoreGumps.Clear();
            Config.Save();
        }
Beispiel #3
0
            protected override void OnTick()
            {
                if (World.Player == null)
                {
                    BuffsTimer.Stop();
                    return;
                }

                Client.Instance.RequestTitlebarUpdate();

                if (!Config.GetBool("BuffDebuffEveryXSeconds") || !Config.GetBool("ShowBuffDebuffOverhead"))
                {
                    return;
                }

                foreach (BuffsDebuffs buffsDebuff in World.Player.BuffsDebuffs)
                {
                    TimeSpan diff     = DateTime.UtcNow - buffsDebuff.Timestamp;
                    int      timeLeft = buffsDebuff.Duration - (int)diff.TotalSeconds;

                    if (!IsFiltered(buffsDebuff.ClilocMessage1) && timeLeft % Config.GetInt("BuffDebuffSeconds") == 0)
                    {
                        World.Player.OverheadMessage(Config.GetInt("BuffHue"),
                                                     Config.GetString("BuffDebuffFormat").Replace("{action}", string.Empty)
                                                     .Replace("{name}", buffsDebuff.ClilocMessage1)
                                                     .Replace("{duration}", timeLeft.ToString()));
                    }
                }
            }
Beispiel #4
0
            protected override void OnTick()
            {
                if (World.Player == null)
                {
                    BuffsTimer.Stop();
                    return;
                }

                Client.Instance.RequestTitlebarUpdate();

                if (!Config.GetBool("BuffDebuffEveryXSeconds") || !Config.GetBool("ShowBuffDebuffOverhead"))
                {
                    return;
                }

                foreach (BuffDebuff buffsDebuff in World.Player.BuffsDebuffs)
                {
                    TimeSpan diff     = DateTime.UtcNow - buffsDebuff.Timestamp;
                    int      timeLeft = buffsDebuff.Duration - (int)diff.TotalSeconds;

                    if (timeLeft % Config.GetInt("BuffDebuffSeconds") == 0)
                    {
                        BuffDebuffManager.DisplayOverheadBuff(buffsDebuff, true);
                    }
                }
            }
Beispiel #5
0
        private static void OnDisconnected()
        {
            PacketHandlers.Party.Clear();



            World.Player = null;
            World.Items.Clear();
            World.Mobiles.Clear();
            ActionQueue.Stop();

            BuffsTimer.Stop();

            PacketHandlers.Party.Clear();
            PacketHandlers.IgnoreGumps.Clear();
        }