Don't dispatch simulations to old ladders, just new hero-ladder levels. Fixed typo in last cache commit.

This commit is contained in:
Nick Winter 2015-02-11 14:01:38 -08:00
parent ed7d7b0412
commit 2a9bb0292d
2 changed files with 3 additions and 2 deletions

View file

@ -165,7 +165,7 @@ module.exports = class LadderTabView extends CocoView
team = _.find @teams, name: histogramWrapper.data('team-name')
histogramData = null
$.when(
$.get "/db/level/#{@level.get('slug')}/histogram_data?team=#{team.name.toLowerCase()}", cache: false, success: (data) -> histogramData = data
$.get "/db/level/#{@level.get('slug')}/histogram_data?team=#{team.name.toLowerCase()}", {cache: false}, (data) -> histogramData = data
).then =>
@generateHistogram(histogramWrapper, histogramData, team.name.toLowerCase()) unless @destroyed

View file

@ -124,7 +124,8 @@ module.exports.getTwoGames = (req, res) ->
#if userIsAnonymous req then return errors.unauthorized(res, 'You need to be logged in to get games.')
humansGameID = req.body.humansGameID
ogresGameID = req.body.ogresGameID
ladderGameIDs = ['greed', 'criss-cross', 'brawlwood', 'dungeon-arena', 'gold-rush', 'sky-span', 'dueling-grounds', 'cavern-survival', 'multiplayer-treasure-grove']
#ladderGameIDs = ['greed', 'criss-cross', 'brawlwood', 'dungeon-arena', 'gold-rush', 'sky-span'] # Let's not give any extra simulations to old ladders.
ladderGameIDs = ['dueling-grounds', 'cavern-survival', 'multiplayer-treasure-grove']
levelID = _.sample ladderGameIDs
sortLimit = 200
unless ogresGameID and humansGameID