Exemplo n.º 1
0
        public static new void Initialize()
        {
            WoWObject.Initialize();

            ClickToMoveFunction = Helper.Magic.RegisterDelegate<ClickToMoveDelegate>(Offsets.ClickToMove);
            _setFacing = Helper.Magic.RegisterDelegate<SetFacingDelegate>(Offsets.SetFacing);
            _isClickMoving = Helper.Magic.RegisterDelegate<IsClickMovingDelegate>(Offsets.IsClickMoving);
            _stopCTM = Helper.Magic.RegisterDelegate<StopCTMDelegate>(Offsets.StopCTM);
        }
Exemplo n.º 2
0
        public void SetFacing(float angle)
        {
            if (_setFacing == null)
                _setFacing = Manager.Memory.RegisterDelegate<SetFacingDelegate>((IntPtr)Pointers.LocalPlayer.SetFacing);

            const float pi2 = (float)(Math.PI * 2);
            if (angle < 0.0f)
                angle += pi2;
            if (angle > pi2)
                angle -= pi2;
            _setFacing(Pointer, Helper.PerformanceCount, angle);
        }