public void SetFacing(Vector3 spot) { TransportPathTransform transform = new TransportPathTransform(unit, args.TransformForTransport); Vector3 finalSpot = transform.Calc(spot); args.facing.f = new Vector3(finalSpot.X, finalSpot.Y, finalSpot.Z); args.facing.type = MonsterMoveType.FacingSpot; }
public void MovebyPath(Vector3[] controls, int path_offset = 0) { args.path_Idx_offset = path_offset; args.path = new Vector3[controls.Length]; TransportPathTransform transform = new TransportPathTransform(unit, args.TransformForTransport); for (var i = 0; i < controls.Length; i++) { args.path[i] = transform.Calc(controls[i]); } }
public void MoveTo(Vector3 dest, bool generatePath = true, bool forceDestination = false) { if (generatePath) { PathGenerator path = new PathGenerator(unit); bool result = path.CalculatePath(dest.X, dest.Y, dest.Z, forceDestination); if (result && !Convert.ToBoolean(path.GetPathType() & PathType.NoPath)) { MovebyPath(path.GetPath()); return; } } args.path_Idx_offset = 0; args.path = new Vector3[2]; TransportPathTransform transform = new TransportPathTransform(unit, args.TransformForTransport); args.path[1] = transform.Calc(dest); }