예제 #1
0
void JGGetCharacterInfo(LPSDHP_DBCHARINFOREQUEST lpMsg,int aIndex)
{
	SDHP_DBCHAR_INFORESULT pResult;

	PHeadSetW((LPBYTE)&pResult, 0x06, sizeof(pResult));

	char szAccountID[MAX_IDSTRING+1]={0};
	char szName[MAX_IDSTRING+1]={0};
	BuxConvert(lpMsg->Name, 10);

	memcpy(szAccountID, lpMsg->AccountID, MAX_IDSTRING);
	memcpy(szName, lpMsg->Name, MAX_IDSTRING);

	memcpy(pResult.AccountID, szAccountID, MAX_IDSTRING);
	memcpy(pResult.Name, szName, MAX_IDSTRING);

	pResult.Number = lpMsg->Number;

	pResult.result = GetCharacterInfo(szAccountID,szName,&pResult);

	if( pResult.result )
	{
		PartyMatchUpdateServerInfo(gSObj[aIndex].ServerCode, szName);
		
		UpdateGameIDC(szAccountID, szName);
	}

	DataSend(aIndex,(LPBYTE)&pResult,sizeof(pResult));

	if(pResult.result == TRUE)
	{
		SDHP_SKILLKEYDATA_SEND pSkillData = {0};

		pSkillData.h.c = PMHC_BYTE;
		pSkillData.h.size = sizeof( pSkillData );
		pSkillData.h.headcode = 0x60;

		memcpy(pSkillData.Name, szName, MAX_IDSTRING);
		pSkillData.aIndex = lpMsg->Number;

		GetOptionData(szName,&pSkillData);

		DataSend(aIndex,(LPBYTE)&pSkillData,pSkillData.h.size);

		MUBOT_SETTINGS_SEND pMuBot = {0};
		pMuBot.h.c = PMHC_WORD;
		pMuBot.h.sizeH = SET_NUMBERH(sizeof(pMuBot));
		pMuBot.h.sizeL = SET_NUMBERL(sizeof(pMuBot));
		pMuBot.h.headcode = 0x61;

		strcpy(pMuBot.szName,szName);
		pMuBot.aIndex = lpMsg->Number;
		GetMuBotData(szName,&pMuBot);
		DataSend(aIndex,(LPBYTE)&pMuBot,sizeof(pMuBot));
	}
}
예제 #2
0
void CGameServerPlayer::PrepareInitialPackets()
{
	QueuePacket(PacketData(std::begin(g_client0_login1), std::end(g_client0_login1)));
	QueuePacket(PacketData(std::begin(g_client0_login2), std::end(g_client0_login2)));
	QueuePacket(PacketData(std::begin(g_client0_login3), std::end(g_client0_login3)));
	QueuePacket(PacketData(std::begin(g_client0_login4), std::end(g_client0_login4)));
	QueuePacket(GetMotd());
	QueuePacket(PacketData(std::begin(g_client0_login7), std::end(g_client0_login7)));
	QueuePacket(GetCharacterInfo());
	QueuePacket(GetInventoryInfo());
	QueuePacket(PacketData(std::begin(g_client0_login11), std::end(g_client0_login11)));
	QueuePacket(PacketData(std::begin(g_client0_login12), std::end(g_client0_login12)));
	QueuePacket(PacketData(std::begin(g_client0_login13), std::end(g_client0_login13)));
	QueuePacket(PacketData(std::begin(g_client0_login14), std::end(g_client0_login14)));

	ResetInstance();
#if 0
	//Test mob in room
	SpawnNpc(1155006509, 10516, 3105901, 159.8f, 0, 156.4f, 0);
#endif
}