WIP(shops): fixes and Hall of Heroes update

This commit is contained in:
Sabe Jones
2024-05-16 18:49:56 -05:00
parent 4c13f3193e
commit 6e5b13668a
11 changed files with 33 additions and 58 deletions

View File

@@ -383,7 +383,7 @@ api.updateHero = {
hero.items.pets['Dragon-Hydra'] = 5;
hero.markModified('items.pets');
}
if (updateData.itemPath && updateData.itemVal && validateItemPath(updateData.itemPath)) {
if (updateData.itemPath && (updateData.itemVal || updateData.itemVal === '') && validateItemPath(updateData.itemPath)) {
// Sanitization at 5c30944 (deemed unnecessary)
_.set(hero, updateData.itemPath, castItemVal(updateData.itemPath, updateData.itemVal));
hero.markModified('items');