Esempio n. 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, ""));

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

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

            DeclineTimer.Start(target, from);
        }
Esempio n. 2
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();
        }