minor fix

This commit is contained in:
Matteo Pagliazzi 2013-09-05 16:07:19 +02:00
parent bb4c0d2d69
commit 9c6d4deb85

View file

@ -1,8 +1,6 @@
habitrpg.controller("MarketCtrl", ['$rootScope', '$scope', 'User',
function($rootScope, $scope, User) {
User.set('balance', 4);
$scope.eggs = window.habitrpgShared.items.items.pets;
$scope.hatchingPotions = window.habitrpgShared.items.items.hatchingPotions;
$scope.userEggs = User.user.items.eggs;
@ -29,10 +27,11 @@ habitrpg.controller("MarketCtrl", ['$rootScope', '$scope', 'User',
};
dataStore.data[storePath] = store;
User.user.balance = (gems - item.value) / 4;
User.log([
dataStore,
{ op: 'set', data: {'balance': (gems - item.value) / 4} }
{ op: 'set', data: {'balance': User.user.balance} }
]);
}
}