Exemplo n.º 1
0
        public void OnTick()
        {
            var zone = shareManager.Get(this.player);

            if (zone == null)
            {
                return;
            }
            ILocation center = zone.GetClosestWalkable(player.world, player.status.entity.location.ToLocation(), true);

            if (center == null)
            {
                return;
            }

            var map = player.functions.AsyncMoveToLocation(center, token, ZMO);

            map.Completed += areaMap => {
                shareManager.RegisterReached(this.player);
                busy = false;
            };
            map.Cancelled += (areaMap, cuboid) => {
                busy = false;
            };
            busy = true;
            map.Start();
        }