经验值不够

dev_forum
daiao 5 years ago
parent 4043de1dd0
commit d9eb84eafc

@ -61,7 +61,7 @@ class Game < ApplicationRecord
if self.status == 2 # 通关了则取实际得分,没通关则取总分
gold = (shixun_status <= 1) ? 0 : self.final_score.to_i
# 只要过关了查看了答案经验值就是0通关前查看了答案金final_score为负数
experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : challenge.score.to_i
experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : challenge.final_score.to_i
else
gold = challenge.score.to_i
experience = gold

Loading…
Cancel
Save