Exemplo n.º 1
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);
    }
Exemplo n.º 2
0
	public List<Store_Item_Info_Table> GetStoreItem(eCashStoreMainCategory _main, eCashStoreSubCategory _sub)
    {
		if (dicData.ContainsKey(_main))
		{
			if (dicData[_main].ContainsKey(_sub))
				return dicData[_main][_sub];
			else
				return new List<Store_Item_Info_Table>();
		}
		else
			return new List<Store_Item_Info_Table>();
    }
Exemplo n.º 3
0
    public Store_Item_Info_Table()
    {
        Key			= -1;
        ID			= -1;
        Count		= 0;
		SetItemID	= 0;
		DescID		= 0;
        ID_String	= "-1";
        Highlight	= eSHOPITEMHIGHLIGHT.eSHOPITEMHIGHLIGHT_NONE;
        Price		= 0;
		MainCategory	= eCashStoreMainCategory.NONE;
		SubCategory		= eCashStoreSubCategory.NONE;
    }
Exemplo n.º 4
0
	public Store_Item_Info_Table(Store_Item_Type _storeItemType, int _key, int _itemID, int _count, int _itemDescID, int _setItemID, eSHOPITEMHIGHLIGHT _highlight, int _price, eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory)
	{
        Type			= _storeItemType;
        Key				= _key;
		ID				= _itemID;
		Count			= _count;
		DescID			= _itemDescID;
		SetItemID		= _setItemID;
        ID_String		= _itemID.ToString();
        Highlight		= _highlight;
        Price			= _price;
		MainCategory	= _mainCategory;
		SubCategory		= _subCategory;

	}
	public override void ShowLineupPopup(eCashStoreMainCategory _mainCategory)
	{
		if (listFilteredItem.Count <= 0)
			return;

		AsSoundManager.Instance.PlaySound(AsSoundPath.ButtonClick, Vector3.zero, false);

		if (AsHudDlgMgr.Instance.IsOpenCashStore)
			AsHudDlgMgr.Instance.cashStore.LockInput(true);

		objLineupPopup = GameObject.Instantiate(objLineupPopupPrefab) as GameObject;
		objLineupPopup.transform.parent = AsHudDlgMgr.Instance.cashStore.transform;
		objLineupPopup.transform.localPosition = new Vector3(0.0f, 0.0f, -13.0f);

		List<int> listItemID = new List<int>();
		
		Item item = ItemMgr.ItemManagement.GetItem(listFilteredItem[0].ID);
		
		if (item == null)
			return;

		int lotteryID = item.ItemData.m_iItem_Rand_ID;

		Tbl_Lottery_Record lotteryRecord = AsTableManager.Instance.GetTbl_Lottery_Record(lotteryID);

		foreach (int randomID in lotteryRecord.idlist)
		{
			Tbl_RandItem_Record randomRecord = AsTableManager.Instance.GetTbl_RandItem_Record(randomID);

			if (randomRecord != null)
				listItemID.AddRange(randomRecord.idlist);
		}

		GachaCostumeLineupPopupController popController = objLineupPopup.GetComponent<GachaCostumeLineupPopupController>();

		if (popController != null)
			popController.ShowLineUp(listItemID);
	}
	void SetString(eCashStoreMainCategory _mainCategory)
	{
		txtIcon.Text	= AsTableManager.Instance.GetTbl_String(2169);
		txtGrade.Text	= AsTableManager.Instance.GetTbl_String(2168);
		txtLevel.Text	= AsTableManager.Instance.GetTbl_String(1724);
		txtOption.Text	= AsTableManager.Instance.GetTbl_String(2242);
		txtRandomOption.Text= AsTableManager.Instance.GetTbl_String(2244);
		

		if (_mainCategory == eCashStoreMainCategory.WEAPON)
		{
			txtTitle.Text = AsTableManager.Instance.GetTbl_String(2239);
			txtMin.Text = AsTableManager.Instance.GetTbl_String(2240);
			txtMax.Text = AsTableManager.Instance.GetTbl_String(2241);
			txtRandomDesc.Text = AsTableManager.Instance.GetTbl_String(2245);
		}
		else if (_mainCategory == eCashStoreMainCategory.EQUIPMENT)
		{
			txtTitle.Text = AsTableManager.Instance.GetTbl_String(2248);
			txtMin.Text = AsTableManager.Instance.GetTbl_String(2249);
			txtMax.Text = AsTableManager.Instance.GetTbl_String(2250);
			txtRandomDesc.Text = AsTableManager.Instance.GetTbl_String(2251);
		}
	}
Exemplo n.º 7
0
	public virtual void ShowLineupPopup(eCashStoreMainCategory _mainCategory)
	{
		if (AsHudDlgMgr.Instance.IsOpenCashStore)
			AsHudDlgMgr.Instance.cashStore.LockInput(true);
		
		objLineupPopup = GameObject.Instantiate(objLineupPopupPrefab) as GameObject;

		objLineupPopup.transform.parent = AsHudDlgMgr.Instance.cashStore.transform;
		objLineupPopup.transform.localPosition = new Vector3(0.0f, 0.0f, -10.0f);

		Dictionary<int, Item> dicLineupItem = new Dictionary<int, Item>();

		GachaLineupPopupController popController = objLineupPopup.GetComponent<GachaLineupPopupController>();


		#region - for array -
		//foreach (Store_Item_Info_Table itemRecord in filteredListItem)
		//{
		//    Item item = ItemMgr.ItemManagement.GetItem(itemRecord.ID);
		//    ItemData itemData = item.ItemData;

		//    Tbl_Lottery_Record lotteryRecord = AsTableManager.Instance.GetTbl_Lottery_Record(itemData.m_iItem_Rand_ID);

		//    if (lotteryRecord == null)
		//        continue;

		//    foreach (int lotteryItemID in lotteryRecord.idlist)
		//    {
		//        Tbl_RandItem_Record randomItemRecord = AsTableManager.Instance.GetTbl_RandItem_Record(lotteryItemID);

		//        if (randomItemRecord == null)
		//            continue;

		//        foreach (int itemID in randomItemRecord.idlist)
		//        {
		//            Item pickItem = ItemMgr.ItemManagement.GetItem(itemID);

		//            if (!dicLineupItem.ContainsKey(itemID))
		//                dicLineupItem.Add(itemID, pickItem);
		//        }
		//    }
		//}
		#endregion

		#region - only one -
		if (listFilteredItem.Count <= 0)
			return;

		Item item = ItemMgr.ItemManagement.GetItem(listFilteredItem[0].ID);
		ItemData itemData = item.ItemData;
        List<Item> listItem = new List<Item>();
        List<int>  listQuantity = new List<int>();

		Tbl_Lottery_Record lotteryRecord = AsTableManager.Instance.GetTbl_Lottery_Record(itemData.m_iItem_Rand_ID);

		if (lotteryRecord == null)
			return;

		foreach (int lotteryItemID in lotteryRecord.idlist)
		{
			Tbl_RandItem_Record randomItemRecord = AsTableManager.Instance.GetTbl_RandItem_Record(lotteryItemID);

			if (randomItemRecord == null)
				continue;

			int count = 0;
            foreach (int itemID in randomItemRecord.idlist)
            {
                if (itemID == 0)
                    continue;

                Item pickItem = ItemMgr.ItemManagement.GetItem(itemID);

                listItem.Add(pickItem);
                listQuantity.Add(randomItemRecord.quentities[count++]);
            }
		}
		#endregion

        popController.ShowLineUp(_mainCategory, listItem, listQuantity);
	}
Exemplo n.º 8
0
	public List<Store_Item_Info_Table> GetCashStoreItemInfo(eCLASS _eClass, eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory)
    {
        List<Store_Item_Info_Table> returnList = new List<Store_Item_Info_Table>();

		List<Store_Item_Info_Table> listStoreItemInfo = m_ResourceTable.GetCashStoreItem(_eClass, _mainCategory, _subCategory);
        List<Store_Item_Info_Table> listStoreItemInfoAll = new List<Store_Item_Info_Table>();
        
        if (_eClass != eCLASS.All)
			listStoreItemInfoAll = m_ResourceTable.GetCashStoreItem(eCLASS.All, _mainCategory, _subCategory);

        if (listStoreItemInfo != null)
            returnList.AddRange(listStoreItemInfo);

        if (listStoreItemInfoAll != null)
            returnList.AddRange(listStoreItemInfoAll);

        return returnList;
    }
Exemplo n.º 9
0
	public List<Store_Item_Info_Table> GetCashStoreItem(eCLASS _class, eCashStoreMainCategory _mainCetegory, eCashStoreSubCategory _subCategory)
    {
		if (dicStoreItemByClass.ContainsKey(_class))
			return dicStoreItemByClass[_class].GetStoreItem(_mainCetegory, _subCategory);
		else
			return new List<Store_Item_Info_Table>();
    }
	public void ShowLineUp(eCashStoreMainCategory _mainCategory,  List<Item> _listItem, List<int> _listQuantities)
	{
        listQuantity = _listQuantities;
        listItem = _listItem;

		AsSoundManager.Instance.PlaySound(AsSoundPath.ButtonClick, Vector3.zero, false);

		SetString(_mainCategory);

		listLineupListItemCon.Clear();

		Debug.LogWarning("Item count = " + _listItem.Count);

		int count = 0;

		foreach (Item item in _listItem)
		{
			ItemData itemData = item.ItemData;

			Item.eITEM_TYPE equipType = itemData.GetItemType();

			IUIListObject newListItem = scrollList.CreateItem(listItemPrefab);

			newListItem.gameObject.name = listLineupListItemCon.Count.ToString();

			GachaEquipLineupListItemController listItemController = newListItem.gameObject.GetComponent<GachaEquipLineupListItemController>();

			listLineupListItemCon.Add(listItemController);

			listItemController.itemID = itemData.m_iID;

			Item nowItem = ItemMgr.ItemManagement.GetItem(itemData.m_iID);

			Item.eEQUIP eEquip = (Item.eEQUIP)itemData.GetSubType();

			int quentity = nowItem.ItemData.GetItemType() == Item.eITEM_TYPE.EquipItem ?  0 : _listQuantities[count] ;

			if (listItemController != null)
			{
				GameObject objIcon = AsCashStore.GetItemIcon(itemData.m_iID.ToString(), quentity);

                StringBuilder sbItemName = new StringBuilder();

                if (nowItem.ItemData.GetItemType() == Item.eITEM_TYPE.EquipItem && _listQuantities[count] >= 1)
                {
                    sbItemName.Append(colorStrength);
                    sbItemName.Append("+");
                    sbItemName.Append(_listQuantities[count]);
                    sbItemName.Append(" ");
                    sbItemName.Append(nowItem.ItemData.GetGradeColor());
                    sbItemName.Append(AsTableManager.Instance.GetTbl_String(nowItem.ItemData.nameId));
                }
                else
                {
                    sbItemName.Insert(0, nowItem.ItemData.GetGradeColor().ToString());
                    sbItemName.AppendFormat("{0}", AsTableManager.Instance.GetTbl_String(nowItem.ItemData.nameId));
                }

				string name  	= sbItemName.ToString();
				string level	= itemData.levelLimit.ToString();
				string txtMin		= string.Empty;
				string txtMax		= string.Empty;
				string option	= itemData.destId == int.MaxValue ? string.Empty : AsTableManager.Instance.GetTbl_String(itemData.destId);

				if (equipType != Item.eITEM_TYPE.EquipItem)
					option = string.Empty;


                Tbl_Strengthen_Record strengthenRecord = null;

				if (nowItem.ItemData.GetItemType() == Item.eITEM_TYPE.EquipItem && _listQuantities[count] >= 1)
				{
                     strengthenRecord = AsTableManager.Instance.GetStrengthenTable().GetStrengthenRecord(nowItem.ItemData.GetItemType(),
                                                       (Item.eEQUIP)nowItem.ItemData.GetSubType(), nowItem.ItemData.grade, nowItem.ItemData.levelLimit, _listQuantities[count]);
                }


				// find item min max
                int min = 0;
                int max = 0;

				if (equipType == Item.eITEM_TYPE.EquipItem )
				{
					if (Item.eEQUIP.Weapon == eEquip)
					{
						if (itemData.needClass == eCLASS.CLERIC || itemData.needClass == eCLASS.MAGICIAN)
						{
                            min = strengthenRecord == null ? itemData.matkDmgMin : itemData.matkDmgMin + itemData.matkDmgMin * strengthenRecord.getStrengthenRatiog / 1000;
                            max = strengthenRecord == null ? itemData.matkDmgMax : itemData.matkDmgMax + itemData.matkDmgMax * strengthenRecord.getStrengthenRatiog / 1000;
						}
						else
						{
                            min = strengthenRecord == null ? itemData.parkDmgMin : itemData.parkDmgMin + itemData.parkDmgMin * strengthenRecord.getStrengthenRatiog / 1000;
                            max = strengthenRecord == null ? itemData.parkDmgMax : itemData.parkDmgMax + itemData.parkDmgMax * strengthenRecord.getStrengthenRatiog / 1000;
						}
					}
					else if (Item.eEQUIP.Ring == eEquip || Item.eEQUIP.Necklace == eEquip || Item.eEQUIP.Earring == eEquip)
					{
						min = max = 0;
					}
					else
					{
						min = strengthenRecord == null ? itemData.pDef : itemData.pDef + itemData.pDef * strengthenRecord.getStrengthenRatiog / 1000;
						max = strengthenRecord == null ? itemData.mDef : itemData.mDef + itemData.mDef * strengthenRecord.getStrengthenRatiog / 1000;
					}
				}


                if (equipType == Item.eITEM_TYPE.EquipItem)
                {
                    txtMin = min.ToString();
                    txtMax = max.ToString();
                }
                else
                {
                    txtMin = string.Empty;
                    txtMax = string.Empty;
                }

				listItemController.SetInfo(objIcon, name, level, txtMin, txtMax, option);
                listItemController.idx = count;
			}

			count++;
		}
	}
Exemplo n.º 11
0
	public List<Store_Item_Info_Table> GetCashStoreItems(eCLASS _eClass, eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory)
	{
		return m_Tbl_CachStore.GetCashStoreItemInfo(_eClass, _mainCategory, _subCategory);
	}