mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Fix: Antidotes to Avatar Transformation Items should be added to Rewards by API (#11353)
* Fix: moved debuffPotions from vue component - Move logic of choosing proper debuf potion from vue component to website commons - introduce new function to get debuffSpellItems * Fix: move debuffPotions to server * Refactoring: move setting of debuff potion to func * Fix: sanity * Refactoring & Tests: - Create test case for get and set DebuffPotionItems functions - Fix setDebuffPotionItems function to not create duplicated debuff items - Make debuff potion type of items unpinnable - Move list of debuffs to constant to reuse it in tests and functions * Fix: typo in test describe * Fix: translation of unpin * Fix: setDebuffPotionItems on cron buffs reset * Fix: use full path for debuff potions
This commit is contained in:
committed by
Matteo Pagliazzi
parent
85eab76a71
commit
5b57d91a9b
@@ -177,6 +177,25 @@ module.exports = function getItemInfo (user, type, item, officialPinnedItems, la
|
||||
pinType: 'seasonalSpell',
|
||||
};
|
||||
break;
|
||||
case 'debuffPotion':
|
||||
itemInfo = {
|
||||
key: item.key,
|
||||
mana: item.mana,
|
||||
cast: item.cast,
|
||||
immediateUse: item.immediateUse,
|
||||
target: item.target,
|
||||
text: item.text(language),
|
||||
notes: item.notes(language),
|
||||
value: item.value,
|
||||
type: 'debuffPotion',
|
||||
currency: 'gold',
|
||||
locked: false,
|
||||
purchaseType: 'debuffPotion',
|
||||
class: `inventory_special_${item.key}`,
|
||||
path: `spells.special.${item.key}`,
|
||||
pinType: 'debuffPotion',
|
||||
};
|
||||
break;
|
||||
case 'seasonalQuest':
|
||||
itemInfo = {
|
||||
key: item.key,
|
||||
|
||||
Reference in New Issue
Block a user