diff --git a/website/public/js/controllers/challengesCtrl.js b/website/public/js/controllers/challengesCtrl.js index 373dae2552..5e885e4f43 100644 --- a/website/public/js/controllers/challengesCtrl.js +++ b/website/public/js/controllers/challengesCtrl.js @@ -69,6 +69,9 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User', members: [], official: false }); + + _calculateMaxPrize(defaultGroup); + _checkIfUserHasEnoughGemsForTavernChallenge(); }; /** @@ -277,7 +280,14 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User', } $scope.$watch('newChallenge.group', function(gid){ - $scope.hasEnoughGems(gid); + if (!gid) return; + + _checkIfUserHasEnoughGemsForTavernChallenge(); + $scope.maxPrize = _calculateMaxPrize(gid); + + if (gid == 'habitrpg') { + $scope.newChallenge.prize = 1; + } }) $scope.selectAll = function(){