Skip to content

Commit

Permalink
fix : 레벨 70 이상 일 때 score가 100 넘기에 레벨 70 이상 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
seungueonn committed Mar 15, 2024
1 parent ea6fa8b commit 91f6f20
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ public class TeamScoreGetUseCase {
public TeamScoreRes getTeamScoreInfo(Long teamId) {

TeamScore teamScore = teamScoreQueryService.findTeamScoreByTeam(teamId);
Long level = teamScore.getLevel();
Long score = teamScore.getScore();

// 70 레벨 이상은 경험치 120 되어야 레벨업 가능. level을 각 레벨 별 필요한 경험치 수에 따르 퍼센트로 계산
if (level > 70) {
score = ( score / 120 ) * 100;
}

return TeamScoreRes.builder()
.score(teamScore.getScore())
.level(teamScore.getLevel())
.build()
;
.score(score)
.level(level)
.build();

}

}

0 comments on commit 91f6f20

Please sign in to comment.