コード例 #1
0
 void Background_MouseDoubleClickEvent(AControl caller, int x, int y, MouseButton button)
 {
     if (Mobile.IsClientEntity)
     {
         StatusGump.Toggle(Mobile.Serial);
     }
 }
コード例 #2
0
        public override void OnButtonClick(int buttonID)
        {
            switch ((Buttons)buttonID)
            {
            case Buttons.Help:
                m_Client.Send(new RequestHelpPacket());
                break;

            case Buttons.Options:
                if (m_UserInterface.GetControl <OptionsGump>() == null)
                {
                    m_UserInterface.AddControl(new OptionsGump(), 80, 80);
                }
                else
                {
                    m_UserInterface.RemoveControl <OptionsGump>();
                }
                break;

            case Buttons.LogOut:
                // MsgBoxGump g = MsgBoxGump.Show("Quit Ultima Online?", MsgBoxTypes.OkCancel);
                // g.OnClose = logout_OnClose;
                m_UserInterface.AddControl(new LogoutGump(), 0, 0);
                break;

            case Buttons.Quests:
                m_Client.Send(new QuestGumpRequestPacket(Mobile.Serial));
                break;

            case Buttons.Skills:
                m_Client.Send(new GetPlayerStatusPacket(0x05, Mobile.Serial));
                if (m_UserInterface.GetControl <SkillsGump>() == null)
                {
                    m_UserInterface.AddControl(new SkillsGump(), 80, 80);
                }
                else
                {
                    m_UserInterface.RemoveControl <SkillsGump>();
                }
                break;

            case Buttons.Guild:
                m_Client.Send(new GuildGumpRequestPacket(Mobile.Serial));
                break;

            case Buttons.PeaceWarToggle:
                m_World.Interaction.ToggleWarMode();
                break;

            case Buttons.Status:
                StatusGump.Toggle(Mobile.Serial);
                break;
            }
        }
コード例 #3
0
        private void Background_MouseDoubleClickEvent(AControl caller, int x, int y, MouseButton button)
        {
            if (Mobile.IsClientEntity)
            {
                StatusGump.Toggle(Mobile.Serial);
            }
            else
            {
                m_World.Interaction.LastTarget = Mobile.Serial;

                // Attack
                if (WorldModel.Entities.GetPlayerEntity().Flags.IsWarMode)
                {
                    m_World.Interaction.AttackRequest(Mobile);
                }
                // Open Paperdoll
                else
                {
                    m_World.Interaction.DoubleClick(Mobile);
                }
            }
        }