Added dequip ability per ticket: 3730

This commit is contained in:
kholliday
2015-03-04 21:43:17 -06:00
parent 90fe516562
commit f28bc31a2c
3 changed files with 26 additions and 10 deletions

View File

@@ -133,5 +133,6 @@
"critBonus": "Critical Hit! Bonus: ",
"displayNameDescription1": "This is what appears in messages you post in the Tavern, guilds, and party chat, along with what is displayed on your avatar. Go to",
"displayNameDescription2": "Settings->Site",
"displayNameDescription3": "and scroll down to the Registration section to change your login name."
"displayNameDescription3": "and scroll down to the Registration section to change your login name.",
"dequipAll": "Dequip All"
}

View File

@@ -233,5 +233,18 @@ habitrpg.controller("InventoryCtrl",
return filteredArray;
};
$scope.dequip = function(){
for ( item in user.items.gear.equipped ){
var itemKey = user.items.gear.equipped[item];
if ( user.items.gear.owned[itemKey] ) {
user.ops.equip({params: {key: itemKey}});
}
}
user.preferences.background = "";
}
}
]);

View File

@@ -3,6 +3,8 @@ script(type='text/ng-template', id='partials/options.inventory.equipment.html')
.row
.col-md-6.border-right
h3.equipment-title.hint(popover-trigger='mouseenter', popover-placement='top', popover-append-to-body='true', popover=env.t('battleGearText'))=env.t('battleGear')
div(ng-click='dequip();')
button {{env.t("dequipAll")}}
li.customize-menu.inventory-gear
menu.pets-menu(label='{{::label}}', ng-repeat='(klass,label) in {warrior:env.t("warrior"), wizard:env.t("mage"), rogue:env.t("rogue"), healer:env.t("healer"), special:env.t("special"), mystery:env.t("mystery")}', ng-show='gear[klass]')
div(ng-repeat='item in gear[klass]')