Merge pull request #11637 from Xaz16/trigger-vue-reactivity-for-user

Trigger vue reactivity for user
This commit is contained in:
Matteo Pagliazzi
2020-01-14 13:00:07 +01:00
committed by GitHub
17 changed files with 610 additions and 155 deletions

View File

@@ -41,7 +41,10 @@ export default function hatch (user, req = {}) {
throw new NotAuthorized(i18n.t('messageAlreadyPet', req.language));
}
user.items.pets[pet] = 5;
user.items.pets = {
...user.items.pets,
[pet]: 5,
};
user.items.eggs[egg] -= 1;
user.items.hatchingPotions[hatchingPotion] -= 1;
if (user.markModified) {