private bool OnGachaRsp(GachaRsp rsp) { if (rsp.get_retcode() == null) { this._gachaGotList.Clear(); this._gachaItemList = rsp.get_item_list(); this._dropItemShowDialogManager = new SequenceDialogManager(new Action(this.ShowGachaResultPage)); this._unLockAvatarDialogManager = new SequenceDialogManager(new Action(this.ClearUnlockAvatarDialogManagerContent)); foreach (GachaItem item in rsp.get_item_list()) { StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)item.get_item_id(), (int)item.get_level()); if (dummyStorageDataItem != null) { dummyStorageDataItem.number = (int)item.get_num(); if (dummyStorageDataItem is AvatarCardDataItem) { if (item.get_split_fragment_numSpecified()) { (dummyStorageDataItem as AvatarCardDataItem).SpliteToFragment((int)item.get_split_fragment_num()); } else { AvatarCardDataItem item2 = dummyStorageDataItem as AvatarCardDataItem; AvatarUnlockDialogContext dialogContext = new AvatarUnlockDialogContext(AvatarMetaDataReaderExtend.GetAvatarIDsByKey(item2.ID).avatarID, true); this._unLockAvatarDialogManager.AddDialog(dialogContext); } } this._gachaGotList.Add(dummyStorageDataItem); List <Tuple <StorageDataItemBase, bool> > itemDataList = new List <Tuple <StorageDataItemBase, bool> > { new Tuple <StorageDataItemBase, bool>(dummyStorageDataItem, item.get_is_rare_drop()) }; if (item.get_gift_item_idSpecified()) { StorageDataItemBase base3 = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)item.get_gift_item_id(), (int)item.get_gift_level()); if (base3 != null) { base3.number = (int)item.get_gift_num(); itemDataList.Add(new Tuple <StorageDataItemBase, bool>(base3, false)); this._gachaGotList.Add(base3); } } this._dropItemShowDialogManager.AddDialog(new DropNewItemDialogContextV2(itemDataList)); } } this._waitGachaRsp.End(); } else if (rsp.get_retcode() == 3) { GeneralDialogContext context2 = new GeneralDialogContext { type = GeneralDialogContext.ButtonType.SingleButton, title = LocalizationGeneralLogic.GetText("Menu_Return_GachaTitcketLack", new object[0]), desc = LocalizationGeneralLogic.GetText("Menu_Return_GachaTitcketLack", new object[0]) }; Singleton <MainUIManager> .Instance.ShowDialog(context2, UIType.Any); } this.UpdateView(); return(false); }
public bool OnGachaRsp(GachaRsp rsp) { if ((rsp.get_retcode() == null) && !this.IsGachaInfoValid()) { Singleton <NetworkManager> .Instance.RequestGachaDisplayInfo(); } return(false); }