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

📄 cguild.cpp

📁 韩国英雄王座倒闭后流出来部分源代码
💻 CPP
📖 第 1 页 / 共 2 页
字号:
	// 辨靛 沥焊甫 啊瘤绊 乐栏搁 辨靛 沥焊吝 辨靛 付农甫 诀单捞飘 茄促.
	if(m_bGetGuildInfor == true)
	{
		memcpy( cGuildMark ,lpGuildMark,sizeof(cGuildMark) ) ;
	}

	
	for(POSITION pos = m_lpListMember->GetHeadPosition(); pos != NULL;)
	{
		lpSocketFD = (_LPSOCKET_FD)m_lpListMember->GetNext(pos);

		if( !IsPlayerConnect( lpSocketFD )	)		  continue;
		
		memcpy(lpSocketFD->pPlayer->m_strGuildMark, lpGuildMark, 8) ;

		lpSocketFD->pPlayer->UpdatePlayerGuildInfo() ;
		g_pServer->PacketSend_ChangePlayerBase(lpSocketFD) ;
		g_pServer->PacketSend_PlayerUpdate(lpSocketFD) ;
	}
}

////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
void CGuild::FightzoneTeleport(short sLayer, _LPZW_FIGHTZONERESERVE pPacket, _POINT p ,short nTeam  )
{
	_LPSOCKET_FD lpSocketFD ;
	
	_LPCMATCH lpMatch =  g_lpFightzoneManager->Find_Match(pPacket->dwMatchSEQ ) ;

	if (lpMatch == NULL) return ;
	
	for(POSITION pos = m_lpListMember->GetHeadPosition(); pos != NULL;)
	{
		lpSocketFD = (_LPSOCKET_FD)m_lpListMember->GetNext(pos);

		/*
		if( !lpSocketFD								) continue;
		if( lpSocketFD->dwMagicNum	!=	MAGIC_NUM	) continue;
		if( lpSocketFD->bClose						) continue;
		if( lpSocketFD->socket == INVALID_SOCKET	) continue;
		*/
		if( !IsSocketValidity( lpSocketFD )	) continue;

		// 府歹窍绊 鞍篮 厘家俊 乐绰 辨靛盔捞搁 
		if( lpSocketFD->pPlayer->m_nMapLayer  !=  sLayer  ) continue ;


		// 荤捧吝捞 酒聪搁
		if (lpSocketFD->pPlayer->m_dwMatchSEQ == 0  )
		{
			lpSocketFD->pPlayer->m_bIsFightZone		= true ;
			lpSocketFD->pPlayer->m_dwMatchSEQ		= pPacket->dwMatchSEQ  ;
			lpSocketFD->pPlayer->m_nTeam			= nTeam ;
			lpSocketFD->pPlayer->m_nUsePotion		= pPacket->lpInfor.UsePotion ;
			lpSocketFD->pPlayer->m_nMatchTeamType	= pPacket->lpInfor.Team ;

			lpMatch->JoinTeam(lpSocketFD,nTeam ) ;
			

			ErrorMsg("(FZ) PlayerTeleport (%s) Match(%d) Killed(%d) Member(%d) TeamCount(%d) Team(%d)",
			lpSocketFD->pPlayer->m_strPlayerID, lpSocketFD->pPlayer->m_dwMatchSEQ, lpMatch->m_lpFightZone->KilledCount[lpSocketFD->pPlayer->m_nTeam] , lpMatch->m_lpFightZone->MemberCount[lpSocketFD->pPlayer->m_nTeam] 
			,  lpMatch->m_lpFightZone->sTeamCount ,lpSocketFD->pPlayer->m_nTeam);

			g_pServer->Teleport(lpSocketFD, p ) ;
		}
	}
}


////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
void CGuild::FightzoneMapMove(short sLayer, int nMapSeq, _POINT p,DWORD dwMatchSeq ,short nTeam )
{
	_LPSOCKET_FD lpSocketFD ;
	
	for(POSITION pos = m_lpListMember->GetHeadPosition(); pos != NULL;)
	{
		lpSocketFD = (_LPSOCKET_FD)m_lpListMember->GetNext(pos);

		/*
		if( !lpSocketFD								) continue;
		if( lpSocketFD->dwMagicNum	!=	MAGIC_NUM	) continue;
		if( lpSocketFD->bClose						) continue;
		if( lpSocketFD->socket == INVALID_SOCKET	) continue;
		*/

		// 府歹窍绊 鞍篮 厘家俊 乐绰 辨靛盔捞搁 
		if( lpSocketFD->pPlayer->m_nMapLayer  !=  sLayer  ) continue ;

		// 荤捧吝捞 酒聪搁
		if (lpSocketFD->pPlayer->m_dwMatchSEQ == 0  )
		{
			lpSocketFD->pPlayer->m_dwMatchSEQ = dwMatchSeq ;
			lpSocketFD->pPlayer->m_nTeam = nTeam ;

			g_pServer->MapMove(	lpSocketFD,nMapSeq,p) ;
		}
	}
}

////////////////////////////////////////////////////////////////////////////////////////
//	
////////////////////////////////////////////////////////////////////////////////////////
bool CGuild::bIsMaster( DWORD	pPlayerHandle  )
{	
	_LPSOCKET_FD lpSocketFD ;
	
	for(POSITION pos = m_lpListMember->GetHeadPosition(); pos != NULL;)
	{
		lpSocketFD = (_LPSOCKET_FD)m_lpListMember->GetNext(pos);

		/*
		if( !lpSocketFD								) continue;
		if( lpSocketFD->dwMagicNum	!=	MAGIC_NUM	) continue;
		if( lpSocketFD->bClose						) continue;
		if( lpSocketFD->socket == INVALID_SOCKET	) continue;		
		*/
		if( !IsSocketValidity( lpSocketFD )	) continue;

		if ( lpSocketFD->pPlayer->m_dwHandle == pPlayerHandle )
		{
			if( lpSocketFD->pPlayer->m_nGuildLevel  ==  DEF_GUILDMASTER  )
				return true;
		}
	}
	
	return false; 
}




////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
void CGuild::Send_ChangeGuildInfor()
{
	_LPSOCKET_FD lpSocketFD ;

	for(POSITION pos = m_lpListMember->GetHeadPosition(); pos != NULL;)
	{
		lpSocketFD = (_LPSOCKET_FD)m_lpListMember->GetNext(pos);

		if( !IsPlayerConnect( lpSocketFD )	)		  continue;
		
		lpSocketFD->pPlayer->PacketSend_GuildInfor(NULL , this)  ;
	}
}

#ifdef DEF_GUILDWAR

////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
void CGuild::Send_GuildWarList()
{
	_LPZEMIPACKET lpSendPacket	=	g_pServerMem->ZemiPacket_Pop();
		lpSendPacket->dwCommand		= ZP_GUILDWARLIST ;
		_LPZP_GUILDWARLIST p		= (_LPZP_GUILDWARLIST) lpSendPacket->strPacket ;

		memcpy(lpSendPacket->strPacket, &GuildWarList, sizeof( _ZP_GUILDWARLIST ) );

		lpSendPacket->dwSize = sizeof( _ZP_GUILDWARLIST );	

		Send_GuildPacket( lpSendPacket ); 
	g_pServerMem->ZemiPacket_Push(lpSendPacket) ;

}

////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
BOOL CGuild::bIsEnemyGuild(char *strGuildName )
{
	for(int i = 0 ; i <  DEF_MAXGUILDWARLIST; ++i)
	{
		// 鞍篮 辨靛啊 乐栏搁 
		if(GuildWarList.nStatus[i] == GWOP_WAR && (0 == strcmp(GuildWarList.strGuildName[i] , strGuildName)) )
			return TRUE ;
		
	}

	return FALSE ;
}

////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
BOOL CGuild::bIsEnemyGuild(DWORD dwGuildHandle)
{
	for(int i = 0 ; i <  DEF_MAXGUILDWARLIST; ++i)
	{
		// 鞍篮 辨靛啊 乐栏搁 
		if(GuildWarList.nStatus[i] == GWOP_WAR && ( GuildWarList.dwGuildHandle[i] == dwGuildHandle ) )
			return TRUE ;
	}

	return FALSE ;
}


BOOL CGuild::bIsFullGuildwarlist()
{
	for(int i = 0 ; i < DEF_MAXGUILDWARLIST; ++i)
	{
		// 厚绢 乐绰 傍埃捞 乐栏搁
		if(GuildWarList.dwGuildHandle[i] == 0  ) 
			return FALSE ;
	}
	
	return TRUE ;
}
#endif




////////////////////////////////////////////////////////////////////////////////////////
//	World Server俊 辨靛 沥焊甫 夸没窃
//	
////////////////////////////////////////////////////////////////////////////////////////
void CGuild::RequestGuildInfor(char * lpGuildName)
{
	_LPDBPACKET	pWorldPacket = g_pServerMem->WorldPacket_Pop();			

	pWorldPacket->dwCommand	=	ZW_GUILDINFORSERVER_ASK ;
		
	_LPZP_GUILDOP p =(_LPZP_GUILDOP) pWorldPacket->strPacket  ;

	memcpy(p->strGuildName,lpGuildName,20) ;

	pWorldPacket->dwSize	= sizeof(_ZP_GUILDOP) ;

	g_lpDBSock->bSend(pWorldPacket) ;
}


////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
bool CGuild::bIsGuildFull()
{
	return false;
}

////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
bool CGuild::bIsAllClass()
{
	return false;
}


////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
bool CGuild::bIsAllInMap()
{
	return false;	
}

⌨️ 快捷键说明

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