Esempio n. 1
0
	public void PurchaseComplete( body_SC_PRIVATESHOP_ITEMBUY _buy)
	{
		m_SavedSlot.BuyProc( _buy);
		
		if( m_SavedSlot.SearchInfo.sItem.nOverlapped < 1)
		{
			SetCoolTime();
			
			StartCoroutine( "Cool_CR");
			
			if( m_PageIdx == 0) m_PageIdx = 1;
			
			body_CS_PRIVATESHOP_SEARCH search = new body_CS_PRIVATESHOP_SEARCH(
				m_PageIdx, m_ItemTableIdx, m_Class,
				m_Category1, m_Category2, m_LevelMin, m_LevelMax,
				m_Grade, m_MapIdx, m_SearchType);
			
			AsCommonSender.Send(search.ClassToPacketBytes());
		}
	}
Esempio n. 2
0
	IEnumerator FindItem_CR()
	{
		List<Item> listItem = new List<Item>();
		MultiDictionary<string, Item> mdic = ItemMgr.ItemManagement.mdicItemByName;
		string name = txtName_contents.Text;
		
		if( name != "")
		{
			int count = 0;
			foreach(string key in mdic.Keys)
			{
	//			if( key.Contains( name) == true)
	//			{
	//				Debug.Log(key);
	//				listItem.AddRange( mdic[key]);
	//			}
				
				if( key == name)
				{
					foreach( Item node in mdic[key])
					{
						Debug.Log(key + " : " + node.ItemID);
					}
					
					listItem.AddRange( mdic[key]);
				}
				
				count++;
				
				if( count > 512)
				{
					count = 0;
					yield return null;
				}
			}
			
			if( listItem == null || listItem.Count == 0)
			{
				CoolCompletion();
				
				AsNotify.Instance.MessageBox(AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(2183));
				
				Debug.Log("UIPStoreSearchDlg:: SendSearch: [ txtName_contents.Text = " + txtName_contents.Text + " ] is not found");
				yield break;
			}
			
			if( listItem.Count > 1)
			{
				Debug.LogWarning("UIPStoreSearchDlg:: SendSearch: same named item : " + name + ". searching will not be processed normally");
				
				listItem.Sort( delegate( Item _a, Item _b){
					if( _a.ItemID < _b.ItemID)
						return -1;
					else if( _a.ItemID == _b.ItemID)
						return 0;
					else
						return 1;
				});
			}
			
			m_ItemTableIdx = listItem[0].ItemID;
		}
		else
			m_ItemTableIdx = 0;
		
		StartCoroutine( "Cool_CR");
		
		if( m_PageIdx == 0) m_PageIdx = 1;
		
		body_CS_PRIVATESHOP_SEARCH search = new body_CS_PRIVATESHOP_SEARCH(
			m_PageIdx, m_ItemTableIdx, m_Class,
			m_Category1, m_Category2, m_LevelMin, m_LevelMax,
			m_Grade, m_MapIdx, m_SearchType);
		
		AsCommonSender.Send(search.ClassToPacketBytes());
	}