コード例 #1
0
        public override void OnButtonClick(int buttonID)
        {
            switch ((Buttons)buttonID)
            {
            case Buttons.Kick:
                //
                PartySystem.RemovePartyMember(Member.Serial);

                break;

            case Buttons.GetBar:
                GameScene currentGameScene = SceneManager.GetScene <GameScene>();

                if (currentGameScene.PartyMemberGumpStack.Contains(Member.Mobile))
                {
                    UIManager.Remove <PartyMemberGump>(Member.Mobile);
                }
                else if (Member.Mobile == World.Player)
                {
                    StatusGump status = UIManager.GetByLocalSerial <StatusGump>();
                    status?.Dispose();
                }

                PartyMemberGump partymemberGump = new PartyMemberGump(Member, 300, 300);
                UIManager.Add(partymemberGump);
                currentGameScene.PartyMemberGumpStack.Add(Member.Mobile);

                break;
            }
        }
コード例 #2
0
        public override void OnButtonClick(int buttonID)
        {
            switch ((Buttons)buttonID)
            {
            case Buttons.Kick:
                //
                PartySystem.RemovePartyMember(Member.Serial);

                break;

            case Buttons.GetBar:

                if (!PartySystem.PartyMemberGumpStack.ContainsKey(Member))
                {
                    PartyMemberGump partymemberGump = new PartyMemberGump(Member);
                    UIManager.Add(partymemberGump);
                    PartySystem.PartyMemberGumpStack.Add(Member, partymemberGump);
                }

                break;
            }
        }