Habitica: can't use guild bank gems for challenge prize

Created on 18 May 2016  路  17Comments  路  Source: HabitRPG/habitica

General Info

  • UUID:
  • Browser: opera
  • OS: Android

Description

When a guild leader creates a guild challenge and sets a challenge prize the site tells the maximum amount is the personal gem count and it doesn't include the 4 gems from the guild bank. In other words challenges with prize exceeding your own gems won't save even if your guild bank has more of them.

Console Errors

help wanted minor section all section creating / editing

Most helpful comment

I'd like to look into this, if it's ok.

All 17 comments

I couldn't replicate that with a public guild I just created. The 1 gem prize was taken from the guild gems. @GitHubSphinx You were made leader of the guild after being invited back to it?

Strange. I've created the new one just now. The same issue as reported initially for the private guild which I left and then rejoined.

The issue with the guild bank is still an issue for me. I've just tested it on FF for win.

  • I've created a new guild
  • I switched to challenges
  • I clicked Create
  • I've chosen the new guild from the drop-down menu (another guild had been selected by default)
  • The gem prize won't raise above my personal gems
  • trying to save the challenge with more gems specified as prize shows the hint (for some reason in Russian, although I use v3 beta in English)

scr

@TheHollidayInn can you give a look? i think the number of available gems is not counted correctly

In the client files

Will do!

@Alys regarding your message in the guild chat

I suspect, but am not certain, that this issue would be a relatively easy fix. It might be just a bit of incorrect logic that needs tweaking

Were you able to replicate this issue? I've just tested it in Chrome with the same result (bug is still there for me).

@GitHubSphinx I haven't tried to replicate it. We've had enough people reporting it that I'm sure it's an issue.

Thank you for the code references!

I'd like to look into this, if it's ok.

@Ozzystrasza Please do! Thanks!

I think I found the problem.
The function that calculates available group balance is always returning 0, because group.leader doesn't exist. Hopefully that's the only problem.

Gonna work on the fix now.

Question: If I'm guild leader and there are 4 gems in the guild bank, and I also have 4 gems in my personal gem balance and I want to create a guild challenge with 4 gems reward, should those 4 gems be subtracted from guild bank or from my personal balance?

From the guild bank.

When you're the leader, when you create a challenge with a gem prize, if the guild bank has enough gems to cover that prize, the guild bank gems should always be used.

is there a warning that happens if you go over the guild bank of gems where it draws from your personal gem stores?

It seems like a better interaction would be you can only draw from what is in the guild bank, and the leader or potentially others with proper permissions can transfer from their personal stores 'donating' to the guild bank, and then the challenge can be created with a higher prize total.

@audiolion There's no warning, but usually the default action for challenges is to take from your own balance, so it should be fairly obvious that it would do so. We could add a warning, but I'd see it as low priority and not in scope for this bug fix.

It would also be a lower priority to allow players to add gems to the guild bank - it's a requested feature but I'm not sure if a decision has ever been made about whether we should do it. If guild members want to donate gems towards a challenge that the leader makes, they can send the gems directly to the leader.

I think that restricting the leader to create challenge prizes from only the guild bank wouldn't be desirable. When a leader wanted to make a challenge with their own gems, they'd first have to transfer them, which would take up more of their time. It would also be seen as an inconsistency by some players (since they could make challenge prizes directly in other guilds) and we'd get bug reports about it.

ah yeah, that does make sense @Alys . I agree its not in the scope of this PR for a warning.

Was this page helpful?
0 / 5 - 0 ratings