 setInstance = (x) ->
 	((request, response) ->
 		request.uonline.instance = x
+		return
 	).asyncMiddleware()
 
 

	# TODO: merge everything from uniusers into one SELECT
	request.uonline.fight_mode = lib.game.isInFight.sync null, dbConnection, request.uonline.userid
	request.uonline.autoinvolved_fm = lib.game.isAutoinvolved.sync null, dbConnection, request.uonline.userid
).asyncMiddleware()


fetchArmor = ((request, response) ->
	request.uonline.armor = lib.game.getUserArmor.sync null, dbConnection, request.uonline.userid
).asyncMiddleware()



	tmpUsers = lib.game.getNearbyUsers.sync null,
		dbConnection, request.uonline.userid, request.uonline.location_id
	request.uonline.players_list = tmpUsers
	return
).asyncMiddleware()


fetchMonstersNearby = ((request, response) ->
	tmpMonsters = lib.game.getNearbyMonsters.sync null, dbConnection, request.uonline.location_id
	request.uonline.monsters_list = tmpMonsters
	return
).asyncMiddleware()


