public void RefreshItemMallData() { this.m_sdCollection.Clear(); for (int i = 0; i < this.m_ItemMallBaseData.Count; i++) { ITEM_MALL_ITEM originalItem = this.GetOriginalItem(this.m_ItemMallBaseData[i].i64Idx); if (originalItem != null) { ITEM_MALL_ITEM iTEM_MALL_ITEM = new ITEM_MALL_ITEM(); iTEM_MALL_ITEM.Set(originalItem); iTEM_MALL_ITEM.m_nGroup = (int)this.m_ItemMallBaseData[i].ui8Group; iTEM_MALL_ITEM.m_isRecommend = this.m_ItemMallBaseData[i].isRecommend; iTEM_MALL_ITEM.m_strTextKey = this.m_ItemMallBaseData[i].i32ProductTextKey.ToString(); iTEM_MALL_ITEM.m_nPrice = (long)this.m_ItemMallBaseData[i].i32Price; iTEM_MALL_ITEM.m_fPrice = this.m_ItemMallBaseData[i].fPrice; iTEM_MALL_ITEM.m_nItemUnique = (long)this.m_ItemMallBaseData[i].i32ItemUnique; iTEM_MALL_ITEM.m_nItemNum = (long)this.m_ItemMallBaseData[i].i32ItemNum; iTEM_MALL_ITEM.m_nGetMoney = (long)this.m_ItemMallBaseData[i].i32GetMoney; iTEM_MALL_ITEM.m_nSaleNum = (int)this.m_ItemMallBaseData[i].ui8SaleNum; iTEM_MALL_ITEM.m_nGift = this.m_ItemMallBaseData[i].i8Gift; iTEM_MALL_ITEM.m_strItemTextKey = this.m_ItemMallBaseData[i].i32ItemTextKey.ToString(); iTEM_MALL_ITEM.m_strItemTooltip = this.m_ItemMallBaseData[i].i32ItemToolTipKey.ToString(); iTEM_MALL_ITEM.m_isEvent = this.m_ItemMallBaseData[i].i8Event; this.AddData(iTEM_MALL_ITEM, -1); } } }
private void On_Mouse_Click(IUIObject a_oObject) { eITEMMALL_TYPE eItemMallType = eITEMMALL_TYPE.BUY_HEARTS; if (!this.m_bLackHearts) { eItemMallType = eITEMMALL_TYPE.BUY_GOLD; } if (this.m_ItemUnique > 0 && this.m_RequestMallType == eITEMMALL_TYPE.NONE) { ITEM_MALL_ITEM itemData = NrTSingleton <ItemMallItemManager> .Instance.GetItemData(this.m_ItemUnique); if (itemData != null) { eItemMallType = (eITEMMALL_TYPE)itemData.m_nGroup; } } else { eItemMallType = this.m_RequestMallType; } NrTSingleton <ItemMallItemManager> .Instance.Send_GS_ITEMMALL_INFO_REQ(eItemMallType, true); this.Close(); }
public bool SetDataShopItem(int ItemUnique, eITEMMALL_TYPE _Type = eITEMMALL_TYPE.NONE) { if (ItemUnique > 0 && _Type == eITEMMALL_TYPE.NONE) { ITEM_MALL_ITEM itemData = NrTSingleton <ItemMallItemManager> .Instance.GetItemData(ItemUnique); if (itemData == null || !NrTSingleton <ContentsLimitManager> .Instance.IsShopProduct(itemData.m_Idx)) { this.Close(); return(false); } } this.m_RequestMallType = _Type; this.m_ItemUnique = ItemUnique; string empty = string.Empty; string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(ItemUnique); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("226"), "itemname", itemNameByItemUnique, "itemname", itemNameByItemUnique }); this.m_lbText.SetText(empty); return(true); }
public void SetMallItem(ITEM_MALL_ITEM MallItem, int i32CharKind) { this.m_DrawTexture_Won.SetTexture(ItemMallItemManager.GetCashTextureName((eITEMMALL_MONEY_TYPE)MallItem.m_nMoneyType)); this.m_Label_Price.Text = ItemMallItemManager.GetCashPrice(MallItem); this.m_Button_Price.Data = MallItem; this.m_Label_Price.Visible = true; this.m_Button_Price.Visible = true; this.m_DrawTexture_Won.Visible = true; byte b = 6; int level = 50; List <SOL_GUIDE> value = NrTSingleton <NrTableSolGuideManager> .Instance.GetValue(); foreach (SOL_GUIDE current in value) { if (current.m_i32CharKind == i32CharKind) { b = (byte)current.m_iSolGrade; } } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind); if (i32CharKind != 0) { level = (int)charKindInfo.GetGradeMaxLevel((short)(b - 1)); } this.SetSolKind(i32CharKind, b, level); this.m_eParentUI = G_ID.ITEMMALL_DLG; }
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"); } }
public void Set(ITEM_MALL_ITEM Data) { this.m_Idx = Data.m_Idx; this.m_nGroup = Data.m_nGroup; this.m_isRecommend = Data.m_isRecommend; this.m_strIconPath = Data.m_strIconPath; this.m_strTextKey = Data.m_strTextKey; this.m_strTextNote = Data.m_strTextNote; this.m_nMoneyType = Data.m_nMoneyType; this.m_nPrice = Data.m_nPrice; this.m_fPrice = Data.m_fPrice; this.m_nItemUnique = Data.m_nItemUnique; this.m_nItemNum = Data.m_nItemNum; this.m_nBounusItemNum = Data.m_nBounusItemNum; this.m_nGetMoney = Data.m_nGetMoney; this.m_nSaleNum = Data.m_nSaleNum; this.m_nGift = Data.m_nGift; this.m_strItemTextKey = Data.m_strItemTextKey; this.m_strItemTooltip = Data.m_strItemTooltip; this.m_strSolKind = Data.m_strSolKind; this.m_isEvent = Data.m_isEvent; this.m_nVipExp = Data.m_nVipExp; this.m_strGoogleQA = Data.m_strGoogleQA; this.m_strGoogle = Data.m_strGoogle; this.m_strApple = Data.m_strApple; }
public bool IsBuyCountLimit(ITEM_MALL_ITEM ItemMallItem) { ITEM_VOUCHER_DATA itemVoucherDataFromItemID = this.GetItemVoucherDataFromItemID(ItemMallItem.m_Idx); if (itemVoucherDataFromItemID != null) { long voucherRemainTime = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetVoucherRemainTime((eVOUCHER_TYPE)itemVoucherDataFromItemID.ui8VoucherType, itemVoucherDataFromItemID.i64ItemMallID); TsLog.LogError("i64RemainTime ={0}", new object[] { voucherRemainTime }); if (voucherRemainTime > 0L) { return(true); } } if (ItemMallItem.m_nSaleNum == 0) { return(true); } for (int i = 0; i < this.m_ItemMallBuyCountList.Count; i++) { if (this.m_ItemMallBuyCountList[i].i64ItemMallID == ItemMallItem.m_Idx) { return(ItemMallItem.m_nSaleNum > this.m_ItemMallBuyCountList[i].i32BuyCount); } } return(true); }
public void MsgBoxOKEvent(object EventObject) { if (!NrTSingleton <ContentsLimitManager> .Instance.IsShopProduct(this.m_ItemMall.m_Idx) || !BaseNet_Game.GetInstance().IsSocketConnected() || !NrTSingleton <ItemMallItemManager> .Instance.BuyItem(this.m_ItemMall.m_Idx)) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("658")); return; } NrTSingleton <ItemMallItemManager> .Instance.SetTradeItem(this.m_ItemMall, ItemMallItemManager.eItemMall_SellType.FIVEROCKSEVENT); GS_ITEMMALL_CHECK_CAN_TRADE_REQ gS_ITEMMALL_CHECK_CAN_TRADE_REQ = new GS_ITEMMALL_CHECK_CAN_TRADE_REQ(); gS_ITEMMALL_CHECK_CAN_TRADE_REQ.MallIndex = this.m_ItemMall.m_Idx; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEMMALL_CHECK_CAN_TRADE_REQ, gS_ITEMMALL_CHECK_CAN_TRADE_REQ); if (this.m_cbCheckBox.IsChecked()) { NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); ITEMMALL_POPUPSHOP poPupShop_AfterItemBuyLimit = NrTSingleton <ItemMallPoPupShopManager> .Instance.GetPoPupShop_AfterItemBuyLimit(this.m_ItemMall.m_Idx); if (poPupShop_AfterItemBuyLimit != null) { GS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ = new GS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ(); gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.i64PersonID = myCharInfo.m_PersonID; gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.i32Idx = poPupShop_AfterItemBuyLimit.m_Idx; gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.bCheckBox = true; SendPacket.GetInstance().SendObject(2538, gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ); } } this.m_ItemMall = null; this.bcheck = true; this.Close(); }
public static string GetCashPrice(ITEM_MALL_ITEM item) { if (item.m_nMoneyType == 1 && (TsPlatform.IsIPhone || NrGlobalReference.strLangType.Equals("eng"))) { return(Protocol_Item.Money_Format(item.m_fPrice)); } return(Protocol_Item.Money_Format(item.m_nPrice)); }
public void OnPurchaseRequest(string campaignId, string productId) { this.ShowMessage("FiveRocks.OnPurchaseRequest(campaignId={0}, productId={1})", new object[] { campaignId, productId }); long index = 0L; string empty = string.Empty; if (long.TryParse(productId, out index)) { ITEM_MALL_ITEM item = NrTSingleton <ItemMallItemManager> .Instance.GetItem(index); if (item == null) { return; } this.m_ItemMall = item; MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("78"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(item.m_strTextKey) }); if (item.m_nGroup == 8) { string empty2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(item.m_strTextKey), "count", item.m_nItemNum }); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("78"), "targetname", empty2 }); } msgBoxUI.OkEventImmediatelyClose = false; NrTSingleton <ItemMallItemManager> .Instance.CheckMsgBox = msgBoxUI; msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("845"), empty, eMsgType.MB_OK_CANCEL); } } else { NrTSingleton <FiveRocksEventData> .Instance.CheckEventData(productId); } }
public eITEMMALL_MONEY_TYPE GetMoneyType(int shopIdx) { ITEM_MALL_ITEM itemMall = this.GetItemMall(shopIdx); if (itemMall == null) { return(eITEMMALL_MONEY_TYPE.END); } return((eITEMMALL_MONEY_TYPE)itemMall.m_nMoneyType); }
public string GetCashPrice(int shopIdx) { ITEM_MALL_ITEM itemMall = this.GetItemMall(shopIdx); if (itemMall == null) { return(string.Empty); } return(ItemMallItemManager.GetCashPrice(itemMall)); }
public byte IsEventItem(int shopIdx) { ITEM_MALL_ITEM itemMall = this.GetItemMall(shopIdx); if (itemMall == null) { return(0); } return(itemMall.m_isEvent); }
public override bool ParseDataFromNDT(TsDataReader dr) { foreach (TsDataReader.Row data in dr) { ITEM_MALL_ITEM iTEM_MALL_ITEM = new ITEM_MALL_ITEM(); iTEM_MALL_ITEM.SetData(data); NrTSingleton <ItemMallItemManager> .Instance.Set_Value(iTEM_MALL_ITEM, -1); } return(true); }
public void OnClickBuy(IUIObject obj) { string empty = string.Empty; if (this.m_nCurrPopUpShopIdx != 0L) { ITEM_MALL_ITEM item = NrTSingleton <ItemMallItemManager> .Instance.GetItem(this.m_nCurrPopUpShopIdx); if (item == null) { return; } this.m_ItemMall = item; MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("78"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(item.m_strTextKey) }); if (item.m_nGroup == 8) { string empty2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(item.m_strTextKey), "count", item.m_nItemNum }); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("78"), "targetname", empty2 }); } msgBoxUI.OkEventImmediatelyClose = false; NrTSingleton <ItemMallItemManager> .Instance.CheckMsgBox = msgBoxUI; msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("845"), empty, eMsgType.MB_OK_CANCEL); msgBoxUI.SetLocation(msgBoxUI.GetLocationX(), msgBoxUI.GetLocationY(), -900f); } } else { TsLog.LogError("CurrPopUpShopIdx", new object[] { this.m_nCurrPopUpShopIdx }); } }
public void PurchaseItem(long ItemMallIndex) { ITEM_MALL_ITEM item = NrTSingleton <ItemMallItemManager> .Instance.GetItem(ItemMallIndex); string textFromItem = NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(item.m_strTextKey); if (item.m_nMoneyType == 1) { Tapjoy.TrackPurchase(textFromItem, "USD", (double)item.m_fPrice, null); } Tapjoy.TrackEvent("Item", "Item", "Purchase", textFromItem, ((eITEMMALL_TYPE)item.m_nGroup).ToString(), 1L, "Price", (long)item.m_fPrice, null, 0L); }
public void Measure_Purchase(long _MallIndex) { if (this.m_goMATDelegate == null) { return; } ITEM_MALL_ITEM item = NrTSingleton <ItemMallItemManager> .Instance.GetItem(_MallIndex); if (item == null) { return; } string textFromItem = NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(item.m_strTextKey); string currencyCode = string.Empty; eSERVICE_AREA currentServiceArea = NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea(); if (currentServiceArea == eSERVICE_AREA.SERVICE_ANDROID_KORGOOGLE || currentServiceArea == eSERVICE_AREA.SERVICE_ANDROID_KORKAKAO) { if (item.m_nMoneyType == 1) { currencyCode = "KRW"; MATItem[] eventItems = new MATItem[] { new MATItem(textFromItem) { quantity = new int?(1), unitPrice = new double?((double)item.m_nPrice), revenue = new double?((double)item.m_nPrice) } }; MATBinding.MeasureEvent(new MATEvent("Purchase") { currencyCode = currencyCode, eventItems = eventItems, receiptSignature = PlayerPrefs.GetString(NrPrefsKey.SHOP_RECEIPT, string.Empty), revenue = new double?((double)item.m_nPrice), advertiserRefId = "186576" }); } } else if (item.m_nMoneyType == 1) { currencyCode = "USD"; MATBinding.MeasureEvent(new MATEvent("Purchase") { revenue = new double?((double)item.m_fPrice), currencyCode = currencyCode, advertiserRefId = textFromItem }); } }
public void MsgBoxOKEvent(object EventObject) { if (!NrTSingleton <ContentsLimitManager> .Instance.IsShopProduct(this.m_ItemMall.m_Idx) || !BaseNet_Game.GetInstance().IsSocketConnected() || !NrTSingleton <ItemMallItemManager> .Instance.BuyItem(this.m_ItemMall.m_Idx)) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("658")); return; } NrTSingleton <ItemMallItemManager> .Instance.SetTradeItem(this.m_ItemMall, ItemMallItemManager.eItemMall_SellType.FIVEROCKSEVENT); GS_ITEMMALL_CHECK_CAN_TRADE_REQ gS_ITEMMALL_CHECK_CAN_TRADE_REQ = new GS_ITEMMALL_CHECK_CAN_TRADE_REQ(); gS_ITEMMALL_CHECK_CAN_TRADE_REQ.MallIndex = this.m_ItemMall.m_Idx; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEMMALL_CHECK_CAN_TRADE_REQ, gS_ITEMMALL_CHECK_CAN_TRADE_REQ); this.m_ItemMall = null; }
public void AddData(ITEM_MALL_ITEM Data, int groupNum = -1) { if (groupNum < 0) { groupNum = Data.m_nGroup; } if (this.m_sdCollection.ContainsKey(groupNum)) { this.m_sdCollection[groupNum].Add(Data); } else { this.m_sdCollection.Add(groupNum, new List <ITEM_MALL_ITEM>()); this.m_sdCollection[groupNum].Add(Data); } if (Data.m_isRecommend && groupNum != 1) { this.AddData(Data, 1); } }
public void TradeItem() { if (this.m_checkMsgBox != null) { this.m_checkMsgBox.Close(); this.m_checkMsgBox = null; } if (this.m_mallItem.m_nMoneyType == 1) { eSERVICE_AREA currentServiceArea = NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea(); if (currentServiceArea == eSERVICE_AREA.SERVICE_ANDROID_KORTSTORE) { ItemMallDlg itemMallDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMMALL_DLG) as ItemMallDlg; if (itemMallDlg != null) { itemMallDlg.CloseEnable = false; } } BillingManager.PurchaseItem(this.m_mallItem, this.m_curSellType == ItemMallItemManager.eItemMall_SellType.ITEMMALL); NrTSingleton <ItemMallItemManager> .Instance.Trading = false; this.m_mallItem = null; } else if (this.m_mallItem.m_nMoneyType != 4) { if (this.CanBuyItemByHeartsOrGold_Notify(this.m_mallItem)) { GS_ITEMMALL_TRADE_REQ gS_ITEMMALL_TRADE_REQ = new GS_ITEMMALL_TRADE_REQ(); gS_ITEMMALL_TRADE_REQ.MallIndex = this.m_mallItem.m_Idx; gS_ITEMMALL_TRADE_REQ.SolID = 0L; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEMMALL_TRADE_REQ, gS_ITEMMALL_TRADE_REQ); this.m_mallItem = null; } else { NrTSingleton <ItemMallItemManager> .Instance.Trading = false; this.m_mallItem = null; } } }
public void Set_Value(ITEM_MALL_ITEM a_cValue, int groupNum = -1) { if (groupNum < 0) { groupNum = a_cValue.m_nGroup; } if (this.m_sdCollection.ContainsKey(groupNum)) { this.m_OriginalCollection[groupNum].Add(a_cValue); this.m_sdCollection[groupNum].Add(a_cValue); } else { this.m_OriginalCollection.Add(groupNum, new List <ITEM_MALL_ITEM>()); this.m_OriginalCollection[groupNum].Add(a_cValue); this.m_sdCollection.Add(groupNum, new List <ITEM_MALL_ITEM>()); this.m_sdCollection[groupNum].Add(a_cValue); } if (a_cValue.m_isRecommend && groupNum != 1) { this.Set_Value(a_cValue, 1); } }
public void InitDummyUI() { List <UIListItemContainer> list = new List <UIListItemContainer>(); for (int i = 0; i < this.m_nlbVoucherPremium.Count; i++) { UIListItemContainer item = this.m_nlbVoucherPremium.GetItem(i); if (!(item == null)) { ITEM_MALL_ITEM iTEM_MALL_ITEM = (ITEM_MALL_ITEM)item.Data; if (iTEM_MALL_ITEM != null) { if (iTEM_MALL_ITEM.m_Idx != 9010L) { list.Add(item); } } } } foreach (UIListItemContainer current in list) { this.m_nlbVoucherPremium.RemoveItem(current, true); } }
public override void Update() { int noticeCount = this.GetNoticeCount(); if (0 < noticeCount) { if (this.count != noticeCount) { int num = noticeCount; this.menuNotice.Visible = true; this.menuNotice.Text = num.ToString(); this.count = num; } } else if (this.menuNotice.Visible) { this.menuNotice.Visible = false; } List <ITEM_MALL_ITEM> group = NrTSingleton <ItemMallItemManager> .Instance.GetGroup(50); if (group == null) { return; } bool flag = false; for (int i = 0; i < group.Count; i++) { ITEM_MALL_ITEM iTEM_MALL_ITEM = group[i]; if (iTEM_MALL_ITEM != null) { ITEM_VOUCHER_DATA itemVoucherDataFromItemID = NrTSingleton <ItemMallItemManager> .Instance.GetItemVoucherDataFromItemID(iTEM_MALL_ITEM.m_Idx); if (itemVoucherDataFromItemID != null) { eVOUCHER_TYPE ui8VoucherType = (eVOUCHER_TYPE)itemVoucherDataFromItemID.ui8VoucherType; long voucherRemainTime = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetVoucherRemainTime(ui8VoucherType, itemVoucherDataFromItemID.i64ItemMallID); if (voucherRemainTime > 0L && NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IsUseVoucher(ui8VoucherType, itemVoucherDataFromItemID.i64ItemMallID)) { flag = true; break; } } } } if (!flag) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_FREETICKET_PREMINUM_TIME); if (PublicMethod.GetCurTime() > charSubData) { flag = true; } charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_FREETICKET_HEARTS_TIME); if (PublicMethod.GetCurTime() > charSubData) { flag = true; } } if (flag && this.btShopMenu.Visible) { this.ShopNotice.Visible = true; } else { this.ShopNotice.Visible = false; } }
public void SetItem(ITEM_MALL_ITEM Item) { this.m_Item = Item; this.m_lbProductName.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(Item.m_strTextKey); this.m_lbDecription.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(Item.m_strItemTooltip); this.m_dtProductImg.SetFadeTextureFromBundle(Item.m_strIconPath); this.m_lbPrice.Text = ItemMallItemManager.GetCashPrice(Item); ITEM_VOUCHER_DATA itemVoucherDataFromItemID = NrTSingleton <ItemMallItemManager> .Instance.GetItemVoucherDataFromItemID(Item.m_Idx); if (itemVoucherDataFromItemID != null) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } eVOUCHER_TYPE ui8VoucherType = (eVOUCHER_TYPE)itemVoucherDataFromItemID.ui8VoucherType; if (ui8VoucherType == eVOUCHER_TYPE.eVOUCHER_TYPE_RECRUIT_HEARTS_HERO) { long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_FREETICKET_HEARTS_TIME); if (PublicMethod.GetCurTime() > charSubData) { this.m_lbPrice.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3344"); } } else if (ui8VoucherType == eVOUCHER_TYPE.eVOUCHER_TYPE_RECRUIT_HERO) { long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_FREETICKET_PREMINUM_TIME); if (PublicMethod.GetCurTime() > charSubData) { this.m_lbPrice.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3344"); } } else { long voucherRemainTime = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetVoucherRemainTime(ui8VoucherType, itemVoucherDataFromItemID.i64ItemMallID); if (voucherRemainTime > 0L) { this.m_btPrice.controlIsEnabled = false; } } } this.m_btPrice.Data = Item; this.m_btPrice.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClicked)); this.m_dt_won.SetTexture(ItemMallItemManager.GetCashTextureName((eITEMMALL_MONEY_TYPE)Item.m_nMoneyType)); this.VisibleContent(false); if (NrTSingleton <ContentsLimitManager> .Instance.IsRateUrl() && (this.m_Item.m_nGroup == 50 || this.m_Item.m_nGroup == 51 || this.m_Item.m_nGroup == 5)) { this.m_bRateOpenUrl.Visible = true; } char[] separator = new char[] { '+' }; string[] array = Item.m_strSolKind.Split(separator); if (array == null) { return; } int num = 0; string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string text2 = text.Trim(); if (!(text2 == string.Empty)) { int charKindByCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(text2); if (charKindByCode != 0) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(charKindByCode); this.m_btSol[num].Visible = true; this.m_btSol2[num].Visible = true; this.m_btSol[num].Data = charKindByCode; this.m_btSol[num].Text = string.Format("{0} {1}", charKindInfo.GetName(), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("788")); this.m_btSol2[num].Data = charKindByCode; num++; } } } if (TsPlatform.IsAndroid) { if (Item.m_nGift == 1) { this.m_lbGiftHelp.Visible = true; } else { this.m_lbGiftHelp.Visible = false; } } if (0 < Item.m_nSaleNum) { int num2 = Item.m_nSaleNum - NrTSingleton <ItemMallItemManager> .Instance.GetBuyCount(Item.m_Idx); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2611"), "Count", num2 }); this.m_lbSaleNum.SetText(empty); this.m_lbSaleNum.Visible = true; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2639"), "count", Item.m_nSaleNum }); this.m_lbSaleNumHelp.SetText(empty); this.m_lbSaleNumHelp.Visible = true; } else { this.m_lbSaleNum.Visible = false; this.m_lbSaleNumHelp.Visible = false; this.m_dtProductLine.Visible = false; } }
public void SetTradeItem(ITEM_MALL_ITEM SelectItem, ItemMallItemManager.eItemMall_SellType eSellType) { this.m_SelectItem = SelectItem; this.m_eSellType = eSellType; }
public void PurchaseData(ITEM_MALL_ITEM pData) { }
public bool IsItemVoucherType(ITEM_MALL_ITEM Item) { return(Item != null && this.IsItemVoucherTypeFromItemID(Item.m_Idx)); }
public void SetTradeItem(ITEM_MALL_ITEM mallItem, ItemMallItemManager.eItemMall_SellType eSellStyle) { this.m_mallItem = mallItem; this.m_curSellType = eSellStyle; }
public bool CanBuyItemByHeartsOrGold_Notify(ITEM_MALL_ITEM mallItem) { string empty = string.Empty; string text = string.Empty; if (mallItem.m_nMoneyType == 2) { if ((long)NkUserInventory.GetInstance().Get_First_ItemCnt(70000) < mallItem.m_nPrice) { text = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70000); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("198"), "targetname", text }); Main_UI_SystemMessage.ADDMessage(empty); return(false); } } else if (mallItem.m_nMoneyType == 3) { if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money < mallItem.m_nPrice) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("198"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("676") }); Main_UI_SystemMessage.ADDMessage(empty); return(false); } } else if (mallItem.m_nMoneyType == 5) { if ((long)NkUserInventory.GetInstance().Get_First_ItemCnt(70002) < mallItem.m_nPrice) { text = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70002); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("198"), "targetname", text }); Main_UI_SystemMessage.ADDMessage(empty); return(false); } } else if (mallItem.m_nMoneyType == 6 && (long)NkUserInventory.GetInstance().Get_First_ItemCnt(50311) < mallItem.m_nPrice) { text = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(50311); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("198"), "targetname", text }); Main_UI_SystemMessage.ADDMessage(empty); return(false); } return(true); }