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); }
private void queryInventoryFailedEvent(string error) { BillingManager_Google component = BillingManager_Google.Instance.GetComponent <BillingManager_Google>(); if (component != null) { if (this.m_i32QueryInventoryCount < 5) { component.CheckRestoreItem(); this.m_i32QueryInventoryCount++; } else { GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ(); gS_BILLING_ITEM_RECODE_REQ.i8Type = 3; gS_BILLING_ITEM_RECODE_REQ.i8Result = 0; gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = 0L; NrTSingleton <ItemMallItemManager> .Instance.RecodeErrorMessage(ref gS_BILLING_ITEM_RECODE_REQ, error); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ); this.m_i32QueryInventoryCount = 0; } component.SendQueryInventory = false; } TsLog.LogError("error :{0}", new object[] { error }); }
private void purchaseFailedEvent(string error) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("211")); GameObject gameObject = GameObject.Find("BillingManager_Google"); if (gameObject != null) { BillingManager_Google component = gameObject.GetComponent <BillingManager_Google>(); if (component != null) { GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ(); gS_BILLING_ITEM_RECODE_REQ.i8Type = 1; gS_BILLING_ITEM_RECODE_REQ.i8Result = 1; gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(component.BuyItem); NrTSingleton <ItemMallItemManager> .Instance.RecodeErrorMessage(ref gS_BILLING_ITEM_RECODE_REQ, error); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ); component.CheckRestoreItem(); } } Debug.Log("purchaseFailedEvent: " + error); this.Receipt.Remove(0, this.Receipt.Length); NrTSingleton <NrMainSystem> .Instance.m_bIsBilling = false; }
private void billingSupportedEvent() { string[] items = NrTSingleton <ItemMallItemManager> .Instance.GetItems(); GoogleIAB.queryInventory(items); Debug.Log("billingSupportedEvent skus :" + items.Length); BillingManager_Google component = BillingManager_Google.Instance.GetComponent <BillingManager_Google>(); if (component != null) { component.SendQueryInventory = true; } }
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; } } }
private void queryInventorySucceededEvent(List <GooglePurchase> purchases, List <GoogleSkuInfo> skus) { GameObject gameObject = GameObject.Find("BillingManager_Google"); if (gameObject != null) { BillingManager_Google component = gameObject.GetComponent <BillingManager_Google>(); if (component != null) { if (purchases.Count > 0) { component.AddPurchase(purchases); } component.SendQueryInventory = false; } } this.m_i32QueryInventoryCount = 0; }
private void consumePurchaseFailedEvent(string error) { Debug.Log("consumePurchaseFailedEvent: " + error); BillingManager_Google component = BillingManager_Google.Instance.GetComponent <BillingManager_Google>(); 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(component.m_RecoveryItem.productId); NrTSingleton <ItemMallItemManager> .Instance.RecodeErrorMessage(ref gS_BILLING_ITEM_RECODE_REQ, error); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ); BillingManager_Google.Instance.ConsumeFailedItemData(component.m_RecoveryItem); } }