From 8674ea55f9ee9e67ee35c6a583970e159ef540c8 Mon Sep 17 00:00:00 2001 From: Frank Maximus Date: Wed, 20 May 2020 12:32:44 +0200 Subject: [PATCH] #11828: Show a boss damage notification for skills (#12173) * #11828: Show a boss damage notification for skills Brutal Smash and Burst of Flames skills should show a boss damage notification Fixes #11828 * Calculate quest progress regardless of spell target. --- website/client/src/components/tasks/spells.vue | 2 +- website/client/src/mixins/spells.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/website/client/src/components/tasks/spells.vue b/website/client/src/components/tasks/spells.vue index 66ce7d5381..ae734204ef 100644 --- a/website/client/src/components/tasks/spells.vue +++ b/website/client/src/components/tasks/spells.vue @@ -300,7 +300,7 @@ export default { const { user } = this; if (!user.party.quest) return 0; - const userQuest = this.quests[user.party.quest.key]; + const userQuest = this.quests.quests[user.party.quest.key]; if (!userQuest) { return 0; diff --git a/website/client/src/mixins/spells.js b/website/client/src/mixins/spells.js index dc64b987c8..f1edf05992 100644 --- a/website/client/src/mixins/spells.js +++ b/website/client/src/mixins/spells.js @@ -77,8 +77,7 @@ export default { }, async castEnd (target, type) { if (!this.$store.state.spellOptions.castingSpell) return null; - let beforeQuestProgress; - if (this.spell.target === 'party') beforeQuestProgress = this.questProgress(); + const beforeQuestProgress = this.questProgress(); if (!this.applyingAction) return 'No applying action'; @@ -153,10 +152,10 @@ export default { this.markdown(msg); // @TODO: mardown directive? - if (!beforeQuestProgress) return null; + const questProgress = this.questProgress() - beforeQuestProgress; if (questProgress > 0) { - const userQuest = this.quests[this.user.party.quest.key]; + const userQuest = this.quests.quests[this.user.party.quest.key]; if (userQuest.boss) { this.quest('questDamage', questProgress.toFixed(1)); } else if (userQuest.collection && userQuest.collect) {