通过却没有得到金币奖励

dev_shixuns
daiao 6 years ago
parent da14bbed6f
commit d26c4a62ba

@ -510,7 +510,7 @@ class MyshixunsController < ApplicationController
challenge.path.split("").each do |path| challenge.path.split("").each do |path|
game_passed_code(game.id, path, myshixun.try(:gpid), 1) game_passed_code(game.id, path, myshixun.try(:gpid), 1)
end end
if !game.answer_open == 1 && (challenge.shixun.try(:status) > 1) # 如果没有查看答案,则获得该关卡得分 if game.answer_open == 0 && (challenge.shixun.try(:status) > 1) # 如果没有查看答案,则获得该关卡得分
reward_grade(game.user, game.id, 'Game', challenge.score) reward_grade(game.user, game.id, 'Game', challenge.score)
reward_experience(game.user, game.id, 'Game', challenge.score) reward_experience(game.user, game.id, 'Game', challenge.score)
game.update_attributes!(:final_score => challenge.score) game.update_attributes!(:final_score => challenge.score)

Loading…
Cancel
Save