Exemple #1
0
            public override void OnResponse(GameClient sender, RelayInfo info)
            {
                int button = info.ButtonID;

                PlayerMobile from = sender.Mobile as PlayerMobile;

                from.CloseGump(typeof(ConfirmPeerlessGump));

                switch (button)
                {
                case 0:
                {
                    break;
                }

                case 1:
                {
                    Party p = Party.Get(from);

                    if (p != null)
                    {
                        for (int i = 0; i < p.Members.Count; ++i)
                        {
                            PartyMemberInfo pmi    = (PartyMemberInfo)p.Members[i];
                            PlayerMobile    member = pmi.Mobile as PlayerMobile;

                            if (m_key.Map != Map.Felucca && member.Kills >= 5)
                            {
                                continue;
                            }

                            if (member.Map == from.Map && member.Region == from.Region)
                            {
                                member.CloseGump(typeof(ConfirmPeerlessPartyGump));
                                member.SendGump(new ConfirmPeerlessPartyGump(m_key, member));
                            }
                        }
                    }

                    if (m_key != null && !m_key.Deleted)
                    {
                        from.CloseGump(typeof(ConfirmPeerlessPartyGump));
                        from.SendGump(new ConfirmPeerlessPartyGump(m_key, from));
                        m_key.Delete();
                    }

                    break;
                }
                }
            }
Exemple #2
0
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                int button = info.ButtonID;

                PlayerMobile from = sender.Mobile as PlayerMobile;

                from.CloseGump <ConfirmPeerlessGump>();

                switch (button)
                {
                case 0:
                {
                    break;
                }

                case 1:
                {
                    Party p = Party.Get(from);

                    if (p != null)
                    {
                        foreach (PartyMemberInfo pmi in p.Members)
                        {
                            PlayerMobile member = pmi.Mobile as PlayerMobile;

                            if (m_key.Map != Map.Felucca && member.Murderer)
                            {
                                continue;
                            }

                            if (member.Map == @from.Map && member.Region == @from.Region)
                            {
                                member.CloseGump <ConfirmPeerlessPartyGump>();
                                member.SendGump(new ConfirmPeerlessPartyGump(m_key, member));
                            }
                        }
                    }

                    if (m_key != null && !m_key.Deleted)
                    {
                        from.CloseGump <ConfirmPeerlessPartyGump>();
                        from.SendGump(new ConfirmPeerlessPartyGump(m_key, from));
                        m_key.Delete();
                    }

                    break;
                }
                }
            }