public override void OnButtonClick(int buttonID) { switch ((Buttons)buttonID) { case Buttons.Help: _client.Send(new RequestHelpPacket()); break; case Buttons.Options: if (UserInterface.GetControl <OptionsGump>() == null) { UserInterface.AddControl(new OptionsGump(), 80, 80); } else { UserInterface.RemoveControl <OptionsGump>(); } break; case Buttons.LogOut: // MsgBoxGump g = MsgBoxGump.Show("Quit Ultima Online?", MsgBoxTypes.OkCancel); // g.OnClose = logout_OnClose; UserInterface.AddControl(new LogoutGump(), 0, 0); break; case Buttons.Quests: _client.Send(new QuestGumpRequestPacket(Mobile.Serial)); break; case Buttons.Skills: _client.Send(new MobileQueryPacket(MobileQueryPacket.StatusType.Skills, Mobile.Serial)); if (UserInterface.GetControl <SkillsGump>() == null) { UserInterface.AddControl(new SkillsGump(), 80, 80); } else { UserInterface.RemoveControl <SkillsGump>(); } break; case Buttons.Guild: _client.Send(new GuildGumpRequestPacket(Mobile.Serial)); break; case Buttons.PeaceWarToggle: _world.Interaction.ToggleWarMode(); break; case Buttons.Status: StatusGump.Toggle(Mobile.Serial); break; } }
private void Background_MouseDoubleClickEvent(AControl caller, int x, int y, MouseButton button) { if (Mobile.IsClientEntity) { StatusGump.Toggle(Mobile.Serial); } else { _world.Interaction.LastTarget = Mobile.Serial; // Attack if (WorldModel.Entities.GetPlayerEntity().Flags.IsWarMode) { _world.Interaction.AttackRequest(Mobile); } // Open Paperdoll else { _world.Interaction.DoubleClick(Mobile); } } }