Skip to content

Commit

Permalink
Merge pull request #447 from mash-up-kr/fix/mashong-levelup-goalvalue
Browse files Browse the repository at this point in the history
fix: 매숑이 레벨업 기준 현재 레벨의 goalValue로 수정
  • Loading branch information
eunjungL authored Jul 6, 2024
2 parents 4f32f66 + b0d7a4d commit b51b1ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public boolean isSameLevel(PlatformMashongLevel level) {
}

public LevelUpResult levelUp(PlatformMashongLevel goalLevel) {
if (accumulatedPopcorn < goalLevel.getGoalPopcorn()) {
if (accumulatedPopcorn < level.getGoalPopcorn()) {
return LevelUpResult.FAIL;
}

level = goalLevel;
accumulatedPopcorn -= goalLevel.getGoalPopcorn();
accumulatedPopcorn -= level.getGoalPopcorn();
return LevelUpResult.SUCCESS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public MashongLevelUpResponse levelUp(Long memberGenerationId, int goalLevel) {
Generation generation = memberGeneration.getGeneration();

LevelUpResult levelUpResult = platformMashongService.levelUp(platform, generation, goalPlatformMashongLevel);
System.out.println(levelUpResult.toString());
if (!levelUpResult.isLevelUpResult()) {
PlatformMashong platformMashong = platformMashongService.findByPlatformAndGeneration(platform, generation);
return MashongLevelUpResponse.of(levelUpResult, platformMashong.getLevel());
Expand Down

0 comments on commit b51b1ed

Please sign in to comment.