Exemplo n.º 1
0
        public void Update()
        {
            Log.Info("Ability", "Update Start=" + StartTime + ",Cur=" + TCPServer.GetTimeStampMS() + ",Info=" + Info.CastTime);
            if (Handler != null)
            {
                Handler.Update();
            }

            if (StartTime + Info.CastTime < TCPServer.GetTimeStampMS())
            {
                Cast();
            }
        }
Exemplo n.º 2
0
        public void Update(long Tick)
        {
            if (Handler != null)
            {
                Handler.Update(Tick);
            }

            if (NextTick < Tick)
            {
                NextTick = Tick + 1000;
                OnTick(TickCount);
                ++TickCount;
            }

            if (!IsBuff)
            {
                if (StartTime + Info.Info.CastTime <= TCPServer.GetTimeStampMS())
                {
                    if (Info.Info.ApSec == 0)
                    {
                        Cast();
                    }
                    else
                    {
                        OnTick(TickCount);
                    }

                    Stop();
                }
            }

            if (EndTime != 0 && EndTime < Tick)
            {
                Stop();
            }
        }