Ejemplo n.º 1
0
        void ResumeSplineChain(SplineChainResumeInfo info)
        {
            if (info.Empty())
            {
                Log.outError(LogFilter.Movement, "MotionMaster.ResumeSplineChain: unit with entry {0} tried to resume a spline chain from empty info.", _owner.GetEntry());
                return;
            }

            StartMovement(new SplineChainMovementGenerator(info), MovementSlot.Active);
        }
 public SplineChainMovementGenerator(SplineChainResumeInfo info)
 {
     _id          = info.PointID;
     _chain       = info.Chain;
     _chainSize   = (byte)info.Chain.Count;
     _walk        = info.IsWalkMode;
     finished     = info.SplineIndex >= info.Chain.Count;
     _nextIndex   = info.SplineIndex;
     _nextFirstWP = info.PointIndex;
     _msToNext    = info.TimeToNext;
 }
        public SplineChainMovementGenerator(SplineChainResumeInfo info)
        {
            _id          = info.PointID;
            _chain       = info.Chain;
            _chainSize   = (byte)info.Chain.Count;
            _walk        = info.IsWalkMode;
            _nextIndex   = info.SplineIndex;
            _nextFirstWP = info.PointIndex;
            _msToNext    = info.TimeToNext;

            Mode     = MovementGeneratorMode.Default;
            Priority = MovementGeneratorPriority.Normal;
            Flags    = MovementGeneratorFlags.InitializationPending;
            if (info.SplineIndex >= info.Chain.Count)
            {
                AddFlag(MovementGeneratorFlags.Finalized);
            }

            BaseUnitState = UnitState.Roaming;
        }