⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auction.cpp

📁 完整龙族的无错反外挂登陆器,b编译后直接直接就可以放在客户端下运行
💻 CPP
📖 第 1 页 / 共 2 页
字号:
void CAuction::RecvCMD_MERCHANT_RESULT_TAKE_RESULT(t_packet &p)
{
	SendCMD_MERCHANT_RESULT_LIST_REQUEST();
	::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,525));
	Clear();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//芭贰 搬苞拱 茫扁 场
////////////////////////////////////////////////////////////////////////////////////////////////////////////
int CAuction::SetSellItem(const POS &pos,const ItemAttr Item)
{
	if(INV != pos.type) 
	{
		COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE , lan->OutputMessage(2,530));//牢亥配府 酒袍阑 持栏 绞碱..
		return 0;
	}
	if(!Item.item_no)
	{
		return 0;
	}
	m_SellItemPos = pos;
	m_SellItemAttr = Item;
	return 1;
}

int CAuction::SetBondItem(const POS &pos,const ItemAttr Item)
{
	if(INV != pos.type) 
	{
		COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE , lan->OutputMessage(2,530));//牢亥配府 酒袍阑 持栏 绞碱..
		return 0;
	}
	if(!Item.item_no)
	{
		return 0;
	}
	m_BondItemPos = pos;
	m_BondItemAttr = Item;
	return 1;
}

int	CAuction::IncBuyerViewPage() 
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MAX == GetBuyerViewPage())//3捞 登菌栏搁 啊柳 府胶飘绰 场捞促..
	{	//府胶飘 夸没 沁阑锭狼 蔼捞 吭绢具 窍绊

		const int iSendIndex = SR[MAX_SEARCH_RESULT_LIST-1].iIndex;
		if(iSendIndex)//府胶飘啊 菜 瞒乐促.. 弊贰具父 促澜 其捞瘤甫 夸没窍瘤
		{
			SendCMD_MERCHANT_BUY_LIST_REQUEST(iSendIndex,true);
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_BUY_LIST_REQUEST(0,true);	
		}
	}
	else
	{
		int xx =0;
		for(xx = 0; MAX_SEARCH_RESULT_LIST > xx ; xx++)
		{
			if(!SR[xx].iIndex){break;}//格废 吝俊 牢郸胶啊 0牢 磊府茫扁
		}

		if((xx)/MAX_VIEW_ABLE_PER_PAGE > GetBuyerViewPage())//促澜 其捞瘤俊 给啊档废 0何磐 技扁 锭巩俊 -1阑 秦霖巴捞促
		{
			m_iBuyerViewPage++;//促澜 其捞瘤肺
		}
	}
	return 0;
}

int	CAuction::DecBuyerViewPage() 
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MIN >=GetBuyerViewPage())//0其捞瘤 老锭 茄锅歹 Dec矫虐搁
	{
		if(SR[0].iIndex)//乐栏搁 焊郴绰单 牢郸胶啊 0捞搁救等促
		{
			SendCMD_MERCHANT_BUY_LIST_REQUEST(SR[0].iIndex,false);//格废 夸没阑 窍绰单
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_BUY_LIST_REQUEST(0,true);				
		}
	}
	else
	{
		m_iBuyerViewPage--;//捞傈 其捞瘤肺
	}
	return 0;
}

int	CAuction::IncResultViewPage() 
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MAX == GetResultViewPage())//3捞 登菌栏搁 啊柳 府胶飘绰 场捞促..
	{	//府胶飘 夸没 沁阑锭狼 蔼捞 吭绢具 窍绊

		const int iSendIndex = SR[MAX_SEARCH_RESULT_LIST-1].iIndex;
		if(iSendIndex)//府胶飘啊 菜 瞒乐促.. 弊贰具父 促澜 其捞瘤甫 夸没窍瘤
		{
			SendCMD_MERCHANT_RESULT_LIST_REQUEST(iSendIndex,true);
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_RESULT_LIST_REQUEST(0,true);	
		}
	}
	else
	{
		int xx =0;
		for(xx = 0; MAX_SEARCH_RESULT_LIST > xx ; xx++)
		{
			if(!SR[xx].iIndex){break;}//格废 吝俊 牢郸胶啊 0牢 磊府茫扁
		}

		if((xx)/MAX_VIEW_ABLE_PER_PAGE > GetResultViewPage())//促澜 其捞瘤俊 给啊档废 0何磐 技扁 锭巩俊 -1阑 秦霖巴捞促
		{
			m_iResultViewPage++;//促澜 其捞瘤肺
		}
	}
	return 0;
}

int	CAuction::DecResultViewPage() 
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MIN >=GetResultViewPage())//0其捞瘤 老锭 茄锅歹 Dec矫虐搁
	{
		if(SR[0].iIndex)//乐栏搁 焊郴绰单 牢郸胶啊 0捞搁救等促
		{
//<! BBD 040303 澜荐老锭狼 捞惑悼累 规瘤
			if(m_iResultViewPage <= 0)
			{
				m_iResultViewPage = 0;
				return 0;
			}
			else
			{
				SendCMD_MERCHANT_RESULT_LIST_REQUEST(SR[0].iIndex,false);//格废 夸没阑 窍绰单
			}
//> BBD 040303 澜荐老锭狼 捞惑悼累 规瘤
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_RESULT_LIST_REQUEST(0,true);				
		}
	}
	else
	{
		m_iResultViewPage--;//捞傈 其捞瘤肺
	}
	return 0;
}

int	CAuction::IncSellerViewPage()
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MAX == GetSellerViewPage())//3捞 登菌栏搁 啊柳 府胶飘绰 场捞促..
	{	//府胶飘 夸没 沁阑锭狼 蔼捞 吭绢具 窍绊

		const int iSendIndex = SR[MAX_SEARCH_RESULT_LIST-1].iIndex;
		if(iSendIndex)//府胶飘啊 菜 瞒乐促.. 弊贰具父 促澜 其捞瘤甫 夸没窍瘤
		{
			SendCMD_MERCHANT_SELL_LIST_REQUEST(iSendIndex,true);
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_SELL_LIST_REQUEST(0,true);	
		}
	}
	else
	{
		int xx =0;
		for(xx = 0; MAX_SEARCH_RESULT_LIST > xx ; xx++)
		{
			if(!SR[xx].iIndex){break;}//格废 吝俊 牢郸胶啊 0牢 磊府茫扁
		}

		if((xx)/MAX_VIEW_ABLE_PER_PAGE > GetSellerViewPage())//促澜 其捞瘤俊 给啊档废 0何磐 技扁 锭巩俊 -1阑 秦霖巴捞促
		{
			m_iSellerViewPage++;//促澜 其捞瘤肺
		}
	}
	return 0;
}

int	CAuction::DecSellerViewPage()
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MIN >=GetSellerViewPage())//0其捞瘤 老锭 茄锅歹 Dec矫虐搁
	{
		if(SR[0].iIndex)//乐栏搁 焊郴绰单 牢郸胶啊 0捞搁救等促
		{
			SendCMD_MERCHANT_SELL_LIST_REQUEST(SR[0].iIndex,false);//格废 夸没阑 窍绰单
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_SELL_LIST_REQUEST(0,true);
		}
	}
	else
	{
		m_iSellerViewPage--;//捞傈 其捞瘤肺
	}
	return 0;
}

int CAuction::SendCMD_MERCHANT_EXCHANGE_LIST_REQUEST(char* szSellerName,const int iIndex, const int iNeedIndexOver,const bool bIsDirectExchange)
{//府胶飘 夸没
	#ifdef KOREA_LOCALIZING_ 
	{	//< CSD-TW-030625
		LPCHARACTER pch = ::ExistHe(szSellerName);//郴 矫具俊 乐绰 荤恩捞具?
	//	if(!pch){return 0;}	//荤恩捞 郴 矫具俊 乐备唱.
		if(!strcmp(szSellerName,Hero->name))
		{
			COMMENT ::AddCurrentStatusMessage(255,255,255,"磊扁磊脚狼 格废阑 脚没 且 荐 绝嚼聪促.");
			return 0;
		}

		t_packet p;
		p.h.header.type = CMD_MERCHANT_DIRECT_EXCHANGE_LIST_REQUSET;
		p.h.header.size = sizeof(MERCHANTEXCHANGEREQUEST);

		p.u.MerchantExchangeRequest.iIndex	=	iIndex;
		p.u.MerchantExchangeRequest.iCn		=	Hero->id;
		::strcpy(p.u.MerchantExchangeRequest.szMyName,Hero->name);
		::strcpy(p.u.MerchantExchangeRequest.szSellerName,szSellerName);
		
		p.u.MerchantExchangeRequest.iKey	= iNeedIndexOver;
	//	p.u.MerchantExchangeRequest.iKey2	= bIsDirectExchange;
		::QueuePacket(&p,1);
	}	//> CSD-TW-030625
#endif
	return 0;
}

int CAuction::RecvCMD_MERCHANT_EXCHANGE_LIST_REQUEST_RESULT(t_packet &p)
{//府胶飘 罐澜
	Clear();
	::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,527));
	
	m_SearchList = p.u.SearchResultList;
	m_iBuyerViewPage  = ((p.u.SearchResultList.iKey)?AUCTION_PAGE_MIN:AUCTION_PAGE_MAX);
	m_iWaitPageRefresh = 0;
	::CallSmallMenu(MN_MERCHANT_DIRECT_EXCHAGE_LIST);
//	::CallSmallMenu(MN_MERCHANT_BUY);
	
	return 0;
}

void CAuction::SendCMD_EXCHANGE_BOND_MONEY()//021126 lsw
{
	if(!Auction.GetBondItemAttr())
	{
		return;
	}
	t_packet p;
	p.h.header.type =	CMD_EXCHANGE_BOND_MONEY;
	p.h.header.size =	sizeof(t_ExchangeBondMoney);
	p.u.Hwoa.rang.ExBondMoney.iCn			= Hero->id;
	p.u.Hwoa.rang.ExBondMoney.pos			= Auction.GetBondItemPos();
	p.u.Hwoa.rang.ExBondMoney.BondMoneyItem	= *Auction.GetBondItemAttr();
	p.u.Hwoa.rang.ExBondMoney.iKey = 0;
	ClearBondItem();
	::QueuePacket( &p, 1 );
}

void CAuction::IncPeriod(int nInc)
{
	m_nPeriod += nInc;
	if(m_nPeriod > 2)m_nPeriod = 2;
}

void CAuction::DecPeriod(int nDec)
{
	m_nPeriod -= nDec;
	if(m_nPeriod < 0)m_nPeriod = 0;
}
//////////////////////////////////////////////////////////////////////////////////////
// BBD 040303	赣玫飘 归诀 抛捞喉阑 捞侩窍绰 窃荐焙 矫累							//
//////////////////////////////////////////////////////////////////////////////////////
//芒捞 哆磊付磊 殿废登绢 乐绰 府胶飘甫 夸没茄促
void CAuction::SendCMD_MERCHANT_BACKUP_LIST_REQUEST(const int iIndex, const int iNeedIndexOver)
{
	Clear();	// 趣矫 葛福聪 府胶飘甫 朝妨滚府绊 夸没茄促
	::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,520));
	SELLERITEMREQUEST	data;

	data.iCn = Hero->id;
	strcpy(data.szName,Hero->name);
	data.iIndex = iIndex;
	data.iKey = iNeedIndexOver;
	m_iWaitPageRefresh = 1;

	SendDirectDB(CMD_MERCHANT_BACKUP_LIST_REQUEST, &data, sizeof(data));
}
// 夸没茄 府胶飘甫 罐绊 免仿茄促.
void CAuction::RecvCMD_MERCHANT_BACKUP_LIST_RESPONSE(t_packet &p)
{
	Clear();	// 趣矫 葛福聪 府胶飘甫 朝府绊 罐酒辑 免仿窍磊
	::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,521));

	memcpy(&m_SearchList, p.u.data, sizeof(m_SearchList));

	m_iResultViewPage = (m_SearchList.iKey)?AUCTION_PAGE_MIN:AUCTION_PAGE_MAX;
	m_iWaitPageRefresh = 0;
	::CallSmallMenu(MN_MERCHANT_BACKUP_MAIN);
}

int CAuction::IncPageBackupList()	// 其捞瘤 Down 滚瓢 努腐矫 龋免凳
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MAX == GetResultViewPage())//3捞 登菌栏搁 啊柳 府胶飘绰 场捞促..
	{	//府胶飘 夸没 沁阑锭狼 蔼捞 吭绢具 窍绊

		const int iSendIndex = SR[MAX_SEARCH_RESULT_LIST-1].iIndex;
		if(iSendIndex)//府胶飘啊 菜 瞒乐促.. 弊贰具父 促澜 其捞瘤甫 夸没窍瘤
		{
			SendCMD_MERCHANT_BACKUP_LIST_REQUEST(iSendIndex,true);
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_BACKUP_LIST_REQUEST(0,true);	
		}
	}
	else
	{
		int xx =0;
		for(xx = 0; MAX_SEARCH_RESULT_LIST > xx ; xx++)
		{
			if(!SR[xx].iIndex){break;}//格废 吝俊 牢郸胶啊 0牢 磊府茫扁
		}

		if((xx)/MAX_VIEW_ABLE_PER_PAGE > GetResultViewPage())//促澜 其捞瘤俊 给啊档废 0何磐 技扁 锭巩俊 -1阑 秦霖巴捞促
		{
			m_iResultViewPage++;//促澜 其捞瘤肺
		}
	}
	return 0;
}

int CAuction::DecPageBackupList()	// 其捞瘤 Up 滚瓢 努腐矫 龋免凳
{
	SEARCHRESULT *SR = GetSearchList().ResultList;
	if(!m_iWaitPageRefresh && AUCTION_PAGE_MIN >=GetResultViewPage())//0其捞瘤 老锭 茄锅歹 Dec矫虐搁
	{
		if(SR[0].iIndex)//乐栏搁 焊郴绰单 牢郸胶啊 0捞搁救等促
		{
			if(m_iResultViewPage <= 0)	// 其捞瘤啊 0捞搁
			{
				m_iResultViewPage = 0;
				return 0;	// 鞠巴档 窍瘤付扼
			}
			else
			{
				SendCMD_MERCHANT_BACKUP_LIST_REQUEST(SR[0].iIndex,false);//格废 夸没阑 窍绰单
			}
		}
		else
		{
			COMMENT ::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,510));
			COMMENT ::AddCurrentStatusMessage(255,255,255,"霉 格废 何磐 促矫 脚没钦聪促.");
			SendCMD_MERCHANT_BACKUP_LIST_REQUEST(0,true);				
		}
	}
	else
	{
		m_iResultViewPage--;//捞傈 其捞瘤肺
	}
	return 0;
}

// 急琶茄 酒捞袍阑 夸没茄促
void CAuction::SendCMD_MERCHANT_BACKUP_TAKE_REQUEST(SEARCHRESULT &SR)	
{
	if(!SR.iIndex)
	{
		::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,524));
		return;
	}
	::AddCurrentStatusMessage(FONT_COLOR_WHITE,lan->OutputMessage(4,523));

	Clear();	// 趣矫 葛福聪 府胶飘甫 朝妨滚府绊 夸没茄促

	t_MerchantResultTake	data;

	data.iIndex	=	SR.iIndex;
	data.iCn		=	Hero->id;
	strcpy(data.szMyName,Hero->name);
	strcpy(data.SellerName,SR.szSellerName);
	strcpy(data.BuyerName,SR.szBuyerName);
	
	data.dwSellValue	= SR.iSellValue;
	data.SellItem		= SR.m_ResultItem;
	data.iSellerTake	= 0;
	data.iBuyerTake	= 0;
	data.iKey			= 0;

	m_iWaitPageRefresh = 1;
	// 老窜 DB鳖沥 朝府绊 焊磊
	SendDirectDB(CMD_MERCHANT_BACKUP_TAKE_REQUEST, &data, sizeof(t_MerchantResultTake));
}
//////////////////////////////////////////////////////////////////////////////////////
// BBD 040303	赣玫飘 归诀 抛捞喉阑 捞侩窍绰 窃荐焙 场								//
//////////////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -