您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DataSend函数代码示例

51自学网 2021-06-01 20:25:08
  C++
这篇教程C++ DataSend函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DataSend函数的典型用法代码示例。如果您正苦于以下问题:C++ DataSend函数的具体用法?C++ DataSend怎么用?C++ DataSend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DataSend函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ProtocolCoreSend

void ProtocolCoreSend(int aIndex, PBYTE aSend, int aLen){	OBJECTSTRUCT *gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);	if(aSend[0] == 0xC1 || aSend[0] == 0xC3)	{		switch(aSend[2])		{            case 0x24:             {   				Protocol.CheckRingSend(gObj, aSend);            }			break; 		}	} 	DataSend(aIndex,aSend,aLen);}
开发者ID:samik3k,项目名称:GreatDevelop-Julia-Project,代码行数:18,


示例2: NpcCastleHuntZoneGuard

BOOL NpcCastleHuntZoneGuard(LPOBJ lpNpc, LPOBJ lpObj){	if(gObjIsConnected(lpObj->m_Index) == FALSE)		return TRUE;	if((lpObj->m_IfState.use) > 0)		return TRUE;	PMSG_ANS_GUARD_IN_CASTLE_HUNTZONE pResult = {0};	PHeadSubSetB((PBYTE)&pResult,0xB9,0x03,sizeof(pResult));	pResult.btResult = 1;	pResult.iMaxPrice = 300000;	pResult.iUnitOfPrice = 10000;	pResult.btUsable = FALSE;	pResult.iCurrentPrice = 0;	pResult.iCurrentPrice = g_CastleSiegeSync.GetTaxHuntZone(lpObj->m_Index,FALSE);	if(g_CastleSiege.GetHuntZoneEnter() != FALSE)	{		pResult.btUsable = TRUE;	}	if(lpObj->lpGuild != FALSE)	{		if(g_CastleSiege.CheckCastleOwnerUnionMember(lpObj->m_Index) != FALSE)		{			pResult.btResult = 2;		}		if(g_CastleSiege.CheckCastleOwnerMember(lpObj->m_Index) != FALSE && lpObj->GuildStatus == G_MASTER)		{			pResult.btResult = 3;		}	}	else if(g_CastleSiege.GetHuntZoneEnter())	{		pResult.btResult = 1;	}	DataSend(lpObj->m_Index,(PBYTE)&pResult,pResult.h.size);return TRUE;}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:44,


示例3: NpcDarkSpiritTrainer

BOOL NpcDarkSpiritTrainer(LPOBJ lpNpc, LPOBJ lpObj){	if ( bCanChaosBox == TRUE )	{		PMSG_TALKRESULT pMsg;		pMsg.h.c = 0xC3;		pMsg.h.headcode = 0x30;		pMsg.h.size = sizeof(pMsg);				if ( lpObj->m_bPShopOpen == true )		{			LogAdd("[%s][%s] is Already Opening PShop, ChaosBox Failed",				lpObj->AccountID, lpObj->Name);			GCServerMsgStringSend(lMsg.Get(MSGGET(4, 194)), lpObj->m_Index, 1);			return TRUE;		}		lpObj->m_IfState.type = 13;		lpObj->m_IfState.state = 0;		lpObj->m_IfState.use = 1;				pMsg.result = 0x07;		lpObj->bIsChaosMixCompleted = false;		pMsg.level1 = gDQChaosSuccessRateLevel1;		pMsg.level2 = gDQChaosSuccessRateLevel2;		pMsg.level3 = gDQChaosSuccessRateLevel3;		pMsg.level4 = gDQChaosSuccessRateLevel4;		pMsg.level5 = gDQChaosSuccessRateLevel5;		pMsg.level6 = gDQChaosSuccessRateLevel6;		DataSend(lpObj->m_Index, (LPBYTE)&pMsg, pMsg.h.size);		GCAnsCsMapSvrTaxInfo(lpObj->m_Index, 1, g_CastleSiegeSync.GetTaxRateChaos(lpObj->m_Index));		gObjInventoryTrans(lpObj->m_Index);		LogAddTD("[%s][%s] Open Chaos Box", lpObj->AccountID, lpObj->Name);		gObjItemTextSave(lpObj);		gObjWarehouseTextSave(lpObj);	}	return TRUE;}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:44,


示例4: CGReqQuestSwitch

void CGReqQuestSwitch(PMSG_REQ_QUESTEXP *pMsg, int aIndex){    if( !OBJMAX_RANGE(aIndex) )        return;    OBJECTSTRUCT* lpObj = &gObj[aIndex];    if( !gObjIsConnected(aIndex) )        return;    if( !g_QuestExpProgMng.ChkQuestIndexIDToEpLimit(pMsg->quest_info_index_id, aIndex) )    {        LogAddTD("[QuestExp] - Error - [%s] [%d]", __FILE__, __LINE__);        return;    }    LogAddTD(        "[QuestExp] Selection Episode List Choose One [%s][%s] QuestInfoIndexID[0x%x] Choose[%d]",        gObj[aIndex].AccountID,        gObj[aIndex].Name,        pMsg->quest_info_index_id,        pMsg->choose);    lua_State* L = g_MuLuaQuestExp.GetLua();    if( !L )    {        LogAddTD("[QuestExp] - Error - [%s] [%d]", __FILE__, __LINE__);        return;    }    if( g_QuestExpUserMng.IsQuestAccept(pMsg->quest_info_index_id, aIndex) )    {        g_Generic_Call(L, "CGReqQuestSwitch", "iii>", pMsg->quest_info_index_id, pMsg->choose, aIndex);    }    else    {        PMSG_ANS_QUESTEXP pAnsMsg;        pAnsMsg.result = 1;        PHeadSubSetB((LPBYTE)&pAnsMsg, 0xF6u, 0, 5);        DataSend(gObj[aIndex].m_Index, (LPBYTE)&pAnsMsg, sizeof(pAnsMsg));    }}
开发者ID:331515194,项目名称:zTeamS6.3,代码行数:44,


示例5: sizeof

void cDuelSystem::SendSpectatorRemove(short iSpecIndex, int iRoom){    if(iRoom < 0 || iRoom >= MAX_DUEL_ROOMS)    {        return;    }    if(iSpecIndex < 0 || iSpecIndex >= MAX_DUEL_SEPARATORS)    {        return;    }    if(this->g_DuelRooms[iRoom].szSeparators[iSpecIndex] == NULL)    {        return;    }    if(this->g_DuelRooms[iRoom].szlpObjOne == NULL || this->g_DuelRooms[iRoom].szlpObjTy == NULL)    {        return;    }    PMSG_DUEL_SPEC_ADD pMsg;    pMsg.h.c		= 0xC1;    pMsg.h.size		= sizeof(pMsg);    pMsg.h.headcode = 0xAA;    pMsg.h.subcode  = 0x0A;    memcpy(pMsg.szName, this->g_DuelRooms[iRoom].szSeparators[iSpecIndex]->Name, 10);    for(short i = 0; i < MAX_DUEL_SEPARATORS; ++i)    {        if(i == iSpecIndex)        {            continue;        }        if(this->g_DuelRooms[iRoom].szSeparators[i] != NULL)        {            DataSend(this->g_DuelRooms[iRoom].szSeparators[i]->m_Index, (BYTE*)&pMsg, pMsg.h.size);        }    }}
开发者ID:dneyrabust,项目名称:IA-Julia-Repack,代码行数:44,


示例6: PHeadSubSetB

//00554960	-> 100%void CMasterLevelSystem::GCMasterLevelUpInfo(LPOBJ lpObj)	//OK{	PMSG_MASTERLEVEL_UP pMsg;	PHeadSubSetB(&pMsg.h.c, 0xF3, 0x51, 0x20);	// ----	pMsg.nMLevel		= lpObj->m_nMasterLevel;	pMsg.nAddMLPoint	= 1;	pMsg.nMLPoint		= lpObj->m_iMasterLevelPoint;	pMsg.nMaxMLPoint	= MASTER_MAX_POINT;	pMsg.wMaxLife		= (double)lpObj->AddLife + lpObj->MaxLife;	pMsg.wMaxMana		= (double)lpObj->AddMana + lpObj->MaxMana;	pMsg.wMaxShield		= LOWORD(lpObj->iAddShield) + LOWORD(lpObj->iMaxShield);	pMsg.wMaxBP			= LOWORD(lpObj->AddBP) + LOWORD(lpObj->MaxBP);	// ----	DataSend(lpObj->m_Index, (LPBYTE)&pMsg, pMsg.h.size);	GCSendEffectInfo(lpObj->m_Index, 16);	// ----	LogAddTD("[%s][%s] Master Level Up :%d, MLPoint:%d/%d", lpObj->AccountID, lpObj->Name, lpObj->m_nMasterLevel, lpObj->m_iMasterLevelPoint, MASTER_MAX_POINT);}
开发者ID:Natzugen,项目名称:test,代码行数:20,


示例7: memset

void TNotice::SendToAllUser(LPSTR szMsg, ...){#ifdef GS_UNICODE	unsigned char szTempMsg[4096]={0};#endif	va_list pArguments;#ifdef GS_UNICODE	memset(this->m_Notice.Notice , 0, sizeof(this->m_Notice.Notice ));#endif	va_start(pArguments, szMsg);#ifdef GS_UNICODE	vsprintf((char*)szTempMsg, (char*)szMsg, pArguments);#else	vsprintf_s(this->m_Notice.Notice, (char*)szMsg, pArguments);#endif	va_end(pArguments);#ifdef GS_UNICODE	MultiByteToWideChar( 1258, 0, (char*)szTempMsg,  strlen((char*)szTempMsg), (unsigned short*)this->m_Notice.Notice, sizeof(this->m_Notice.Notice) );	this->m_Notice.Notice[254] = 0;	this->m_Notice.Notice[255] =0;	PHeadSetB( &this->m_pNotice.PacketHeader, 0x0D, wcslen((unsigned short*)this->m_Notice.Notice )*2 + 0x12);#else	PHeadSetB((LPBYTE)&this->m_Notice, 0x0D, strlen(this->m_Notice.Notice)  + sizeof(PMSG_NOTICE) - sizeof(this->m_Notice.Notice) + 1);#endif	for ( int n = OBJ_STARTUSERINDEX ; n < OBJMAX ; n++)	{		if ( gObj[n].Connected == PLAYER_PLAYING )		{			if ( gObj[n].Type  == OBJ_USER )			{				DataSend(n, (LPBYTE)&this->m_Notice , this->m_Notice.h.size );			}		}	}}
开发者ID:Fenrisus,项目名称:p4f-free-emu,代码行数:43,


示例8: DGRequestGensInfo

void DGRequestGensInfo(PMSG_REQ_GENS_INFO* lpMsg,int aIndex){char szName[MAX_IDSTRING+1];	memcpy(szName,lpMsg->szName,MAX_IDSTRING);	szName[10] = '/0';	PMSG_ANS_GENS_INFO pMsg = {0};	pMsg.h.c = 0xC1;	pMsg.h.size = sizeof(pMsg);	pMsg.h.headcode = 0x40;	pMsg.h.subcode = 0x01;	pMsg.aIndex = lpMsg->aIndex;	GetGensInfo(szName,&pMsg);	DataSend(aIndex,(LPBYTE)&pMsg,sizeof(pMsg));}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例9: NpcEventChipNPC

BOOL NpcEventChipNPC(LPOBJ lpNpc, LPOBJ lpObj){	if ( (lpObj->m_IfState.use) > 0 )	{		return TRUE;	}		if ( lpNpc->MapNumber == 0 )	{		PMSG_REQ_VIEW_EC_MN pMsgTha;		PHeadSetB((LPBYTE)&pMsgTha, 0x01, sizeof(pMsgTha));		pMsgTha.iINDEX = lpObj->m_Index;		strcpy(pMsgTha.szUID, lpObj->AccountID);		pEventObj = lpNpc;		DataSendEventChip((char*)&pMsgTha, sizeof(pMsgTha));				lpObj->m_IfState.type = 9;		lpObj->m_IfState.state = 0;		lpObj->m_IfState.use = 1;		return TRUE;	}	if ( lpNpc->MapNumber == 2 )	{		PMSG_EVENTCHIPINFO Result;		PHeadSetB((LPBYTE)&Result, 0x94, sizeof(Result));		Result.Type = 2;				DataSend(lpObj->m_Index, (LPBYTE)&Result, Result.h.size);		lpObj->m_IfState.type = 9;		lpObj->m_IfState.state = 0;		lpObj->m_IfState.use = 1;		return TRUE;	}	return FALSE;}
开发者ID:constantinbogdan,项目名称:node3d,代码行数:43,


示例10: DGAnsCastleTributeMoney

void DGAnsCastleTributeMoney(LPCSP_REQ_CASTLETRIBUTEMONEY lpMsg,int aIndex){	CSP_ANS_MONEYCHANGE pMsg;	pMsg.h.c = PMHC_BYTE;	pMsg.h.size = sizeof( pMsg );	pMsg.h.headcode = 0x80;	pMsg.h.subcode = 0x18;	pMsg.wMapSvrNum = lpMsg->wMapSvrNum;	pMsg.iResult = FALSE;	if(lpMsg->iCastleTributeMoney > 0)	{		pMsg.iResult = CastleTributeMoney(lpMsg->wMapSvrNum,lpMsg->iCastleTributeMoney,&pMsg.i64CastleMoney);	}	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例11: DGAnsCastleNpcBuy

void DGAnsCastleNpcBuy(LPCSP_REQ_NPCBUY lpMsg,int aIndex){	CSP_ANS_NPCBUY pMsg;	pMsg.h.c = PMHC_BYTE;	pMsg.h.size = sizeof( pMsg );	pMsg.h.headcode = 0x80;	pMsg.h.subcode = 0x03;	pMsg.iIndex = lpMsg->iIndex;	pMsg.wMapSvrNum = lpMsg->wMapSvrNum;	pMsg.iBuyCost = lpMsg->iBuyCost;	pMsg.iNpcIndex = lpMsg->iNpcIndex;	pMsg.iNpcNumber = lpMsg->iNpcNumber;	pMsg.iResult = CastleNpcBuy(lpMsg);	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例12: DGRequestLeaveGens

void DGRequestLeaveGens(PMSG_REQ_LEAVE_GENS* lpMsg,int aIndex){	char szName[MAX_IDSTRING+1];	memcpy(szName,lpMsg->szName,MAX_IDSTRING);	szName[10] = '/0';	PMSG_ANS_LEAVE_GENS pMsg;	pMsg.h.c = 0xC1;	pMsg.h.size = sizeof(pMsg);	pMsg.h.headcode = 0x40;	pMsg.h.subcode = 0x04;	pMsg.aIndex = lpMsg->aIndex;	LeaveGens(szName,lpMsg->btGens,&pMsg);	DataSend(aIndex,(LPBYTE)&pMsg,sizeof(pMsg));}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例13: DGAnsCastleNpcRepair

void DGAnsCastleNpcRepair(LPCSP_REQ_NPCREPAIR lpMsg,int aIndex){	CSP_ANS_NPCREPAIR pMsg;	pMsg.h.c = PMHC_BYTE;	pMsg.h.size = sizeof( pMsg );	pMsg.h.headcode = 0x80;	pMsg.h.subcode = 0x04;	pMsg.iIndex = lpMsg->iIndex;	pMsg.wMapSvrNum = lpMsg->wMapSvrNum;	pMsg.iNpcIndex = lpMsg->iNpcIndex;	pMsg.iNpcNumber = lpMsg->iNpcNumber;	pMsg.iRepairCost = lpMsg->iRepairCost;	pMsg.iResult = CastleNpcRepair(lpMsg,&pMsg);	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例14: LOBYTE

void PCPointShop::DecreasePoints(DWORD PlayerID,int Points){	int ID=PlayerID-MIN_PLAYERID;		if(pObjGS[ID].PCPlayerPoints-Points<0)	{		pObjGS[ID].PCPlayerPoints=0;	}	else	{		pObjGS[ID].PCPlayerPoints-=Points;		//this->SendPoints(PlayerID);	}		pObjGS[ID].PCInfoMod=1;	pObjGS[ID].PCInfoReceived=1;	BYTE Packet[8] = {0xC1, 0x08 , 0xD0 , 0x04 , LOBYTE(pObjGS[ID].PCPlayerPoints) , HIBYTE(pObjGS[ID].PCPlayerPoints) , LOBYTE(MaxPlayerPoints) , HIBYTE(MaxPlayerPoints)};	DataSend(PlayerID,(PBYTE)Packet,Packet[1]);}
开发者ID:brunohkbx,项目名称:pendmu-server,代码行数:19,


示例15: sizeof

void GuildMatch::DGAnsJoinReqDelete(GUILDMATCH_DGANS_OFFERDELETE* lpData){	if(		!OBJMAX_RANGE(lpData->UserIndex) 		||	gObj[lpData->UserIndex].Connected != PLAYER_PLAYING )	{		return;	}	// ----	GUILDMATCH_GCANS_JOINREQDELETE lpAnswer = { 0 };	lpAnswer.h.c			= 0xC1;	lpAnswer.h.headcode		= 0xED;	lpAnswer.h.subcode		= 0x05;	lpAnswer.h.size			= sizeof(GUILDMATCH_GCANS_JOINREQDELETE);	// ----	if( lpData->Result == 1 )	{		DataSend(lpData->UserIndex, (LPBYTE)&lpAnswer, sizeof(GUILDMATCH_GCANS_JOINREQDELETE));	}}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:19,


示例16: DGAnsCastleOwnerChange

void DGAnsCastleOwnerChange(LPCSP_REQ_CASTLEOWNERCHANGE lpMsg,int aIndex){	CSP_ANS_CASTLEOWNERCHANGE pMsg;	pMsg.h.c = PMHC_BYTE;	pMsg.h.size = sizeof( pMsg );	pMsg.h.headcode = 0x80;	pMsg.h.subcode = 0x0C;	pMsg.bIsCastleOccupied = lpMsg->bIsCastleOccupied;	char szOwnerGuildName[9] = {0};	memcpy(szOwnerGuildName,lpMsg->szOwnerGuildName,0x08);	memcpy(pMsg.szOwnerGuildName,lpMsg->szOwnerGuildName,0x08);	pMsg.iResult = CastleOwnerChange(lpMsg->wMapSvrNum,lpMsg->bIsCastleOccupied,szOwnerGuildName);	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例17: JGGetMasterInfo

void JGGetMasterInfo(LPSDHP_DBMASTERINFOREQUEST lpMsg,int aIndex){	char szName[MAX_IDSTRING+1];	memcpy(szName,lpMsg->szName,MAX_IDSTRING);	szName[10] = 0;	PMSG_ANS_MASTERINFO pMsg;	pMsg.h.c = 0xC1;	pMsg.h.size = sizeof(pMsg);	pMsg.h.headcode = 0x30;	pMsg.Index = lpMsg->Index;	memcpy(pMsg.szName,szName,MAX_IDSTRING);	pMsg.szName[10] = 0;	pMsg.result = GetMasterInfo(&pMsg,szName);	DataSend(aIndex,(LPBYTE)&pMsg,sizeof(pMsg));}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例18: DGAnsPeriodItemInsert

void DGAnsPeriodItemInsert(LPMSG_REQ_PERIODITEM_INSERT lpMsg,int aIndex){	PMSG_ANS_PERIODITEM_INSERT pMsg;	pMsg.head.c = PMHC_BYTE;	pMsg.head.size = sizeof( pMsg );	pMsg.head.headcode = 0xD0;	pMsg.head.subcode = 0x04;	pMsg.iUserIndex = lpMsg->iUserIndex;	pMsg.iItemPeriodDate = lpMsg->iItemPeriodDate;	pMsg.btItemEffectType1 = lpMsg->btItemEffectType1;	pMsg.btItemEffectType2 = lpMsg->btItemEffectType2;	pMsg.iItemCode = lpMsg->iItemCode;	pMsg.btResult = InsertPeriodItem(lpMsg);	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.head.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:19,


示例19: Divorce

void Divorce(LPMSG_REQ_DIVORCE lpMsg,int aIndex){	char szQuery[256];	char szName[MAX_IDSTRING+1] = {0};	memcpy(szName,lpMsg->szName,MAX_IDSTRING);	sprintf(szQuery,"SELECT * FROM wedding WHERE husband = '%s' OR wife = '%s'",		szName,szName);	PMSG_ANS_DIVORCE pMsg;	pMsg.h.c = 0xC1;	pMsg.h.size = sizeof(pMsg);	pMsg.h.headcode = 0x66;	pMsg.h.subcode = 0x04;	pMsg.btResult = FALSE;	if( g_MyEventDB.Exec(szQuery) == TRUE )	{		if( g_MyEventDB.Fetch() == SQL_NO_DATA )		{			pMsg.btResult =2;		}		else		{			g_MyEventDB.GetStr("wife",pMsg.Wife);			g_MyEventDB.GetStr("husband",pMsg.Husband);			g_MyEventDB.Clear();			sprintf(szQuery,"DELETE FROM wedding WHERE husband = '%s' OR wife = '%s'",szName,szName);			if( g_MyEventDB.Exec(szQuery) == TRUE )			{				pMsg.btResult = TRUE;			}		}	}	g_MyEventDB.Clear();	DataSend(aIndex,(LPBYTE)&pMsg,sizeof( pMsg ));}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:42,


示例20: NpcChaosCardMaster

BOOL NpcChaosCardMaster(LPOBJ lpNpc, LPOBJ lpObj){	if ( g_bUseLotterySystem == FALSE )		return FALSE;	if ( bCanChaosBox == TRUE )	{		if ( lpObj->m_IfState.use > 0 )			return FALSE;		if ( lpObj->m_bPShopOpen == true )		{			LogAdd("[%s][%s] is Already Opening PShop, ChaosBox Failed",				lpObj->AccountID, lpObj->Name);			GCServerMsgStringSend(lMsg.Get(MSGGET(4,194)), lpObj->m_Index, 1);			return TRUE;		}		PMSG_TALKRESULT pMsg;		pMsg.h.c = 0xC3;		pMsg.h.headcode = 0x30;		pMsg.h.size = sizeof(pMsg);		pMsg.result = 0x15;		DataSend(lpObj->m_Index, (LPBYTE)&pMsg, pMsg.h.size);		lpObj->m_IfState.use = 1;		lpObj->m_IfState.type = 7;		gObjInventoryTrans(lpObj->m_Index);		LogAddTD("[JewelMix] [%s][%s] Jewel Mix Dealer Start",			lpObj->AccountID, lpObj->Name);		gObjItemTextSave(lpObj);		gObjWarehouseTextSave(lpObj);	}	return TRUE;}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:42,


示例21: NpcLugard

BOOL NpcLugard(LPOBJ lpNpc,LPOBJ lpObj){	if( !gObjIsConnected(lpObj->m_Index) )		return true;	PMSG_TALKRESULT pMsg;	pMsg.h.c = 0xC3;	pMsg.h.headcode = 0x30;	pMsg.h.size = sizeof(pMsg);	pMsg.result = 35;	pMsg.level1 = gDoubleGoer.GetOpenTime()/60;	pMsg.level2 = gDoubleGoer.GetOpenTime()%60;	lpObj->m_IfState.use = 1;	lpObj->m_IfState.type = 21;	DataSend(lpObj->m_Index,(LPBYTE)&pMsg,pMsg.h.size);	return true;}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:20,


示例22: sizeof

void ConnectEx::SendClose(int UserIndex){	/*if(		g_License.GetLicenseID() != Customer::Zeon		&&	g_License.GetLicenseID() != Customer::Refinery		&&	g_License.GetLicenseID() != Customer::Bereznuk		&&	g_License.GetLicenseID() != Customer::Reedlan		&&	g_License.GetLicenseID() != Customer::MUAngel		&&	g_License.GetLicenseID() != Customer::MUAngel2		&&	g_License.GetLicenseID() != Customer::White		&&	g_License.GetLicenseID() != Customer::White2 		&&  g_License.GetLicenseID() != Customer::drynea		&&  g_License.GetLicenseID() != Customer::virnet )	{		return;	}*/	// ----	CONNECTEX_CLOSE pRequest;	pRequest.h.set((LPBYTE)&pRequest, 0xFB, 0xC, sizeof(CONNECTEX_CLOSE));	DataSend(UserIndex, (LPBYTE)&pRequest, pRequest.h.size);}
开发者ID:331515194,项目名称:zTeamS6.3,代码行数:20,


示例23: DGAnsGuildMarkRegInfo

void DGAnsGuildMarkRegInfo(LPCSP_REQ_GUILDREGINFO lpMsg,int aIndex){	CSP_ANS_GUILDREGINFO pMsg;	pMsg.h.c = PMHC_BYTE;	pMsg.h.size = sizeof( pMsg );	pMsg.h.headcode = 0x80;	pMsg.h.subcode = 0x0A;	pMsg.iIndex = lpMsg->iIndex;	pMsg.wMapSvrNum = lpMsg->wMapSvrNum;	char szGuildName[9] = {0};	memcpy(szGuildName,lpMsg->szGuildName,8);	memcpy(pMsg.szGuildName,lpMsg->szGuildName,8);	pMsg.iResult = GuildMarkRegInfo(lpMsg->wMapSvrNum,szGuildName,&pMsg);	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:20,


示例24: va_start

void CCrywolfUtil::SendCrywolfUserAnyMsg(int iType, LPSTR lpszMsg, ...){	if ( !lpszMsg )		return;	char szBuffer[512] = "";	va_list	pArguments;	va_start(pArguments, lpszMsg);	vsprintf(szBuffer, lpszMsg, pArguments);	va_end(pArguments);	PMSG_NOTICE pNotice;	switch ( iType )	{		case 1:			TNotice::MakeNoticeMsg(&pNotice, 0, szBuffer);			TNotice::SetNoticeProperty(&pNotice, 10, _ARGB(255, 255, 200, 80), 1, 0, 20);			break;		case 2:			TNotice::MakeNoticeMsg(&pNotice, 0, szBuffer);			break;	}	for ( int i=OBJ_STARTUSERINDEX;i<OBJMAX;i++)	{		if ( gObj[i].Connected == PLAYER_PLAYING )		{			if ( gObj[i].Type == OBJ_USER )			{				if ( gObj[i].MapNumber == MAP_INDEX_CRYWOLF_FIRSTZONE )				{					DataSend(i, (LPBYTE)&pNotice, pNotice.h.size);				}			}		}	}}
开发者ID:Natzugen,项目名称:IGCN---Season-5,代码行数:41,


示例25: EGAnsDeleteStones

void EGAnsDeleteStones(LPMSG_REQ_DELETE_STONES lpMsg,int aIndex){	char szQuery[256];	char szAccount[MAX_IDSTRING+1] = {0};	memcpy(szAccount,lpMsg->szUID,MAX_IDSTRING);	PMSG_ANS_DELETE_STONES pMsg;	pMsg.h.c = 0xC1;	pMsg.h.headcode = 0x07;	pMsg.h.size = sizeof( pMsg );	strcpy(pMsg.szUID,szAccount);	pMsg.szUID[10] = 0;	pMsg.iINDEX = lpMsg->iINDEX;	pMsg.bSUCCESS = FALSE;	sprintf(szQuery,"SELECT StoneCount FROM T_BLOOD_CASTLE WHERE AccountID='%s'",szAccount);	if( g_EventDB.Exec(szQuery) == TRUE && g_EventDB.Fetch() != SQL_NO_DATA )	{		int Stones = g_EventDB.GetInt("StoneCount");		g_EventDB.Clear();		if(Stones >= lpMsg->iStoneCount)		{			sprintf(szQuery,"UPDATE T_BLOOD_CASTLE SET StoneCount = StoneCount - %d WHERE AccountID='%s'",Stones,szAccount);			if(g_EventDB.Exec(szQuery) == TRUE)			{				pMsg.bSUCCESS = TRUE;				pMsg.iStoneCount = Stones;			}		}	}	g_EventDB.Clear();	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:41,


示例26: DGAnsRegAttackGuild

void DGAnsRegAttackGuild(LPCSP_REQ_REGATTACKGUILD lpMsg,int aIndex){	CSP_ANS_REGATTACKGUILD pMsg;	pMsg.h.c = PMHC_BYTE;	pMsg.h.size = sizeof( pMsg );	pMsg.h.headcode = 0x80;	pMsg.h.subcode = 0x0D;	pMsg.iResult = 0;	pMsg.iIndex = lpMsg->iIndex;	pMsg.wMapSvrNum = lpMsg->wMapSvrNum;	char szEnemyGuildName[9] = {0};	memcpy(szEnemyGuildName,lpMsg->szEnemyGuildName,0x08);	memcpy(pMsg.szEnemyGuildName,lpMsg->szEnemyGuildName,0x08);	pMsg.iResult = RegAttackGuild(lpMsg->wMapSvrNum,szEnemyGuildName);	DataSend(aIndex,(LPBYTE)&pMsg,pMsg.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:21,


示例27: JoinServerLogin

void JoinServerLogin(LPSDHP_SERVERINFO lpMsg,int aIndex){	SDHP_RESULT pResult;	pResult.h.c			= PMHC_BYTE;	pResult.h.headcode	= 0x00;	pResult.h.size		= sizeof(pResult);	pResult.Result		= 0x01;	g_JSData.Set(aIndex,lpMsg->ServerCode);	if( gSObjSetInfo(aIndex, lpMsg->Port, lpMsg->Type, lpMsg->ServerName) == FALSE )	{		pResult.Result = 0x00;		g_Window.ServerLogAdd(ST_JOINSERVER,"Client Authentication Fail");	}	gSObj[aIndex].ServerCode =  lpMsg->ServerCode;	gSObj[aIndex].Flag = 1;	DataSend(aIndex,(LPBYTE)&pResult,pResult.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:21,


示例28: DataServerLogin

void DataServerLogin(LPSDHP_SERVERINFO lpMsg,int aIndex){	SDHP_RESULT pResult;	pResult.h.size = sizeof( pResult );	pResult.h.c = PMHC_BYTE;	pResult.h.headcode = 0x00;	pResult.Result = 0x01;	pResult.ItemCount = GetItemCount(lpMsg->ServerCode / 20);	gSObj[aIndex].ServerCode = lpMsg->ServerCode;	if( gSObjSetInfo(aIndex, lpMsg->Port, lpMsg->Type, lpMsg->ServerName) == FALSE )	{		pResult.Result = 0x00;		g_Window.ServerLogAdd(ST_DATASERVER,"Client Authentication Fail");	}	DataSend(aIndex,(LPBYTE)&pResult,pResult.h.size);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:21,


示例29: DGReqQuestExInfo

void DGReqQuestExInfo(PMSG_REQ_QUESTEXINFO* lpMsg,int aIndex){	char szName[MAX_IDSTRING+1];	memcpy(szName,lpMsg->szName,MAX_IDSTRING);	szName[10] = 0;	PMSG_ANS_QUESTEXINFO pMsg = {0};	pMsg.h.c = 0xC2;	pMsg.h.headcode = 0x16;	pMsg.h.sizeL = SET_NUMBERL(sizeof(pMsg));	pMsg.h.sizeH = SET_NUMBERH(sizeof(pMsg));	strcpy(pMsg.szName,szName);	pMsg.aIndex = lpMsg->aIndex;	ReadQuestInfoEx(szName,&pMsg);	DataSend(aIndex,(LPBYTE)&pMsg,sizeof(pMsg));}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:21,



注:本文中的DataSend函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DataTypeIException函数代码示例
C++ DataObject_Update函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。