Exemplo n.º 1
0
        /// <summary>
        /// Starts moving to current Destination
        /// </summary>
        /// <remarks>Sends movement packet to client</remarks>
        protected void MoveToDestination()
        {
            m_moving = true;

            m_totalMovingTime = RemainingTime;
            m_owner.SetOrientationTowards(ref m_destination);
            MovementHandler.SendMoveToPacket(m_owner, ref m_destination, 0f, m_totalMovingTime, MovementFlags);

            m_lastMoveTime         = Utility.GetSystemTime();
            m_desiredEndMovingTime = m_lastMoveTime + m_totalMovingTime;
        }
Exemplo n.º 2
0
        /// <summary>Starts moving to current Destination</summary>
        /// <remarks>Sends movement packet to client</remarks>
        protected void MoveToDestination()
        {
            m_moving          = true;
            m_totalMovingTime = RemainingTime;
            m_owner.SetOrientationTowards(ref m_destination);
            NPC owner = m_owner as NPC;

            if (_lastDestPosition != m_destination.XY)
            {
                Asda2MovmentHandler.SendMonstMoveOrAtackResponse(-1, owner, -1,
                                                                 new Vector3(m_destination.X - m_owner.Map.Offset,
                                                                             m_destination.Y - m_owner.Map.Offset), false);
                _lastDestPosition = m_destination.XY;
            }

            m_lastMoveTime         = Utility.GetSystemTime();
            m_desiredEndMovingTime = m_lastMoveTime + m_totalMovingTime;
        }