예제 #1
0
        public static void Invite(Mobile from, Mobile target)
        {
            Faction ourFaction   = Faction.Find(from);
            Faction theirFaction = Faction.Find(target);

            if (ourFaction != null && theirFaction != null && ourFaction != theirFaction)
            {
                from.SendLocalizedMessage(1008088);                   // You cannot have players from opposing factions in the same party!
                target.SendLocalizedMessage(1008093);                 // The party cannot have members from opposing factions.
                return;
            }

            Party p = Party.Get(from);

            if (p == null)
            {
                from.Party = p = new Party(from);
            }

            if (!p.Candidates.Contains(target))
            {
                p.Candidates.Add(target);
            }

            //  : You are invited to join the party. Type /accept to join or /decline to decline the offer.
            //target.Send( new MessageLocalizedAffix( Serial.MinusOne, -1, MessageType.Label, 0x3B2, 3, 1008089, "", AffixType.Prepend | AffixType.System, from.Name, "" ) );
            target.SendGump(new PartyGump(from, target));     // WIZARD WANTS A GUMP

            from.SendLocalizedMessage(1008090);               // You have invited them to join the party.

            target.Send(new PartyInvitation(from));
            target.Party = from;

            DeclineTimer.Start(target, from);
        }
예제 #2
0
        public static void Invite(Mobile from, Mobile target)
        {
            var p = Get(from);

            if (p == null)
            {
                from.Party = p = new Party(from);
            }

            if (!p.Candidates.Contains(target))
            {
                p.Candidates.Add(target);
            }

            // : You are invited to join the party. Type /accept to join or /decline to decline the offer.
            target.NetState.SendMessageLocalizedAffix(
                Serial.MinusOne,
                -1,
                MessageType.Label,
                0x3B2,
                3,
                1008089,
                "",
                AffixType.Prepend | AffixType.System,
                from.Name
                );

            from.SendLocalizedMessage(1008090); // You have invited them to join the party.

            target.NetState.SendPartyInvitation(from.Serial);
            target.Party = from;

            DeclineTimer.Start(target, from);
        }
예제 #3
0
        public static void Start(Mobile m, Mobile leader)
        {
            m_Table.TryGetValue(m, out DeclineTimer t);
            t?.Stop();

            m_Table[m] = t = new DeclineTimer(m, leader);
            t.Start();
        }
예제 #4
0
        public static void Start( Mobile m, Mobile leader )
        {
            DeclineTimer t = (DeclineTimer)m_Table[m];

            if ( t != null )
                t.Stop();

            m_Table[m] = t = new DeclineTimer( m, leader );
            t.Start();
        }
예제 #5
0
        public static void Start(Mobile m, Mobile leader)
        {
            DeclineTimer t = (DeclineTimer)m_Table[m];

            if (t != null)
            {
                t.Stop();
            }

            m_Table[m] = t = new DeclineTimer(m, leader);
            t.Start();
        }