public override bool CheckGameGuideOnce() { if (BillingManager.eBillingType == BillingManager.eBillingManager_Type.BillingManager_Google) { BillingManager_Google component = BillingManager_Google.Instance.GetComponent <BillingManager_Google>(); if (component != null && component.m_PurchaseList.Count > 0) { return(true); } } if (BillingManager.eBillingType == BillingManager.eBillingManager_Type.BillingManager_TStore) { BillingManager_TStore component2 = BillingManager_TStore.Instance.GetComponent <BillingManager_TStore>(); if (component2 != null) { return(component2.IsCheckRestoreItem()); } } if (BillingManager.eBillingType == BillingManager.eBillingManager_Type.BillingManager_NStore) { BillingManager_NStore component3 = BillingManager_NStore.Instance.GetComponent <BillingManager_NStore>(); if (component3 != null && component3.m_PurchaseList.Count > 0) { return(true); } } return(false); }
public override void ExcuteGameGuide() { if (BillingManager.eBillingType == BillingManager.eBillingManager_Type.BillingManager_Google) { if (BillingManager_Google.Instance.IsRecoveryItem()) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("666")); return; } BillingManager_Google component = BillingManager_Google.Instance.GetComponent <BillingManager_Google>(); if (component != null) { component.StartRecoveryItem(); NrTSingleton <GameGuideManager> .Instance.ExecuteGuide = true; } } else if (BillingManager.eBillingType == BillingManager.eBillingManager_Type.BillingManager_TStore) { if (BillingManager_TStore.Instance.IsRecoveryItem()) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("666")); return; } BillingManager_TStore component2 = BillingManager_TStore.Instance.GetComponent <BillingManager_TStore>(); if (component2 != null) { component2.SendRestoreItem(); NrTSingleton <GameGuideManager> .Instance.ExecuteGuide = true; } } else if (BillingManager.eBillingType == BillingManager.eBillingManager_Type.BillingManager_NStore) { if (BillingManager_NStore.Instance.IsRecoveryItem()) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("666")); return; } BillingManager_NStore component3 = BillingManager_NStore.Instance.GetComponent <BillingManager_NStore>(); if (component3 != null) { component3.StartRecoveryItem(); NrTSingleton <GameGuideManager> .Instance.ExecuteGuide = true; } } }
public void Consume() { NIAPPurchase pItem = null; if (this.m_bRecovery) { pItem = this.m_RecoveryItem; } else { pItem = this.m_pResult; } if (pItem != null) { if (pItem.getOriginalPurchaseAsJsonText() != null && pItem.getSignature() != null) { NIAPNativeExtension.Instance.requestConsume(pItem.getOriginalPurchaseAsJsonText(), pItem.getSignature(), delegate(NIAPResult niapResult) { this.RemoveRcoveryItemData(pItem); }, delegate(NIAPResultError error) { Debug.Log("consumePurchaseFailedEvent: " + error); BillingManager_NStore component = BillingManager_NStore.Instance.GetComponent <BillingManager_NStore>(); if (component != null && component.m_RecoveryItem != null) { GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ(); gS_BILLING_ITEM_RECODE_REQ.i8Type = 2; gS_BILLING_ITEM_RECODE_REQ.i8Result = 1; gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(pItem.getProductCode()); NrTSingleton <ItemMallItemManager> .Instance.RecodeErrorMessage(ref gS_BILLING_ITEM_RECODE_REQ, string.Format("requestConsume error code : {0} , error message : {1}", error.getCode(), error.getMessage())); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ); } this.RemoveRcoveryItemData(pItem); if (!this.m_ConsumeFailedList.Contains(pItem)) { this.m_ConsumeFailedList.Add(pItem); } }); } } else if (pItem == null) { TsLog.LogError("pItem == NULL", new object[0]); } }