コード例 #1
0
        public virtual void ManualRespawn()
        {
            if (Respawntimer != null)
            {
                Respawntimer.Stop();
                Respawntimer = null;
            }

            if (ObjectState == eObjectState.Active)
            {
                return;
            }

            X               = SpawnX;
            Y               = SpawnY;
            Z               = SpawnZ;
            Heading         = (ushort)SpawnHeading;
            CurrentRegionID = (ushort)SpawnRegion;
            Xp              = MinotaurRelicManager.MaxRelicExp;
            AddToWorld();
        }
コード例 #2
0
        /// <summary>
        /// Called when the Respawntimer is reached
        /// </summary>
        /// <param name="respawnTimer"></param>
        /// <returns></returns>
        protected override int RespawnTimerCallback(RegionTimer respawnTimer)
        {
            if (Respawntimer != null)
            {
                Respawntimer.Stop();
                Respawntimer = null;
            }

            if (ObjectState == eObjectState.Active)
            {
                return(0);
            }

            X               = SpawnX;
            Y               = SpawnY;
            Z               = SpawnZ;
            Heading         = (ushort)SpawnHeading;
            CurrentRegionID = (ushort)SpawnRegion;
            Xp              = MinotaurRelicManager.MaxRelicExp;
            AddToWorld();
            return(0);
        }
コード例 #3
0
        /// <summary>
        /// Called when the Relic has reached 0 XP and drops
        /// </summary>
        public virtual void RelicDispose()
        {
            if (_timer != null)
            {
                _timer.Dispose();
                _timer = null;
            }

            if (Owner != null)
            {
                PlayerLoosesRelic(Owner, true);
            }

            RemoveFromWorld();

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

            Respawntimer = new RegionTimer(this, RespawnTimerCallback, Util.Random(MinotaurRelicManager.MinRespawnTimer, MinotaurRelicManager.MaxRespawnTimer));
        }