Example #1
0
void CN3UIList::UpdateChildRegions()
{
	RECT rc = this->GetRegion();
	RECT rcThis = rc;
	POINT pt;
	SIZE size;
	int iScrollPos = 0;
	if(m_pScrollBarRef)
	{
		m_pScrollBarRef->GetCurrentPos();
		RECT rcTmp = m_pScrollBarRef->GetRegion();
		rc.right = rcTmp.left;
	}

	it_pString it = m_ListString.begin(), itEnd = m_ListString.end();
	for(int i = 0; it != itEnd; it++, i++)
	{
		CN3UIString* pStr = *it;
		if(i < iScrollPos)
		{
			pStr->SetVisibleWithNoSound(false);
			continue;
		}

		pt = pStr->GetPos();
		pStr->GetTextExtent(pStr->GetString(), pStr->GetString().size(), &size);
		pStr->SetPos(rc.left, rc.top);
		RECT rcTmp = { rc.left, rc.top, rc.left + (rc.right - rc.left), rc.top + size.cy };
		pStr->SetRegion(rcTmp);
		rc.top += size.cy;

		if(rc.top >= rcThis.bottom) pStr->SetVisibleWithNoSound(false);
		else pStr->SetVisibleWithNoSound(true);
	}

	if(m_pScrollBarRef)
	{
		if(rc.bottom <= rcThis.bottom)
		{
			m_pScrollBarRef->SetCurrentPos(0);
			m_pScrollBarRef->SetVisibleWithNoSound(false);
		}
		else
		{
			m_pScrollBarRef->SetVisibleWithNoSound(true);
		}
		
		m_pScrollBarRef->SetRange(0, m_ListString.size());
	}
}
Example #2
0
bool CN3UIList::GetString(int iIndex, std::string& szString)
{
	szString = "";

	if(iIndex < 0 || iIndex >= m_ListString.size()) return false;

	it_pString it = m_ListString.begin();
	for(int i = 0; i < iIndex; it++, i++);
	
	CN3UIString* pUIString = (*it);
	szString = pUIString->GetString();

	return true;
}
Example #3
0
void CSubProcPerTrade::ReceiveMsgPerTradeOtherAdd(int iItemID, int iCount, int iDurability)
{
	char szGold[32];
	std::string str;
	int iGold, iDestiOrder;			// 거래창의 값..

	if ( iItemID == dwGold )
	{
		// 거래 창의 다른 사람의 현재 돈을 얻어 온다..
		CN3UIString* pStrOther = (CN3UIString* )m_pUIPerTradeDlg->GetChildByID("string_money_other");	 __ASSERT(pStrOther, "NULL UI Component!!");
		str = pStrOther->GetString();
		iGold = atoi(str.c_str());
		
		// 돈을 더한 다음..
		iGold += iCount;

		// 돈 표시.. 개인 거래 창..
		sprintf(szGold, "%d", iGold);
		pStrOther->SetString(szGold);
	}
	else
	{
		// 아이템이 들어갈 수 있는지 확인, 아이템이 들어 가는 자리 계산..
		bool  bFound = false;

		// 아이템 만들어서 넣기..
		__TABLE_ITEM_BASIC*	pItem = NULL;
		__TABLE_ITEM_EXT*	pItemExt = NULL;
		pItem = s_pTbl_Items_Basic->Find(iItemID/1000*1000);	// 열 데이터 얻기..
		if(pItem && pItem->byExtIndex >= 0 && pItem->byExtIndex < MAX_ITEM_EXTENSION)
			pItemExt = CGameBase::s_pTbl_Items_Exts[pItem->byExtIndex]->Find(iItemID%1000);
		if(NULL == pItem || NULL == pItemExt)
		{
			__ASSERT(0, "아이템 포인터 테이블에 없음!!");
			return;
		}

		if( (pItem->byContable == UIITEM_TYPE_COUNTABLE) || (pItem->byContable == UIITEM_TYPE_COUNTABLE_SMALL) )
		{
			for( int i = 0; i < MAX_ITEM_PER_TRADE; i++ )
			{
				if( (m_pUIPerTradeDlg->m_pPerTradeOther[i]) && (m_pUIPerTradeDlg->m_pPerTradeOther[i]->pItemBasic->dwID == pItem->dwID) )
				{
					bFound = true;
					iDestiOrder = i;
					break;
				}
			}

			// 못찾았으면.. 
			if ( !bFound )
			{
				// 인벤토리 빈슬롯을 찾아 들어간다..
				for(int i = 0; i < MAX_ITEM_PER_TRADE; i++ )
				{
					if ( !m_pUIPerTradeDlg->m_pPerTradeOther[i] )
					{
						bFound = true;
						iDestiOrder = i;
						break;
					}
				}

				if ( !bFound )	// 빈 슬롯을 찾지 못했으면..
					return;
			}

			if ( m_pUIPerTradeDlg->m_pPerTradeOther[iDestiOrder] )	// 해당 위치에 아이콘이 있으면..
			{
				m_pUIPerTradeDlg->m_pPerTradeOther[iDestiOrder]->iCount += iCount;
			}
			else
			{
				std::string szIconFN;
				e_PartPosition ePart;
				e_PlugPosition ePlug;
				CGameProcedure::MakeResrcFileNameForUPC(pItem, NULL, &szIconFN, ePart, ePlug); // 아이템에 따른 파일 이름을 만들어서

				__IconItemSkill* spItem;

				spItem				= new __IconItemSkill;
				spItem->pItemBasic	= pItem;
				spItem->pItemExt	= pItemExt;
				spItem->szIconFN	= szIconFN; // 아이콘 파일 이름 복사..
				spItem->iCount		= iCount;
				spItem->iDurability = iDurability;
				float fUVAspect		= (float)45.0f/(float)64.0f;
				spItem->pUIIcon		= new CN3UIIcon;
				spItem->pUIIcon->Init(m_pUIPerTradeDlg); 
				spItem->pUIIcon->SetTex(szIconFN);
				spItem->pUIIcon->SetUVRect(0,0,fUVAspect,fUVAspect);
				spItem->pUIIcon->SetUIType(UI_TYPE_ICON);
				spItem->pUIIcon->SetStyle(UISTYLE_ICON_ITEM|UISTYLE_ICON_CERTIFICATION_NEED);
				spItem->pUIIcon->SetVisible(true);

				CN3UIArea* pArea = NULL;
				//pArea = m_pUIPerTradeDlg->GetChildAreaByiOrder(UI_AREA_TYPE_PER_TRADE_OTHER, i);
				if ( pArea )
				{
					spItem->pUIIcon->SetRegion(pArea->GetRegion());
					// 움직일 수 없다..
					RECT rect = { 0, 0, 0, 0 };
					spItem->pUIIcon->SetMoveRect(rect);
				}

				//m_pUIPerTradeDlg->m_pPerTradeOther[i] = spItem;
			}
		}
		else
		{
			for( int i = 0; i < MAX_ITEM_PER_TRADE; i++ )
			{
				if (m_pUIPerTradeDlg->m_pPerTradeOther[i] == NULL)	
				{
					bFound = true;
					break;
				}
			}

			if ( !bFound )	return;	// 못 찾았으므로.. 실패..

			std::string szIconFN;
			e_PartPosition ePart;
			e_PlugPosition ePlug;
			CGameProcedure::MakeResrcFileNameForUPC(pItem, NULL, &szIconFN, ePart, ePlug); // 아이템에 따른 파일 이름을 만들어서

			__IconItemSkill* spItem;

			spItem				= new __IconItemSkill;
			spItem->pItemBasic	= pItem;
			spItem->pItemExt	= pItemExt;
			spItem->szIconFN	= szIconFN; // 아이콘 파일 이름 복사..
			spItem->iCount		= 1;
			spItem->iDurability = iDurability;
			float fUVAspect		= (float)45.0f/(float)64.0f;
			spItem->pUIIcon		= new CN3UIIcon;
			spItem->pUIIcon->Init(m_pUIPerTradeDlg); 
			spItem->pUIIcon->SetTex(szIconFN);
			spItem->pUIIcon->SetUVRect(0,0,fUVAspect,fUVAspect);
			spItem->pUIIcon->SetUIType(UI_TYPE_ICON);
			spItem->pUIIcon->SetStyle(UISTYLE_ICON_ITEM|UISTYLE_ICON_CERTIFICATION_NEED);
			spItem->pUIIcon->SetVisible(true);

			CN3UIArea* pArea = NULL;
			//pArea = m_pUIPerTradeDlg->GetChildAreaByiOrder(UI_AREA_TYPE_PER_TRADE_OTHER, i);
			if ( pArea )
			{
				spItem->pUIIcon->SetRegion(pArea->GetRegion());
				// 움직일 수 없다..
				RECT rect = { 0, 0, 0, 0 };
				spItem->pUIIcon->SetMoveRect(rect);
			}

			if ( spItem->iDurability == 0 )
				spItem->pUIIcon->SetStyle(spItem->pUIIcon->GetStyle() | UISTYLE_DURABILITY_EXHAUST);	

			//m_pUIPerTradeDlg->m_pPerTradeOther[i] = spItem;
		}
	}
}
Example #4
0
void CSubProcPerTrade::ReceiveMsgPerTradeAdd(BYTE bResult)
{
	// 상태를 변화시키고.. 창을 닫고..
	CN3UIWndBase::m_sRecoveryJobInfo.m_bWaitFromServer = false;

	char szGold[32];
	std::string str;
	int iGold,			// 거래창의 값..
		iMyMoney;		// 인벤토리의 값..
	
	switch ( bResult )
	{
		case 0x01:
			break;

		case 0x00:			// 실패 했을 경우.. 복구한다..	
			// 전에 작업한 아이템 종류가 돈인 경우..
			switch ( m_ePerTradeItemKindBackup )
			{
				case PER_TRADE_ITEM_MONEY:
					{
						// 거래 창의 내 현재 돈을 얻어 온다..
						CN3UIString* pStrMy = (CN3UIString* )m_pUIPerTradeDlg->GetChildByID("string_money_my");	 __ASSERT(pStrMy, "NULL UI Component!!");
						str = pStrMy->GetString();
						iGold = atoi(str.c_str());

						// 현재 내가 가진 돈을 얻어 온다..
						iMyMoney = s_pPlayer->m_InfoExt.iGold;
						// 돈을 증가 시킨다..
						iMyMoney += m_iGoldOffsetBackup;
						s_pPlayer->m_InfoExt.iGold = iMyMoney;

						// 돈 표시.. 인벤토리..
						sprintf(szGold, "%d", iMyMoney);
						CN3UIString* pString = NULL;
						pString = (CN3UIString* )CGameProcedure::s_pProcMain->m_pUIInventory->GetChildByID("text_gold"); __ASSERT(pString, "NULL UI Component!!");
						if(pString)	pString->SetString(szGold);	
						if(m_pUIPerTradeDlg->m_pStrMyGold) m_pUIPerTradeDlg->m_pStrMyGold->SetString(szGold);

						// 돈 표시.. 개인 거래 창..
						iGold -= m_iGoldOffsetBackup;
						sprintf(szGold, "%d", iGold);
						pStrMy->SetString(szGold);
					}
					break;

				case PER_TRADE_ITEM_OTHER:
					{
						// 전에 작업한 아이템 종류가 아이템인 경우..
						if( (m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder]->
							pItemBasic->byContable == UIITEM_TYPE_COUNTABLE) ||
							(m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder]->
							pItemBasic->byContable == UIITEM_TYPE_COUNTABLE_SMALL) )
						{
							// 활이나 물약등 아이템인 경우..
							bool bFound = false;

							// 인벤토리에 아이템이 없어진 경우.. 만든다..
							if ( !m_pUIPerTradeDlg->m_pPerTradeInv[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder] )
							{
								bFound = true;
								// 인벤토리에 만들고 아이템의 갯수를 정해준다..
								__IconItemSkill *spItem, *spItemNew = NULL;
								spItem = m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder];

								// 아이콘이 없으면 아이콘을 만드록 갯수는 0으로..
								spItemNew				= new __IconItemSkill;
								spItemNew->pItemBasic	= spItem->pItemBasic;
								spItemNew->pItemExt		= spItem->pItemExt;
								spItemNew->szIconFN		= spItem->szIconFN; // 아이콘 파일 이름 복사..
								spItemNew->iCount		= m_pUIPerTradeDlg->m_iBackupiCount;
								spItemNew->iDurability	= spItem->iDurability;

								// 아이콘 리소스 만들기..
								spItemNew->pUIIcon		= new CN3UIIcon;
								float fUVAspect			= (float)45.0f/(float)64.0f;
								spItemNew->pUIIcon->Init(m_pUIPerTradeDlg); 
								spItemNew->pUIIcon->SetTex(spItemNew->szIconFN);
								spItemNew->pUIIcon->SetUVRect(0,0, fUVAspect, fUVAspect);
								spItemNew->pUIIcon->SetUIType(UI_TYPE_ICON);
								spItemNew->pUIIcon->SetStyle(UISTYLE_ICON_ITEM|UISTYLE_ICON_CERTIFICATION_NEED);
								spItemNew->pUIIcon->SetVisible(true);
								CN3UIArea* pArea;
								pArea = m_pUIPerTradeDlg->GetChildAreaByiOrder(UI_AREA_TYPE_PER_TRADE_INV, CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder);
								if ( pArea )
								{
									spItemNew->pUIIcon->SetRegion(pArea->GetRegion());
									spItemNew->pUIIcon->SetMoveRect(pArea->GetRegion());
								}

								m_pUIPerTradeDlg->m_pPerTradeInv[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder] = spItemNew;

								// 내 거래창의 아이템이 있는 경우 .. 갯수 갱신..
								if ( m_pUIPerTradeDlg->m_iBackupiCount != 
									m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder]->iCount )
								{
									m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder]->iCount
										-= m_pUIPerTradeDlg->m_iBackupiCount;
								}
							}

							// 아이콘이 내 거래창의 슬롯에 생긴경우.. 삭제한다..
							if ( m_pUIPerTradeDlg->m_iBackupiCount == 
								m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder]->iCount )
							{
								bFound = true;

								__IconItemSkill* spItem;
								spItem = m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder];

								// 매니저에서 제거..
								m_pUIPerTradeDlg->RemoveChild(spItem->pUIIcon);

								// 리소스 제거..
								spItem->pUIIcon->Release();
								delete spItem->pUIIcon;
								spItem->pUIIcon = NULL;
								delete spItem;
								spItem = NULL;
								m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder] = NULL;

								// 인벤토리에 아이템이 있는 경우.. 갯수 갱신..
								if ( m_pUIPerTradeDlg->m_pPerTradeInv[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder] )
								{
									m_pUIPerTradeDlg->m_pPerTradeInv[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder]->iCount
										+= m_pUIPerTradeDlg->m_iBackupiCount;
								}
							}

							// 위에서 갯수 보정한게 아니면.. 갯수만 보정한다..
							if ( !bFound)
							{
								// 내 거래창과 인벤토리의 아이템의 갯수를 정해준다..
								m_pUIPerTradeDlg->m_pPerTradeInv[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder]->iCount
									+= m_pUIPerTradeDlg->m_iBackupiCount;

								m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder]->iCount
									-= m_pUIPerTradeDlg->m_iBackupiCount;
							}
						}
						else
						{
							__IconItemSkill* spItem;
							spItem = CN3UIWndBase::m_sRecoveryJobInfo.pItemSource;
							spItem->pUIIcon->SetParent(m_pUIPerTradeDlg);

							// 인벤토리 윈도우에 세팅하고..
							m_pUIPerTradeDlg->m_pPerTradeInv[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder] = spItem;

							// 내 거래 윈도우에서 클리어..
							m_pUIPerTradeDlg->m_pPerTradeMy[CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceEnd.iOrder] = NULL;

							CN3UIArea* pArea;
							pArea = m_pUIPerTradeDlg->GetChildAreaByiOrder(UI_AREA_TYPE_PER_TRADE_INV, CN3UIWndBase::m_sRecoveryJobInfo.UIWndSourceStart.iOrder);
							if ( pArea )
							{
								spItem->pUIIcon->SetRegion(pArea->GetRegion());
								spItem->pUIIcon->SetMoveRect(pArea->GetRegion());
							}
						}
					}
					break;
			}
			break;
	}
}
Example #5
0
void CSubProcPerTrade::ItemCountEditOK()
{
	char szGold[32];
	std::string str;
	int iGold,			// 거래창의 값..
		iGoldOffset,	// 편집창의 값..
		iMyMoney;		// 인벤토리의 값..

	// 거래 창의 내 현재 돈을 얻어 온다..
	CN3UIString* pStrMy = (CN3UIString* )m_pUIPerTradeDlg->GetChildByID("string_money_my");	 __ASSERT(pStrMy, "NULL UI Component!!");
	str = pStrMy->GetString();
	iGold = atoi(str.c_str());

	//  입력 창의 값을 얻어서 
	iGoldOffset = m_pUITradeEditDlg->GetQuantity();

	// Gold Offset Backup..
	m_iGoldOffsetBackup = iGoldOffset;

	// 현재 내가 가진 돈을 얻어 온다..
	iMyMoney = s_pPlayer->m_InfoExt.iGold;

	if ( iGoldOffset <= 0 ) return;
	if ( iGoldOffset > iMyMoney ) return;

	// 돈을 감소 시킨다..
	iMyMoney -= iGoldOffset;
	s_pPlayer->m_InfoExt.iGold = iMyMoney;

	// 돈 표시.. 인벤토리..
	sprintf(szGold, "%d", iMyMoney);
	CN3UIString* pString = NULL;
	pString = (CN3UIString* )CGameProcedure::s_pProcMain->m_pUIInventory->GetChildByID("text_gold"); __ASSERT(pString, "NULL UI Component!!");
	if(pString)	pString->SetString(szGold);	
	if(m_pUIPerTradeDlg->m_pStrMyGold) m_pUIPerTradeDlg->m_pStrMyGold->SetString(szGold);

	// 돈 표시.. 개인 거래 창..
	iGold += iGoldOffset;
	sprintf(szGold, "%d", iGold);
	pStrMy->SetString(szGold);

	// 서버에게 전송한다..
	BYTE byBuff[16];											// 패킷 버퍼..
	int iOffset=0;											// 패킷 오프셋..

	// 서버에게 패킷 만들어서 날림..
	CAPISocket::MP_AddByte(byBuff, iOffset, N3_PER_TRADE);			
	CAPISocket::MP_AddByte(byBuff, iOffset, N3_SP_PER_TRADE_ADD);		
	CAPISocket::MP_AddByte(byBuff, iOffset, 0xff);		
	CAPISocket::MP_AddDword(byBuff, iOffset, dwGold);		
	CAPISocket::MP_AddDword(byBuff, iOffset, iGoldOffset);		

	CGameProcedure::s_pSocket->Send(byBuff, iOffset);			// 보냄..

	m_pUITradeEditDlg->SetQuantity(0);

	// 상태를 변화시키고.. 창을 닫고..
	CN3UIWndBase::m_sRecoveryJobInfo.m_bWaitFromServer = true;
	m_ePerTradeState = PER_TRADE_STATE_NORMAL;
	m_ePerTradeItemKindBackup = PER_TRADE_ITEM_MONEY;
	m_pUITradeEditDlg->Close();

	m_pUIPerTradeDlg->PlayGoldSound();
}
Example #6
0
void CSubProcPerTrade::PerTradeCompleteCancel()							// 개인 거래 취소..	
{
	std::string str;
	int iGold,			// 거래창의 값..
		iMyMoney;		// 인벤토리의 값..

	if ( (int)m_ePerTradeState >= (int)PER_TRADE_STATE_NORMAL )
	{
		// 먼저 돈을 검사 한다..
		// 거래 창의 내 현재 돈을 얻어 온다..
		CN3UIString* pStrMy = (CN3UIString* )m_pUIPerTradeDlg->GetChildByID("string_money_my");		__ASSERT(pStrMy, "NULL UI Component!!");
		str = pStrMy->GetString();
		iGold = atoi(str.c_str());

		// 현재 내가 가진 돈을 얻어 온다..
		iMyMoney = s_pPlayer->m_InfoExt.iGold;
		// 돈을 복구 한다..
		iMyMoney += iGold;
		s_pPlayer->m_InfoExt.iGold = iMyMoney;

		// 그다음 아이템을 검사한다..
		// 아이템들을 원래 대로..
		for ( int i = 0; i < MAX_ITEM_PER_TRADE; i++ )
		{
			if (m_pUIPerTradeDlg->m_pPerTradeMy[i] != NULL)	
			{
				if( (m_pUIPerTradeDlg->m_pPerTradeMy[i]->pItemBasic->byContable == UIITEM_TYPE_COUNTABLE) ||  
					(m_pUIPerTradeDlg->m_pPerTradeMy[i]->pItemBasic->byContable == UIITEM_TYPE_COUNTABLE_SMALL) )
				{
					// 활이나 물약등 아이템인 경우..
					__IconItemSkill* spItem;
					spItem = m_pUIPerTradeDlg->m_pPerTradeMy[i];
					
					// 기존에 아이콘이 있다면.. 
					if ( m_pUIPerTradeDlg->m_pPerTradeInv[m_pUIPerTradeDlg->m_iBackupiOrder[i]] )
					{
						// 숫자 업데이트 하고..
						m_pUIPerTradeDlg->m_pPerTradeInv[m_pUIPerTradeDlg->m_iBackupiOrder[i]]->iCount 
							+= m_pUIPerTradeDlg->m_pPerTradeMy[i]->iCount;

						// 매니저에서 제거..
						m_pUIPerTradeDlg->RemoveChild(spItem->pUIIcon);

						// 리소스 제거..
						spItem->pUIIcon->Release();
						delete spItem->pUIIcon;
						spItem->pUIIcon = NULL;
						delete spItem;
						spItem = NULL;
						m_pUIPerTradeDlg->m_pPerTradeMy[i] = NULL;
					}
					// 없다면 그대로 이동한다..
					else
					{
						__IconItemSkill* spItem;
						spItem = m_pUIPerTradeDlg->m_pPerTradeMy[i];

						spItem->pUIIcon->SetParent(m_pUIPerTradeDlg);

						// 인벤토리 윈도우에 세팅하고..
						m_pUIPerTradeDlg->m_pPerTradeInv[m_pUIPerTradeDlg->m_iBackupiOrder[i]] = spItem;

						// 내 거래 윈도우에서 클리어..
						m_pUIPerTradeDlg->m_pPerTradeMy[i] = NULL;

						CN3UIArea* pArea;

						pArea = m_pUIPerTradeDlg->GetChildAreaByiOrder(UI_AREA_TYPE_PER_TRADE_INV, m_pUIPerTradeDlg->m_iBackupiOrder[i]);
						if ( pArea )
						{
							spItem->pUIIcon->SetRegion(pArea->GetRegion());
							spItem->pUIIcon->SetMoveRect(pArea->GetRegion());
						}
					}
				}
				else
				{
					__IconItemSkill* spItem;
					spItem = m_pUIPerTradeDlg->m_pPerTradeMy[i];

					spItem->pUIIcon->SetParent(m_pUIPerTradeDlg);

					// 인벤토리 윈도우에 세팅하고..
					m_pUIPerTradeDlg->m_pPerTradeInv[m_pUIPerTradeDlg->m_iBackupiOrder[i]] = spItem;

					// 내 거래 윈도우에서 클리어..
					m_pUIPerTradeDlg->m_pPerTradeMy[i] = NULL;

					CN3UIArea* pArea;

					pArea = m_pUIPerTradeDlg->GetChildAreaByiOrder(UI_AREA_TYPE_PER_TRADE_INV, m_pUIPerTradeDlg->m_iBackupiOrder[i]);
					if ( pArea )
					{
						spItem->pUIIcon->SetRegion(pArea->GetRegion());
						spItem->pUIIcon->SetMoveRect(pArea->GetRegion());
					}
				}
			}

			if (m_pUIPerTradeDlg->m_pPerTradeOther[i] != NULL)	
			{
				__IconItemSkill* spItem;
				spItem = m_pUIPerTradeDlg->m_pPerTradeOther[i];

				// 매니저에서 제거..
				m_pUIPerTradeDlg->RemoveChild(spItem->pUIIcon);

				// 리소스 제거..
				spItem->pUIIcon->Release();
				delete spItem->pUIIcon;
				spItem->pUIIcon = NULL;
				delete spItem;
				spItem = NULL;
				m_pUIPerTradeDlg->m_pPerTradeOther[i] = NULL;
			}
		}

		m_pUIPerTradeDlg->LeavePerTradeState();
	}
}