Exemplo n.º 1
0
        private void Clear(bool returnKeys)
        {
            for (var index = 0; index < m_Braziers.Count; index++)
            {
                PeerlessKeyBrazier brazier = m_Braziers[index];

                Item key = brazier.Key;

                if (key == null)
                {
                    continue;
                }

                if (returnKeys)
                {
                    key.Movable = true;
                    m_Summoner.PlaceInBackpack(key);
                }
                else
                {
                    key.Delete();
                }

                brazier.Key = null;
            }

            if (returnKeys)
            {
                m_Summoner.SendLocalizedMessage(1113576); // Your sacrificial keys have been returned to you.
            }

            m_Summoner = null;
        }
Exemplo n.º 2
0
        protected void AddBrazier(int x, int y, int z)
        {
            PeerlessKeyBrazier brazier = new PeerlessKeyBrazier(this);

            m_Braziers.Add(brazier);

            AddComponent(brazier, x, y, z);
        }
Exemplo n.º 3
0
        public void Validate()
        {
            if (m_KeyExpireTimer != null)
            {
                m_KeyExpireTimer.Stop();
            }

            for (var index = 0; index < m_Braziers.Count; index++)
            {
                PeerlessKeyBrazier brazier = m_Braziers[index];

                if (!Validate(brazier))
                {
                    m_KeyExpireTimer = Timer.DelayCall(TimeSpan.FromMinutes(1.0), delegate { Clear(false); });
                    return;
                }
            }

            List <Mobile> party = GetParty(m_Summoner);
            List <Mobile> invalid;

            if (!ValidateMembers(party, out invalid))
            {
                m_Summoner.SendLocalizedMessage(1113574); // Your party cannot join the queue because the following members have already registered with another group:

                for (var index = 0; index < invalid.Count; index++)
                {
                    Mobile m = invalid[index];

                    m_Summoner.SendMessage(m.Name);
                }

                Clear(true);
            }
            else
            {
                PeerlessInstance instance = AcquireEmptyInstance();

                if (instance == null)
                {
                    m_PartyQueue.Enqueue(party);

                    m_Summoner.SendLocalizedMessage(1113575); // Your party has been successfully added to the queue for this instance.
                }
                else
                {
                    instance.Activate();

                    new InstanceEnterGate(instance, party).MoveToWorld(new Point3D(X, Y, Z + 5), Map);
                }

                Clear(false);
            }
        }
Exemplo n.º 4
0
 private bool Validate(PeerlessKeyBrazier brazier)
 {
     return(brazier.Key != null && !brazier.Key.Deleted);
 }
Exemplo n.º 5
0
 private bool Validate( PeerlessKeyBrazier brazier )
 {
     return brazier.Key != null && !brazier.Key.Deleted;
 }
Exemplo n.º 6
0
        protected void AddBrazier( int x, int y, int z )
        {
            PeerlessKeyBrazier brazier = new PeerlessKeyBrazier( this );

            m_Braziers.Add( brazier );

            AddComponent( brazier, x, y, z );
        }