public static void PurchaseItem(ITEM_MALL_ITEM item, bool bIfItemKeyNull_NotifyCantBuy) { if (item == null) { return; } BillingManager billingManager = BillingManager.GetBillingManager(); if (billingManager == null) { return; } if (string.IsNullOrEmpty(item.GetStoreItem())) { if (bIfItemKeyNull_NotifyCantBuy) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("211")); } else { TsLog.LogError("Store Item key is null", new object[0]); Main_UI_SystemMessage.ADDMessage("Store Item key is null", SYSTEM_MESSAGE_TYPE.CAUTION_MESSAGE); } return; } if (billingManager != null) { GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ(); gS_BILLING_ITEM_RECODE_REQ.i8Type = 0; gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = item.m_Idx; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ); billingManager.PurchaseItem(item.GetStoreItem(), (int)item.m_nPrice); NrTSingleton <FiveRocksEventManager> .Instance.Placement("paying"); } }