public bool CanBuyItemByMoneyType(eTIMESHOP_MONEYTYPE _eMoneyType, long _i64Price) { string text = string.Empty; string text2 = string.Empty; bool flag = true; if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_HEARTS) { if ((long)NkUserInventory.GetInstance().Get_First_ItemCnt(70000) < _i64Price) { text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70000); flag = false; } } else if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_GOLD) { if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money < _i64Price) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("676"); flag = false; } } else if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_SOULJAM) { if ((long)NkUserInventory.GetInstance().Get_First_ItemCnt(70002) < _i64Price) { text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70002); flag = false; } } else if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_MYTHELXIR && (long)NkUserInventory.GetInstance().Get_First_ItemCnt(50311) < _i64Price) { text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(50311); flag = false; } if (!flag) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("443"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { text, "targetitem4", text2 }); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { msgBoxUI.SetMsg(new YesDelegate(this.Open_ItemMall), _eMoneyType, string.Empty, text, eMsgType.MB_OK_CANCEL, 2); } } return(flag); }
public string Get_MoneyTypeTextureName(eTIMESHOP_MONEYTYPE _type) { switch (_type) { case eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_HEARTS: return("Win_I_Hearts"); case eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_GOLD: return("Com_I_MoneyIcon"); case eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_SOULJAM: return("WIN_I_SoulGem"); case eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_MYTHELXIR: return("Win_I_MythElixir"); default: return(string.Empty); } }