classes: charge gems for class-change

This commit is contained in:
Tyler Renelle 2013-12-16 11:47:55 -07:00
parent 5f689960b6
commit 7c2e803475
2 changed files with 5 additions and 2 deletions

View file

@ -17,7 +17,7 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
$scope.changeClass = function(klass){ $scope.changeClass = function(klass){
if (!klass) { if (!klass) {
if (!confirm("Are you sure you want to re-roll? This will reset your character's class and allocated points (you'll get them all back to re-allocate)")) if (!confirm("Are you sure? This will reset your character's class and allocated points (you'll get them all back to re-allocate), and costs 3 gems"))
return; return;
return User.user.ops.changeClass({}); return User.user.ops.changeClass({});
} }

View file

@ -123,7 +123,10 @@ script(id='partials/options.profile.stats.html', type='text/ng-template')
.span4.border-right(ng-show='user.stats.lvl >= 5') .span4.border-right(ng-show='user.stats.lvl >= 5')
h4 h4
| {{user.stats.class}}  | {{user.stats.class}} 
a.btn.btn-danger.btn-mini(ng-click='changeClass(null)') Re-roll a.btn.btn-danger.btn-mini(ng-click='changeClass(null)')
| Change Class 
small 3 <span class="Pet_Currency_Gem1x inline-gems"/>
h6 Points: {{user.stats.points}} h6 Points: {{user.stats.points}}
fieldset fieldset
label.checkbox label.checkbox