Corrected Beast Master and Mount Master count so it would be accurate.

This commit is contained in:
Blade Barringer 2015-01-11 17:24:01 -06:00
parent 11f20555c4
commit f6885427a8
2 changed files with 4 additions and 3 deletions

View file

@ -116,7 +116,8 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
// We watch Members.selectedMember because it's asynchronously set, so would be a hassle to handle updates here
$scope.$watch( function() { return Members.selectedMember; }, function (member) {
if(member)
member.petCount = Shared.countPets(null, member.items.pets);
member.petCount = Shared.countPets($rootScope.countExists(member.items.pets), member.items.pets);
member.mountCount = Shared.countMounts($rootScope.countExists(member.items.mounts), member.items.mounts);
$scope.profile = member;
});
$scope.sendPrivateMessage = function(uuid, message){

View file

@ -3,8 +3,8 @@
habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$http', '$state', 'Guide', 'Shared',
function($rootScope, $scope, $location, User, $http, $state, Guide, Shared) {
$scope.profile = User.user;
$scope.profile.petCount = Shared.countPets(null, $scope.profile.items.pets);
$scope.profile.mountCount = Shared.countMounts(null, $scope.profile.items.mounts);
$scope.profile.petCount = Shared.countPets($rootScope.countExists($scope.profile.items.pets), $scope.profile.items.pets);
$scope.profile.mountCount = Shared.countMounts($rootScope.countExists($scope.profile.items.mounts), $scope.profile.items.mounts);
$scope.hideUserAvatar = function() {
$(".userAvatar").hide();
};