Revert "Fix: Antidotes to Avatar Transformation Items should be added to Rewards by API (#11353)" (#11406)

This reverts commit 5b57d91a9b.
This commit is contained in:
Matteo Pagliazzi
2019-10-07 16:55:44 +02:00
committed by GitHub
parent 5b57d91a9b
commit 50cae0165c
14 changed files with 35 additions and 214 deletions

View File

@@ -273,6 +273,7 @@ import BuyQuestModal from 'client/components/shops/quests/buyQuestModal.vue';
import notifications from 'client/mixins/notifications';
import { shouldDo } from 'common/script/cron';
import inAppRewards from 'common/script/libs/inAppRewards';
import spells from 'common/script/content/spells';
import taskDefaults from 'common/script/libs/taskDefaults';
import {
@@ -382,6 +383,26 @@ export default {
let watchRefresh = this.forceRefresh; // eslint-disable-line
let rewards = inAppRewards(this.user);
// Add season rewards if user is affected
// @TODO: Add buff conditional
const seasonalSkills = {
snowball: 'salt',
spookySparkles: 'opaquePotion',
shinySeed: 'petalFreePotion',
seafoam: 'sand',
};
for (let key in seasonalSkills) {
if (this.getUserBuffs(key)) {
let debuff = seasonalSkills[key];
let item = Object.assign({}, spells.special[debuff]);
item.text = item.text();
item.notes = item.notes();
item.class = `shop_${key}`;
rewards.push(item);
}
}
return rewards;
},
hasRewardsList () {