예제 #1
0
 /// <summary>
 /// Called when [delete].
 /// </summary>
 public override void OnDelete()
 {
     base.OnDelete();
     if (KinCityManager.IsSigilRegistered(this))
     {
         KinCityManager.UnRegisterSigil(this);
     }
 }
예제 #2
0
        /// <summary>
        /// Called when [single click].
        /// </summary>
        /// <param name="from">From.</param>
        public override void OnSingleClick(Mobile from)
        {
            //Show which city this sigil relates to
            if (KinCityManager.IsSigilRegistered(this))
            {
                string city = Enum.GetName(typeof(KinFactionCities), m_City);
                LabelTo(from, "Kin Sigil for the City of " + city);
            }
            else
            {
                LabelTo(from, "An unused Kin Sigil");
            }

            //If this is a GM also show which phase the sigil is in and the time to the next
            //vortex spawn, or the expire time of the current vortex
            if (from.AccessLevel >= AccessLevel.GameMaster)
            {
                if (!KinCityManager.IsSigilRegistered(this))
                {
                    LabelTo(from, "[Not assigned to a city]");
                    return;
                }

                if (m_Active)
                {
                    if (InCapturePhase())
                    {
                        LabelTo(from, "Capture phase in progress!");
                        LabelTo(from, "Vortex expire time : " + m_Time.ToLongDateString() + " " + m_Time.ToLongTimeString());
                    }
                    else
                    {
                        if (IsVortexSpawning())
                        {
                            LabelTo(from, "Final stage active.");
                            LabelTo(from, "Vortex will spawn at : " + m_Time.ToLongDateString() + " " + m_Time.ToLongTimeString());
                        }
                        else
                        {
                            LabelTo(from, "Awaiting next heartbeat.");
                            LabelTo(from, "Current next spawn time : " + m_Time.ToLongDateString() + " " + m_Time.ToLongTimeString());
                        }
                    }
                }
                else
                {
                    LabelTo(from, "Currently Inactive.  Please switch me on!");
                }
            }
        }