From f56d90f16a15e25c4eb312d503b315d3e55a304b Mon Sep 17 00:00:00 2001 From: ArbiterBibendi Date: Thu, 5 Oct 2023 20:27:12 -0500 Subject: [PATCH] Update partyMembers after cast --- website/client/src/mixins/spells.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/client/src/mixins/spells.js b/website/client/src/mixins/spells.js index 0b2c445b02f..f09e2995145 100644 --- a/website/client/src/mixins/spells.js +++ b/website/client/src/mixins/spells.js @@ -1,4 +1,5 @@ import isArray from 'lodash/isArray'; +import { merge, each } from 'lodash'; import * as quests from '@/../../common/script/content/quests'; // @TODO: Let's separate some of the business logic out of Vue if possible @@ -144,6 +145,16 @@ export default { Object.assign(this.$store.state.user.data, apiResult.data.data.user); } + if (apiResult.data.data.partyMembers) { + each(this.$store.state.partyMembers.data, partyMember => { + const updatedPartyMember = apiResult.data.data.partyMembers + .find( + member => member.profile.name === partyMember.profile.name, + ); + merge(partyMember, updatedPartyMember); + }); + } + let msg = ''; switch (type) {