[Modify]游戏房增加夺宝精灵

This commit is contained in:
wushaocheng
2023-03-08 14:51:48 +08:00
parent 9a64e26d70
commit 9a6ac2812b

View File

@@ -32,13 +32,21 @@ public class GameRoomPresenter extends BaseRoomPresenter<IGameRoomView> {
bannerInfo.setFirstCharge(true);
bannerInfos.add(0, bannerInfo);
}
if(GoldBoxHelper.isShowFairy()){
BannerInfo bannerInfo = new BannerInfo();
bannerInfo.setFairy(true);
bannerInfos.add(firstCharge ? 1 : 0, bannerInfo);
}
List<BannerInfo> finalBannerInfos = bannerInfos;
GoldBoxHelper.isHideBox()
.subscribe(isHide -> {
if (!isHide) {
BannerInfo bannerInfo = new BannerInfo();
bannerInfo.setBox(true);
finalBannerInfos.add(firstCharge ? 1 : 0, bannerInfo);
int index = 0;
if (firstCharge) index++;
if (GoldBoxHelper.isShowFairy()) index++;
finalBannerInfos.add(index, bannerInfo);
}
getMvpView().onShowBanner(finalBannerInfos);
}, throwable -> getMvpView().onShowBanner(finalBannerInfos));