示例#1
0
	void productListReceivedEvent( List<StoreKitProduct> _productList )
	{
        nowPurchaseState = PurchaseState.RESULT_PRODUCTINFO;
        productList.Clear();
		dicProduct.Clear();
        productList = _productList;
        ResetProductData();

        foreach (StoreKitProduct product in productList)
        {
            int uniqueID = listRequestedProductID.IndexOf(product.productIdentifier);
            Store_Item_Info_Table storeItem = new Store_Item_Info_Table(Store_Item_Type.ChargeItem, uniqueID, product.productIdentifier, 1);
            dicStoreItemElement.Add(uniqueID, storeItem);
            dicProductName.Add(uniqueID, product.title);
            dicProductID.Add(uniqueID, product.productIdentifier);
            dicProductPrice.Add(uniqueID, product.formattedPrice);
			dicProduct.Add(uniqueID, product);
        }

        if (dicStoreItemElement.Count > 0)
        {
            listStoreItemElement.AddRange(dicStoreItemElement.Values);
        }

        if (ProductInfoListener != null)
        {
           // ProductInfoListener(listStoreItemElement);
        }

        AsLoadingIndigator.Instance.HideIndigator();

        CheckUnProcessedArkTransaction();
	}
示例#2
0
	public void AddStoreItemInfoKind(eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory,  Store_Item_Info_Table _storeItemElement)
    {
		if (!dicData.ContainsKey(_mainCategory))
			dicData.Add(_mainCategory, new Dictionary<eCashStoreSubCategory, List<Store_Item_Info_Table>>());

		if (!dicData[_mainCategory].ContainsKey(_subCategory))
			dicData[_mainCategory].Add(_subCategory, new List<Store_Item_Info_Table>());

        dicData[_mainCategory][_subCategory].Add(_storeItemElement);
    }
示例#3
0
    public void AddCashStoreItem(Store_Item_Info_Table _storeItemElement)
    {
        try
        {
            if (!dicStoreItem.ContainsKey(_storeItemElement.ID))
                dicStoreItem.Add(_storeItemElement.ID, _storeItemElement);

            // 분류 작업
            Item item = ItemMgr.ItemManagement.GetItem(System.Convert.ToInt32(_storeItemElement.ID));

            if (item == null)
            {
                string szMessage = "Cash item isn't exist in item table = " + _storeItemElement.ID;
                AsUtil.ShutDown(szMessage);
            }

			eCashStoreMainCategory	mainCategory	= _storeItemElement.MainCategory;
			eCashStoreSubCategory	subCategory		= _storeItemElement.SubCategory;
            eCLASS	classType	= item.ItemData.needClass;

			dicStoreItemByClass[classType].AddStoreItemInfoKind(mainCategory, subCategory, _storeItemElement);

			//if (_storeItemElement.RecommendIdx != 0)
			//{
			//    dicStoreItemByClass[classType].AddStoreItemInfoKind(eCashStoreMainCategory.RECOMMEND, _storeItemElement);
			//}
        }
        catch (System.Exception e)
        {
            Debug.LogError(e);
        }
    }
示例#4
0
    public Tbl_Cash_Store_Record(XmlElement _element)// : base(_element)
    {
        try
        {
            XmlNode node = (XmlElement)_element;

            m_StoreItemInfo = new Cash_Store_Info();

			XmlNodeList storeItemNodeList = node.SelectNodes("CashStoreItem");

			foreach (XmlNode storeItemNode in storeItemNodeList)
			{
				int key			= Int32.Parse(storeItemNode["ShopItemID"].InnerText);
				int itemID		= Int32.Parse(storeItemNode["ItemTableIdx"].InnerText);
				int itemCount	= Int32.Parse(storeItemNode["ItemCount"].InnerText);
				int price		= Int32.Parse(storeItemNode["BuyAmount"].InnerText);
				int itemDescID	= storeItemNode["ItemDesc"].InnerText == "NONE" ? -1 : Int32.Parse(storeItemNode["ItemDesc"].InnerText); 
				int setItemID	= storeItemNode["SetID"].InnerText == "NONE" ? -1 : Int32.Parse(storeItemNode["SetID"].InnerText); 

				Store_Item_Type storeItemType = Store_Item_Type.NormalItem;

				eCashStoreMainCategory	mainCategory	= (eCashStoreMainCategory)Enum.Parse(typeof(eCashStoreMainCategory), storeItemNode["MainCategory"].InnerText, false);
				eCashStoreSubCategory	subCategory		= (eCashStoreSubCategory)Enum.Parse(typeof(eCashStoreSubCategory), storeItemNode["SubCategory"].InnerText, false);
				eSHOPITEMHIGHLIGHT		highlight		= storeItemNode["Highlight"].InnerText == "NONE" ? eSHOPITEMHIGHLIGHT.eSHOPITEMHIGHLIGHT_NONE : (eSHOPITEMHIGHLIGHT)Enum.Parse(typeof(eSHOPITEMHIGHLIGHT), storeItemNode["Highlight"].InnerText, false);

				if (mainCategory == eCashStoreMainCategory.WEAPON || mainCategory == eCashStoreMainCategory.EQUIPMENT || mainCategory == eCashStoreMainCategory.COSTUME || mainCategory == eCashStoreMainCategory.FREE)
					storeItemType = Store_Item_Type.GachaItem;

				Store_Item_Info_Table itemElement = new Store_Item_Info_Table(storeItemType, key, itemID, itemCount, itemDescID, setItemID, highlight, price, mainCategory, subCategory);

				m_StoreItemInfo.AddCashStoreItem(itemElement);
			}
        }
        catch (System.Exception e)
        {
            Debug.LogError(e);
        }
    }
示例#5
0
	public Tbl_Store_Record(XmlElement _element)// : base(_element)
	{
		try{
			XmlNode node = (XmlElement)_element;

            m_StoreItemInfo = new NPC_Store_Info();

            m_StoreItemInfo.npcID = System.Convert.ToInt32(node.Attributes["NpcTableIdx"].Value);

            XmlNodeList storeItemNodeList = node.SelectNodes("Store_Item_Unit");

            int keyCount = 0;

            foreach (XmlNode storeItemNode in storeItemNodeList)
            {
                int itemID		= System.Convert.ToInt32(storeItemNode.Attributes["ItemTableIdx"].Value);
				int itemBuyMax	= -1;
				int tradeItem	= -1;
				int tradeCount  = 0;
				int resetTime	= -1;

				if (storeItemNode.Attributes["ItemCount"].Value != "NONE")
					itemBuyMax = System.Convert.ToInt32(storeItemNode.Attributes["ItemCount"].Value);

				if (storeItemNode.Attributes["TradeItem"].Value != "NONE")
					tradeItem = System.Convert.ToInt32(storeItemNode.Attributes["TradeItem"].Value);

				if (storeItemNode.Attributes["TradeItemCount"].Value != "NONE")
					tradeCount = System.Convert.ToInt32(storeItemNode.Attributes["TradeItemCount"].Value);

				if (storeItemNode.Attributes["ResetTime"].Value != "NONE")
					resetTime = System.Convert.ToInt32(storeItemNode.Attributes["ResetTime"].Value);

                Store_Item_Info_Table itemElement = new Store_Item_Info_Table(keyCount++, itemID, itemBuyMax, tradeItem, tradeCount, resetTime);

                m_StoreItemInfo.AddNpcStoreItem(itemElement);
            }
		}
		catch(System.Exception e)
		{
			Debug.LogError(e);
		}
	}
示例#6
0
    public void AddNpcStoreItem(Store_Item_Info_Table _storeItemElement)
    {
        try
        {
			if (!dicStoreItem.ContainsKey(_storeItemElement.ID))
				dicStoreItem.Add(_storeItemElement.ID, _storeItemElement);
			else
			{
				string szMessage = "same id already exist in item table = " + _storeItemElement.ID;
				AsUtil.ShutDown(szMessage);
			}



            // ºÐ·ù ÀÛ¾÷
            Item item = ItemMgr.ItemManagement.GetItem(_storeItemElement.ID);

            if (item == null)
            {
                string szMessage = "item isn't exist in item table = " + _storeItemElement.ID;
                AsUtil.ShutDown(szMessage);
            }

            eStore_ItemKind storeKind = GetItemKind(item.ItemData);
            eCLASS classType = item.ItemData.needClass;

			if (classType == eCLASS.PET)
				classType = eCLASS.All;

            dicStoreItemByClass[classType].AddStoreItemInfoKind(storeKind, _storeItemElement);
        }
        catch (System.Exception e)
        {
            Debug.LogError(e);
        }
    }
示例#7
0
    public void AddStoreItemInfoKind(eStore_ItemKind _storeItemKind, Store_Item_Info_Table _storeItemElement)
    {
        if (!dicData.ContainsKey(_storeItemKind))
            dicData.Add(_storeItemKind, new List<Store_Item_Info_Table>());
		
        dicData[_storeItemKind].Add(_storeItemElement);
    }