mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
fix buying gem quests
This commit is contained in:
parent
f2a716edc5
commit
aad16502fd
3 changed files with 4 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.habitrpg.android.habitica"
|
||||
android:versionCode="109"
|
||||
android:versionCode="110"
|
||||
android:versionName="0.0.33.1"
|
||||
android:screenOrientation="portrait"
|
||||
android:installLocation="auto" >
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ public class MainActivity extends BaseActivity implements Action1<Throwable>, Ha
|
|||
} else {
|
||||
observable = apiHelper.apiService.purchaseHourglassItem(event.item.purchaseType, event.item.key);
|
||||
}
|
||||
} else if (event.item.purchaseType.equals("quests")) {
|
||||
} else if (event.item.purchaseType.equals("quests") && event.item.getCurrency().equals("gold")) {
|
||||
observable = apiHelper.apiService.purchaseQuest(event.item.key);
|
||||
} else {
|
||||
observable = apiHelper.apiService.purchaseItem(event.item.purchaseType, event.item.key);
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ public class ShopItem {
|
|||
|
||||
public boolean canBuy(HabitRPGUser user) {
|
||||
if (getCurrency().equals("gold")) {
|
||||
return getValue() < user.getStats().getGp();
|
||||
return getValue() <= user.getStats().getGp();
|
||||
} else if (getCurrency().equals("gems")) {
|
||||
return getValue() < (user.getBalance()*4);
|
||||
return getValue() <= (user.getBalance()*4);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue