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); }
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 void Send_GS_ITEMMALL_INFO_REQ(eITEMMALL_TYPE eItemMallType, bool bShowDlg) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ITEMMALL_DLG); GS_ITEMMALL_INFO_REQ gS_ITEMMALL_INFO_REQ = new GS_ITEMMALL_INFO_REQ(); gS_ITEMMALL_INFO_REQ.i32ItemMallType = (int)eItemMallType; gS_ITEMMALL_INFO_REQ.i32ItemMallMode = 0; gS_ITEMMALL_INFO_REQ.bShowDLG = bShowDlg; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEMMALL_INFO_REQ, gS_ITEMMALL_INFO_REQ); }
public void SetData(long _LackGold) { long num = 0L; int num2 = NkUserInventory.GetInstance().Get_First_ItemCnt(70000); List <ITEM_MALL_ITEM> group = NrTSingleton <ItemMallItemManager> .Instance.GetGroup(4); this.m_RequestMallType = eITEMMALL_TYPE.BUY_GOLD; string empty = string.Empty; if (group != null) { for (int i = 0; i < group.Count; i++) { if (group[i].m_nGetMoney > _LackGold) { num = group[i].m_nPrice; break; } } if (num > (long)num2) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("170"), "gold", _LackGold }); this.m_bLackHearts = true; } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("169"), "gold", _LackGold }); this.m_bLackHearts = false; } this.m_lbText.SetText(empty); } }