New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Antidotes to Avatar Transformation Items should be added to Rewards by API #11353
Conversation
- Move logic of choosing proper debuf potion from vue component to website commons - introduce new function to get debuffSpellItems
@Alys I have made preparation for getting correct antidote (moved it to common) function to use it then on server. Can you please review and answer if I'm going in right way? I'm really new in this project, so will be happy about your feedback :) |
@Xaz16 That's something that Habitica's staff should comment on so I'll leave it for them to answer you but thank you for checking with us! |
@Alys I finished work on this one, could you please put "ready for review" label? Thank you |
@negue might have some ideas about the pinned items issue |
@phillipthelen is this going to cause any issue with the mobile apps? (A new type of items added) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments! Note that I haven't live-tested it
|
Hi folks!
|
@paglias Adding new items should not cause an issue with the apps. But it kinda depends on how exactly these are "purchased". Which API call would this use? |
@phillipthelen they would come through the content api, as far as purchasing they are added to your rewards list |
Hmm @Xaz16, yesterday I had missed the fact that these are only implemented as pinned items, would it be possible to have them as normal rewards without having them appear in the market? |
@paglias can you elaborate please? Should it work as an heal potion (as it works now)? It mainly looks like as you wish, but it is strange thing -- if I will unpin heal potion, does it mean that I lose ability to buy them? Of course I will do as you said, but I need a comprehensive requirement. |
@Xaz16 sorry I wasn't very clear but to be honest I think this is a question that @Alys is more suited to answer than me. It should work like an heal potion but that one is always available in your rewards list, it's not a pinned item. I think that this should work like that so it should also appear in the market (only if you can buy it) |
- 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
I agree that having the the debuff item work in Rewards like the Health potion is good - i.e., you shouldn't be allowed to unpin it. (We might get a couple of complaints about that but we can easily explain that it's much better to avoid accidental unpinning.) I don't have a strong opinion about whether the debuff item should be in the Market or not. On the one hand there's no real need for it there but on the other hand it wouldn't hurt if it was there. From memory, it wasn't in the Market on the original website. |
@Alys thank you. As I understand my current code already satisfy all that you write. I just want to notice a message that we have when we try to unpin unpinable item -- Could you set appropriate label please? |
This should do for all items that can't be unpinned: Thanks for asking! |
Ok, but it is a task for linguists. I'm I right or should I change translation only for en and rename key of translation to appropriate one like "cannotUnpinItem"? |
You can change just the It's probably a good idea to rename the key for clarity as you suggest. It's used in only two places so it won't be hard to update them both. |
@Alys, ok got it, thank you :) |
Hi @paglias, any plans for this PR? Should I extend or fix something? |
@Xaz16 sorry for the delay, there are no problems with the PR but I've not been able to review it in depth last week, should get to it this one |
@paglias got it, thank you for attention :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one comment! I'm going to put this on a testing website for a few days
@Xaz16 merged in develop, after some final testing this week it should go live around Friday. Thanks for the PR! Notated towards your 3rd tier |
Looks like the mobile apps require an update to work with this PR so I'm going to revert it and merge it again once they're ready |
@paglias ok, got it. Thank you for info :) |
Reopened at #11407 |
Fixes #11289
Changes
At all I can say that it is minimal solution to satisfy the issue report, in fact I tried to move anitdotes to user inventory, but I face some extra work to make it work as "self" spell. So for now -- we retrieve it in pinned items of user data which we receive from data and I'm not significantly edit website code to work with such item.
Here we have issue -- if I unpin the item from rewards sections I can't return it back due to we don't have it in inventory at all, if we check transformation items it is in inventory and I think antidotes should be too. To forbid unpin for such debuffPotion type items we can broke path in content of item, but it is not a clear solution for it...
I open for discuss to understand in which way we should store it and how it should work, feel free to participate :)
UUID: d94eca66-c6de-423c-a864-9cb103b9eb77