Beispiel #1
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 #2
0
        public override void OnMapChange(byte old, byte cur)
        {
            ArrayList list = new ArrayList(World.Mobiles.Values);

            for (int i = 0; i < list.Count; i++)
            {
                Mobile m = (Mobile)list[i];
                if (m != this && m.Map != cur)
                {
                    m.Remove();
                }
            }

            World.Items.Clear();
            Counter.Reset();
            for (int i = 0; i < Contains.Count; i++)
            {
                Item item = (Item)Contains[i];
                World.AddItem(item);
                item.Contains.Clear();
            }

            if (Config.GetBool("AutoSearch") && Backpack != null)
            {
                PlayerData.DoubleClick(Backpack);
            }

            ClientCommunication.PostMapChange(cur);

            if (Engine.MainWindow != null && Engine.MainWindow.MapWindow != null)
            {
                Engine.MainWindow.MapWindow.PlayerMoved();
            }
        }
Beispiel #3
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 #4
0
        public override void OnMapChange(byte old, byte cur)
        {
            List <Mobile> list = new List <Mobile>(World.Mobiles.Values);

            for (int i = 0; i < list.Count; i++)
            {
                Mobile m = list[i];
                if (m != this && m.Map != cur)
                {
                    m.Remove();
                }
            }

            list = null;

            World.Items.Clear();
            Counter.Reset();
            for (int i = 0; i < Contains.Count; i++)
            {
                Item item = (Item)Contains[i];
                World.AddItem(item);
                item.Contains.Clear();
            }

            if (Config.GetBool("AutoSearch") && Backpack != null)
            {
                PlayerData.DoubleClick(Backpack);
            }

            UOAssist.PostMapChange(cur);

            if (Engine.MainWindow != null && Engine.MainWindow.MapWindow != null)
            {
                Engine.MainWindow.SafeAction(s => s.MapWindow.PlayerMoved());
            }
        }