mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Removed some unnecessary callbacks.
This commit is contained in:
parent
aec4669780
commit
3b8cba291d
1 changed files with 0 additions and 3 deletions
|
@ -141,16 +141,13 @@ class LeaderboardData
|
|||
@topPlayers = new LeaderboardCollection(@level, {order:-1, scoreOffset: HIGHEST_SCORE, team: @team, limit: 20})
|
||||
promises = []
|
||||
promises.push @topPlayers.fetch()
|
||||
@topPlayers.once 'sync', @onceLeaderboardPartLoaded, @
|
||||
|
||||
if @session
|
||||
score = @session.get('totalScore') or 10
|
||||
@playersAbove = new LeaderboardCollection(@level, {order:1, scoreOffset: score, limit: 4, team: @team})
|
||||
promises.push @playersAbove.fetch()
|
||||
@playersAbove.once 'sync', @onceLeaderboardPartLoaded, @
|
||||
@playersBelow = new LeaderboardCollection(@level, {order:-1, scoreOffset: score, limit: 4, team: @team})
|
||||
promises.push @playersBelow.fetch()
|
||||
@playersBelow.once 'sync', @onceLeaderboardPartLoaded, @
|
||||
level = "#{level.get('original')}.#{level.get('version').major}"
|
||||
success = (@myRank) =>
|
||||
promises.push $.ajax "/db/level/#{level}/leaderboard_rank?scoreOffset=#{@session.get('totalScore')}&team=#{@team}", {success}
|
||||
|
|
Loading…
Reference in a new issue