夺宝精灵:精灵试炼提示文案修改

This commit is contained in:
huangjian
2023-02-27 17:53:04 +08:00
parent 559793e60d
commit a18b310ce3
2 changed files with 8 additions and 4 deletions

View File

@@ -240,10 +240,10 @@ class FairyViewModel : BaseViewModel() {
val array = _compoundFairyInfosLiveData.value ?: SparseArray() val array = _compoundFairyInfosLiveData.value ?: SparseArray()
if (array.size() >= 3) { if (array.size() >= 3) {
"数量足够了,快去试炼吧!".toast() "试炼炉已满!".toast()
} else { } else {
if (fairyInfo.elfNum == 0) { if (fairyInfo.elfNum == 0) {
"精灵数量不足".toast() "你还未捕捉到该精灵".toast()
return return
} }
array.put(nextIndex(array), fairyInfo) array.put(nextIndex(array), fairyInfo)
@@ -290,6 +290,10 @@ class FairyViewModel : BaseViewModel() {
compoundFairyInfos.put(nextIndex(compoundFairyInfos), it) compoundFairyInfos.put(nextIndex(compoundFairyInfos), it)
} }
} }
if (needNum == 3) {
"精灵数量不足".toast()
return
}
_compoundFairyInfosLiveData.value = compoundFairyInfos _compoundFairyInfosLiveData.value = compoundFairyInfos
} }

View File

@@ -21,8 +21,8 @@ class TestFairyRecordAdapter :
helper.setText(R.id.tv_prize_name, item.elfName) helper.setText(R.id.tv_prize_name, item.elfName)
helper.setText( helper.setText(
R.id.tv_prize_type, when (item.elfLevel) { R.id.tv_prize_type, when (item.elfLevel) {
1 -> "史诗试炼" 2 -> "史诗试炼"
else -> "传说森林" else -> "传说试炼"
} }
) )