Added function to count pets that are actually owned

This commit is contained in:
Blade Barringer
2015-07-21 20:14:15 -05:00
parent 20660f50c0
commit 063e53b0ea
2 changed files with 55 additions and 0 deletions

View File

@@ -16,6 +16,18 @@ function beastMasterProgress(pets) {
return count;
}
function dropPetsCurrentlyOwned(pets) {
var count = 0;
_(DROP_ANIMALS).each(function(animal) {
if(pets[animal] > 0)
count++
});
return count;
}
function mountMasterProgress(mounts) {
var count = 0;
_(DROP_ANIMALS).each(function(animal) {
@@ -41,6 +53,7 @@ function remainingGearInSet(userGear, set) {
module.exports = {
beastMasterProgress: beastMasterProgress,
dropPetsCurrentlyOwned: dropPetsCurrentlyOwned,
mountMasterProgress: mountMasterProgress,
remainingGearInSet: remainingGearInSet
};