コード例 #1
0
        public void OnTick()
        {
            if (!Running)
            {
                Timer.Stop();
                return;
            }

            if (Mobile.NetState == null || Mobile.Deleted || Altar.Deleted || Mobile.Map != Altar.Map ||
                ViceVsVirtueSystem.Instance.Battle == null || !ViceVsVirtueSystem.Instance.Battle.OnGoing || !Mobile.Region.IsPartOf(ViceVsVirtueSystem.Instance.Battle.Region) ||
                Altar.Contains(Mobile))
            {
                Stop();
                return;
            }

            // this should never happen!
            if (LastX != Target.X || LastY != Target.Y)
            {
                LastX = Target.X;
                LastY = Target.Y;

                Update();
            }
        }