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

📄 azitmanager.cpp

📁 韩国英雄王座倒闭后流出来部分源代码
💻 CPP
📖 第 1 页 / 共 2 页
字号:
	if( !pAzit )	return;	

	pAzit->SetAzitInfo( pAzitInfo );
}

////////////////////////////////////////////////////////////////////////////////////////
//	秦寸 辨靛狼 涅胶飘 惯悼 沥焊甫 掘澜 
//
//	-	傍拜磊牢 版快 贸府	21016	=> 眠饶 CHART DB肺 包访 扁瓷 函版
//	-	规绢磊牢 版快 贸府	21017	=> 眠饶 CHART DB肺 包访 扁瓷 函版
//
////////////////////////////////////////////////////////////////////////////////////////
bool AzitManager::GetAzitWarQuest(int pGuildHandle, int &pRquestQuest,  _ZW_AZITSTATUSLIST_REP &pAzitInfo)
{

	for ( MAP_VOIDPTR::iterator it = m_MapAzit.Begin(); it != m_MapAzit.End(); it++)
	{
		Azit *pAzit = (Azit *)it->second;
		if( !pAzit ) continue;

		switch( pAzit->GetAzitStatus() )
		{
		case	AZITSTATUS_WARREADY	:
		case	AZITSTATUS_WAR		:
			{				
				//	酒瘤飘 家蜡 辨靛牢 版快
				if( pAzit->GetOwnerHandle()			== pGuildHandle )
				{	
					pRquestQuest= DEF_AZITDEFENSEQUEST;	
					memcpy( &pAzitInfo, pAzit->GetAzit(), sizeof(pAzitInfo) );

					return true;
				}

				//	酒瘤飘 档傈 辨靛牢 版快
				if( pAzit->GetWarProposeHandle()	== pGuildHandle )
				{
					pRquestQuest=	DEF_AZITATTACKQUEST;
					memcpy( &pAzitInfo, pAzit->GetAzit(), sizeof(pAzitInfo) );

					return true;
				}
			}
			break;
		
		default	:	
			{
				if( ( pAzit->GetOwnerHandle()		== pGuildHandle ) ||	//	酒瘤飘 家蜡 辨靛
					( pAzit->GetWarProposeHandle()	== pGuildHandle )	)	//	酒瘤飘 档傈 辨靛
				{

					pRquestQuest = 0;
					memcpy( &pAzitInfo, pAzit->GetAzit(), sizeof(pAzitInfo) );
					return true;
				}
			}
			break;
		}
	}

	pRquestQuest	=	0;
	
	return false;
}

////////////////////////////////////////////////////////////////////////////////////////
//	秦寸 辨靛啊 加茄 酒瘤飘 沥焊甫 馆券矫糯
//
////////////////////////////////////////////////////////////////////////////////////////
Azit * AzitManager::GetAzitByGuild(int pGuildHandle)
{

	for ( MAP_VOIDPTR::iterator it = m_MapAzit.Begin(); it != m_MapAzit.End(); it++)
	{
		Azit *pAzit = (Azit *)it->second;
		if( !pAzit ) continue;

		if( pAzit->GetOwnerHandle()			== pGuildHandle )	return pAzit;	//	酒瘤飘 家蜡 辨靛牢 版快
		if( pAzit->GetWarProposeHandle()	== pGuildHandle )	return pAzit;	//	酒瘤飘 档傈 辨靛牢 版快
	}

	return NULL;
}

////////////////////////////////////////////////////////////////////////////////////////
//	漂沥 酒瘤飘 沥焊甫 掘澜
//
////////////////////////////////////////////////////////////////////////////////////////
Azit * AzitManager::FindAzit(int pAzitSeq)
{
	Azit *pAzit = (Azit *)m_MapAzit.Find( pAzitSeq );

	return pAzit;
}


////////////////////////////////////////////////////////////////////////////////////////
//	秦寸 酒瘤飘狼 辨靛俊 措茄 阂劝 困摹甫 馆券矫糯
//
//
////////////////////////////////////////////////////////////////////////////////////////
bool AzitManager::GetReturnPoint(int pAzitSeq, int pGuildHandle, _POINT &pPoint)
{
	Azit *pAzit = (Azit *)m_MapAzit.Find( pAzitSeq );
	if( !pAzit )	return false;

	//
	//	规绢 辨靛 / 档傈 辨靛喊肺 馆券 蔼阑 掘澜 
	//
	return pAzit->GetReturnPoint( pGuildHandle, pPoint );
}




////////////////////////////////////////////////////////////////////////////////////////
//	秦寸 酒瘤飘 沥焊甫 馆券矫糯
//
////////////////////////////////////////////////////////////////////////////////////////
CString AzitManager::GetAzitInfo(int pAzitSeq)
{
	Azit *pAzit = (Azit *)m_MapAzit.Find( pAzitSeq );
	if( !pAzit )	return "";

	return pAzit->GetAzitInfo();
}

////////////////////////////////////////////////////////////////////////////////////////
//	酒瘤飘	惑怕 沥焊甫 馆券矫糯
//
////////////////////////////////////////////////////////////////////////////////////////
int AzitManager::GetAzitStatus(int pAzitSeq)
{
	Azit *pAzit = (Azit *)m_MapAzit.Find( pAzitSeq );
	
	if( NULL == pAzit )
		return 0;

	return pAzit->GetAzitStatus();
}


////////////////////////////////////////////////////////////////////////////////////////
//	秦寸 酒瘤飘狼 荐涝陛阑 掘澜
//
//	-	包访 Logic阑 窜鉴拳 矫糯
////////////////////////////////////////////////////////////////////////////////////////
bool AzitManager::GetAzitIncome( _LPSOCKET_FD	pSocketFD )
{
	if( !pSocketFD ) return false;
	if( !pSocketFD->pPlayer->Guild_GetHandle() ) return false;

	for ( MAP_VOIDPTR::iterator it = m_MapAzit.Begin(); it != m_MapAzit.End(); it++)
	{
		Azit *pAzit = (Azit *)it->second;
		if( !pAzit ) continue;

		//	酒瘤飘 家蜡 辨靛牢 版快
		if( pAzit->GetOwnerHandle() == pSocketFD->pPlayer->Guild_GetHandle() )
		{
			//
			//	World Server俊 酒瘤飘 荐涝陛 硅盒阑 夸没窃
			//
			g_lpDBSock->WorldSend_AzitIncome( pSocketFD, pAzit->GetAzitSeq() );
				
			// g_lpLog->OnFunc[DEF_LOG_AZIT_INCOME].proc( DEF_LOG_AZIT_INCOME,pSocketFD->pPlayer, NULL, NULL, pAzit->GetAzitIncome());

			return true;
		}
	}

	return false;
}

////////////////////////////////////////////////////////////////////////////////////////
//	秦寸 酒瘤飘狼 技陛阑 炼沥窃
//
//	-	秦寸 酒瘤飘 沥焊甫 茫澜
////////////////////////////////////////////////////////////////////////////////////////
bool AzitManager::ChangeAzitTax( _SOCKET_FD *pSocketFD, int pTaxRate )
{
	for ( MAP_VOIDPTR::iterator it = m_MapAzit.Begin(); it != m_MapAzit.End(); it++)
	{
		Azit *pAzit = (Azit *)it->second;
		if( !pAzit ) continue;

		if( pAzit->GetOwnerHandle()	== pSocketFD->pPlayer->Guild_GetHandle() )
		{
			//
			//	World Data傈价
			//			
			g_lpDBSock->WorldSend_AzitTaxChange	( pSocketFD, pAzit->GetAzitSeq(), pTaxRate );

			return true;
		}
	}
	
	return false;
}


////////////////////////////////////////////////////////////////////////////////////////
//	甘阑 包且窍绰 酒瘤飘 沥焊甫 掘澜
//	
//
////////////////////////////////////////////////////////////////////////////////////////
Azit * AzitManager::GetAzitTaxMap(int pMapID)
{
	//	
	//	AZIT-TAX-CHART俊辑 包访 沥焊甫 茫澜
	//	
	_AZITTAX_CHART_ *pAzitTaxChart = (_AZITTAX_CHART_ *)m_MapAzitTaxChart.Find( pMapID );

	if( pAzitTaxChart )
	{
		//
		//	秦寸 酒瘤飘 沥焊甫 馆券 矫糯
		//
		Azit *pAzit = (Azit *)m_MapAzit.Find( pAzitTaxChart->nAzitHandle );

		return pAzit;	
	}

	return NULL;
}


////////////////////////////////////////////////////////////////////////////////////////
//	秦寸 甘狼 利侩 技啦 沥焊甫 掘澜
//
////////////////////////////////////////////////////////////////////////////////////////
int AzitManager::GetAzitTaxRate(int pMapID)
{
	_AZITTAX_CHART_ *pAzitTaxChart = (_AZITTAX_CHART_ *)m_MapAzitTaxChart.Find( pMapID );
	
	if( !pAzitTaxChart	)	return 0;
		
	//
	//	秦寸 酒瘤飘 沥焊甫 馆券 矫糯
	//
	Azit *pAzit = (Azit *)m_MapAzit.Find( pAzitTaxChart->nAzitHandle );
	if( !pAzit			)	return 0;

	return pAzit->GetAzitTaxRate();
}

////////////////////////////////////////////////////////////////////////////////////////
//	酒瘤飘 傈狼 辆丰甫 犬牢窃
//
////////////////////////////////////////////////////////////////////////////////////////
void AzitManager::Batch_AzitWarTimeOut()
{
	for ( MAP_VOIDPTR::iterator it = m_MapAzit.Begin(); it != m_MapAzit.End(); it++)
	{
		Azit *pAzit = (Azit *)it->second;
		if( !pAzit ) continue;
		
		//
		//	酒瘤飘 傈里 吝
		//
		if( AZITSTATUS_WAR != pAzit->GetAzitStatus() ) continue;

		//
		//	酒瘤飘 傈里 矫埃 辆丰 咯何
		//
		if( 0 == pAzit->GetAzitWarTime() )
		{			
			_ZW_AZITSTATUSUPDATE_REP	AzitInfo;

			memcpy( &AzitInfo, &pAzit->m_AzitInfo, sizeof(_ZW_AZITSTATUSUPDATE_REP) );

			AzitInfo.nStatus	=	AZITSTATUS_WAREND;
			
			pAzit->SetAzitInfo( &AzitInfo );
		
		}
	}
}

#endif 

⌨️ 快捷键说明

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