• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PHeadSetB函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: memset

void TNotice::SendToUser(int aIndex, LPSTR szMsg, ...)
{
#ifdef GS_UNICODE
	unsigned char szTempMsg[4096]={0};
#endif

	va_list pArguments;

#ifdef GS_UNICODE
	memset(this->m_pNotice.szNoticeMessage , 0, sizeof(this->m_pNotice.szNoticeMessage ));
#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_pNotice.szNoticeMessage, sizeof(this->m_pNotice.szNoticeMessage) );
	this->m_pNotice.szNoticeMessage[254]=0;
	this->m_pNotice.szNoticeMessage[255]=0;
	PHeadSetB( &this->m_pNotice.PacketHeader, 0x0D, wcslen((unsigned short*)this->m_pNotice.szNoticeMessage )*2+0x12);
#else
	PHeadSetB((LPBYTE)&this->m_Notice, 0x0D, strlen(this->m_Notice.Notice)  + sizeof(PMSG_NOTICE) - sizeof(this->m_Notice.Notice) + 1);
#endif

	DataSend(aIndex, (LPBYTE)&this->m_Notice , this->m_Notice.h.size );

}
开发者ID:Fenrisus,项目名称:p4f-free-emu,代码行数:35,代码来源:TNotice.cpp


示例2: GetTickCount

void CRingAttackEvent::ProcState_Closed()
{
	int iTICK_MSEC = GetTickCount() - this->m_iTIME_TICK_COUNT;

	if ( iTICK_MSEC >= 1000 )
	{
		this->m_iTIME_MSEC_REMAIN -= iTICK_MSEC;
		this->m_iTIME_TICK_COUNT = GetTickCount();

		if ( this->m_bDoEvent )
		{
			if ( this->m_iTIME_MSEC_REMAIN <= (this->m_iTIME_MIN_OPEN * 60 * 1000 ) &&
				 this->m_iTIME_MSEC_REMAIN > 0 &&
				 (this->m_iTIME_MSEC_REMAIN / 60000 ) != this->m_iTIME_NOTIFY_COUNT )
			{
				this->m_iTIME_NOTIFY_COUNT = this->m_iTIME_MSEC_REMAIN / 60000;

				if ( (this->m_iTIME_NOTIFY_COUNT+1) == 3 )
				{
					AllSendServerMsg("The White Wizard and his minions are starting to assemble!");

					PMSG_ANS_CL_EFFECT pMsg;

					PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
					pMsg.wEffectNum = 0;

					DataSendAll((LPBYTE)&pMsg, pMsg.h.size);

					LogAdd("[Ring Event] - Before 3 minutes - Advertise");
				}
			}
		}
	}

	if ( this->m_iTIME_MSEC_REMAIN <= 0 )
	{

		AllSendServerMsg("The White Wizard and his Orcs have invaded us!");

		PMSG_ANS_CL_EFFECT pMsg;

		PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
		pMsg.wEffectNum = 1;

		DataSendAll((LPBYTE)&pMsg, pMsg.h.size);

		if ( this->m_bDoEvent )
		{
			this->SetState(2);
		}
		else
		{
			this->SetState(0);
		}

		LogAdd("[Ring Event] - Event Started");
	}
}
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:58,代码来源:RingAttackEvent.cpp


示例3: GCDamageSend

void GCDamageSend(int aIndex,int TargetIndex,int AttackDamage,int MSBFlag,int MSBDamage,int iShieldDamage)
{
    PMSG_ATTACKRESULT pResult;

#if (IS_PROTOCOL_JPN == 0)
    PHeadSetB((LPBYTE)&pResult,0x11,sizeof(pResult));	// (1.03P 1.03.16 main)
#else
    PHeadSetB((LPBYTE)&pResult,0xDC,sizeof(pResult));	// (1.03K 1.03.11 main)
#endif

    pResult.NumberH = SET_NUMBERH(TargetIndex);
    pResult.NumberL = SET_NUMBERL(TargetIndex);
    pResult.DamageH = SET_NUMBERH(AttackDamage);
    pResult.DamageL = SET_NUMBERL(AttackDamage);

    pResult.btShieldDamageH = SET_NUMBERH(iShieldDamage);
    pResult.btShieldDamageL = SET_NUMBERL(iShieldDamage);

    if(MSBFlag != false)
    {
        pResult.NumberH &= 0x7F;
        pResult.NumberH |= 0x80;
    }

    pResult.DamageType = MSBDamage;

    OBJECTSTRUCT * gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
    OBJECTSTRUCT * gTarg = (OBJECTSTRUCT*)OBJECT_POINTER(TargetIndex);

    pResult.Life = gTarg->Life;
    pResult.MaxLife = gTarg->MaxLife + gTarg->AddLife;

    pResult.X = gTarg->X;
    pResult.Y = gTarg->Y;

    if(gTarg->Type == OBJECT_MONSTER)
    {
        pResult.Life = gTarg->Life;
        pResult.MaxLife = gTarg->MaxLife + gTarg->AddLife;
    }

    if(gTarg->Type == OBJECT_USER)
    {
        DataSend(TargetIndex, (LPBYTE)&pResult, pResult.h.size);
    }

    if(gObj->Type == OBJECT_USER)
    {
        DataSend(aIndex, (LPBYTE)&pResult, pResult.h.size);
    }

    lpGCDamageSend(aIndex, TargetIndex, AttackDamage, MSBFlag, MSBDamage, iShieldDamage);
}
开发者ID:Natzugen,项目名称:IA-Julia-S4.6,代码行数:53,代码来源:HPBar.cpp


示例4: EGAnsEnterDoubleGoer

void EGAnsEnterDoubleGoer(LPBYTE aRecv,int aIndex)
{
	LPMSG_DOUBLEGOER_REQ_ENTER_EVENT lpMsg = (LPMSG_DOUBLEGOER_REQ_ENTER_EVENT)aRecv;


	PMSG_DOUBLEGOER_ANS_ENTER_EVENT pMsg;

	PHeadSetB((LPBYTE)&pMsg,0x40,sizeof(pMsg));
	pMsg.btPos = lpMsg->btPos;
	pMsg.aIndex = lpMsg->aIndex;
	pMsg.iResult = 0;

	char szQuery[512];

	wsprintf(szQuery,"SELECT DATEDIFF(mi,getdate(),NEXT_EVENT) as LeftHour FROM DG_ROOM WHERE CHAR_NAME = '%s' AND NEXT_EVENT > getdate()",lpMsg->szName);

	if( g_EventDB.Exec(szQuery) != FALSE )
	{
		if( g_EventDB.Fetch() != SQL_NO_DATA )
		{
			pMsg.iResult = g_EventDB.GetInt("LeftHour");
		}
	}
	else
	{
		pMsg.iResult = -1;
	}

	g_EventDB.Clear();


	DataSend(aIndex,(LPBYTE)&pMsg,sizeof(pMsg));
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:33,代码来源:EventServer.cpp


示例5: EGAnsPCBangUpdateUser

void EGAnsPCBangUpdateUser(LPBYTE aRecv,int aIndex)
{
	PMSG_PCBANGUSER_SENDINFO* lpMsg = (PMSG_PCBANGUSER_SENDINFO*)aRecv;
	PMSG_PCBANGUSER_SENDINFO pMsg;

	char szAccountId[MAX_IDSTRING+1];

	memcpy(szAccountId,lpMsg->szAccountID,MAX_IDSTRING);
	szAccountId[MAX_IDSTRING] = '\0';

	PHeadSetB((LPBYTE)&pMsg,0x24,sizeof(pMsg));
	pMsg.aIndex = lpMsg->aIndex;
	pMsg.Point = lpMsg->Point;
	pMsg.btResult = 0;

	char szQuery[256];
	sprintf(szQuery,"UPDATE PCBANG_USER SET pcbang_points = %d WHERE pcbang_id = '%s'",
		lpMsg->Point,szAccountId);

	if( g_EventDB.Exec(szQuery) == TRUE )
	{
		pMsg.btResult = TRUE;
	}
	g_EventDB.Clear();

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

}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:28,代码来源:EventServer.cpp


示例6: EGAnsPCBangUserConnect

void EGAnsPCBangUserConnect(LPBYTE aRecv,int aIndex)
{
	PMSG_PCBANGUSER_CONNECT* lpMsg = (PMSG_PCBANGUSER_CONNECT*)aRecv;

	char szAccountId[MAX_IDSTRING+1];
	szAccountId[MAX_IDSTRING] = '\0';
	memcpy(szAccountId,lpMsg->szAccountID,MAX_IDSTRING);

	char szQuery[256];
	sprintf(szQuery,"SELECT pcbang_id,pcbang_points FROM PCBANG_USER WHERE pcbang_id = '%s'",szAccountId);

	PMSG_PCBANG_USERDATA_GETINFO pMsg ={0};
	PHeadSetB((LPBYTE)&pMsg,0x23,sizeof(pMsg));
	pMsg.aIndex = lpMsg->aIndex;
	pMsg.Points = 0;

	if( g_EventDB.Exec(szQuery) == TRUE )
	{
		if( g_EventDB.Fetch() != SQL_NO_DATA )
		{
			pMsg.Points = g_EventDB.GetInt("pcbang_points");
		}
		else
		{
			g_EventDB.Clear();
			sprintf(szQuery,"INSERT INTO PCBANG_USER (pcbang_id,pcbang_points,reset_date) VALUES ('%s',0,getdate()+7)",szAccountId);
			g_EventDB.Exec(szQuery);
		}
	}

	g_EventDB.Clear();

	DataSend(aIndex,(LPBYTE)&pMsg,sizeof(pMsg));
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:34,代码来源:EventServer.cpp


示例7: PHeadSetB

void CRingMonsterHerd::SendEventGiftWinner(int iIndex, int iGiftKind)
{
    if ( gObjIsConnected(iIndex) == FALSE )
    {
        return;
    }

    if ( gObj[iIndex].UseEventServer != FALSE )
    {
        return;
    }

    gObj[iIndex].UseEventServer = TRUE;

    PMSG_REQ_REG_RINGGIFT pMsg;

    PHeadSetB((LPBYTE)&pMsg, GMSG_BEATTACK, sizeof(pMsg));
    pMsg.iINDEX  = iIndex;
    memcpy(pMsg.szUID, gObj[iIndex].AccountID, MAX_ACCOUNT_LEN);
    pMsg.szUID[MAX_ACCOUNT_LEN+1] = 0;	// #error Remove the +1 to avoid problems
    pMsg.btGiftKind = iGiftKind;

    DataSendEventChip((PCHAR)&pMsg, sizeof(pMsg));

    LogAddTD("[Ring Event] [%s][%s] Request to Register Gift - Gift Kind (%d)",
             gObj[iIndex].AccountID, gObj[iIndex].Name,  iGiftKind);

}
开发者ID:constantinbogdan,项目名称:node3d,代码行数:28,代码来源:RingAttackEvent.cpp


示例8: BroadCastMessage

void BroadCastMessage(BroadCastMessageInfo* lpResult)
{
	if( strlen(lpResult->Text) < 2 )
	{
		return;
	}
	
	switch(lpResult->Type)
	{
	case 0:
		{
			AllSendServerMsg(&lpResult->Text[1]);
		}
		break;
	case 1:
		{
			USER_REQ_POST lpInfo = { 0 };
			PHeadSetB((LPBYTE)&lpInfo, 0, sizeof(lpInfo));
			lpInfo.h.headcode = 2;
			lpInfo.chatmsg[0] = '!';
			memcpy(lpInfo.id, lpResult->Sender, 10);
			strcat(lpInfo.chatmsg, lpResult->Text);
			DataSendAll((LPBYTE)&lpInfo, sizeof(lpInfo));
		}
		break;
	}
	
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:28,代码来源:SProtocol.cpp


示例9: DGGetWarehouseList

void DGGetWarehouseList(LPSDHP_GETWAREHOUSEDB lpMsg,int aIndex)
{
	char szAccountID[MAX_IDSTRING+1] = {0};
	memcpy(szAccountID,lpMsg->AccountID,MAX_IDSTRING);

	SDHP_GETWAREHOUSEDB_SAVE pResult;

	PHeadSetW((LPBYTE)&pResult, 0x08, sizeof(pResult));
	memcpy(pResult.AccountID, szAccountID, MAX_IDSTRING);
	pResult.aIndex = lpMsg->aIndex;

	if( GetWarehouseData(szAccountID,&pResult) == FALSE )
	{
		CreateWarehouseData(szAccountID);

		SDHP_GETWAREHOUSEDB_RESULT pMsg;

		PHeadSetB((LPBYTE)&pMsg, 0x10, sizeof(pMsg));
		pMsg.aIndex = lpMsg->aIndex;
		memcpy(pMsg.AccountID, szAccountID, 10);

		DataSend(aIndex, (LPBYTE)&pMsg, pMsg.h.size);
		return;
	}

	DataSend(aIndex,(LPBYTE)&pResult,sizeof( pResult ));
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:27,代码来源:DataServer.cpp


示例10: PHeadSetB

void cVipSystem::BuyItem(LPOBJ lpObj, int IDNumber)
{
	if(IDNumber >= 0 && IDNumber <= (this->ItemsCount-1))
	{
		BOOL IfBuy = FALSE;	
		PMSG_BUYRESULT pResult;
		PHeadSetB((LPBYTE)&pResult, 0x32, sizeof(pResult));

		if(this->Shop[IDNumber].Cost < lpObj->VipMoney)
		{
			pResult.Result = gObjShopBuyInventoryInsertItem(lpObj->m_Index,this->m_item[IDNumber]);
				
			if ( pResult.Result != 0xFF )
			{
				lpObj->AccountExtraInfoModified = 1;

				ItemByteConvert((LPBYTE)&pResult.ItemInfo, this->m_item[IDNumber]);
				DataSend(lpObj->m_Index, (LPBYTE)&pResult, pResult.h.size);
				lpObj->VipMoney -= this->Shop[IDNumber].Cost;
				IfBuy = TRUE;
			}else
			{				
				GCServerMsgStringSend(lMsg.Get(MSGGET(14, 58)),lpObj->m_Index, 0x01);
			}
		}
		//Log
		if(IfBuy == TRUE)
		{
			LogAddTD("[VIPShop] BuyItem [%s][%s] Item {%d %d} Cost: %d",lpObj->AccountID,lpObj->Name,this->Shop[IDNumber].Type,this->Shop[IDNumber].Index,this->Shop[IDNumber].Cost);
		} else 
		{
			LogAddTD("[VIPShop] Attempt to BuyItem [%s][%s] Item {%d %d} Cost: %d",lpObj->AccountID,lpObj->Name,this->Shop[IDNumber].Type,this->Shop[IDNumber].Index,this->Shop[IDNumber].Cost);
		}
	}
}
开发者ID:ADMTec,项目名称:GameServer,代码行数:35,代码来源:VIPSystem.cpp


示例11: MuItemShopGiftBuyRecv

void MuItemShopGiftBuyRecv(cExtraServer * sManager, int aIndex, SDHP_MUITEMSHOPGIFTBUY * aRecv)
{
	//OutputDebugString("ItemSerialCreateRecv\n");

	SDHP_MUITEMSHOPGIFTBUY		pResult = {0};
	int							Serial2	= 0;
	// ----
	PHeadSetB((LPBYTE)&pResult, SCFExDB_GSRecv_CShopDataGiftRecv, sizeof(pResult));
	// ----
	sManager->db.ExecQuery("EXEC TT_GetMuShopItemSerial");
	sManager->db.Fetch();
	// ----
	Serial2				= sManager->db.GetResult(0);
	// ----
	sManager->db.Close();
	// ----
	strcpy(pResult.AccountID,aRecv->AccountID);
	pResult.m_Serial2	= Serial2;
	pResult.aIndex		= aRecv->aIndex;
	pResult.ItemID		= aRecv->ItemID;
	pResult.ID1			= aRecv->ID1;
	pResult.ID2			= aRecv->ID2;
	strcpy(pResult.Name,aRecv->Name);
	strcpy(pResult.Msg,aRecv->Msg);
	// ----
	sManager->DataSend(aIndex, (unsigned char*)&pResult, pResult.h.size);
}
开发者ID:ADMTec,项目名称:TitanLinkServer,代码行数:27,代码来源:ExServerProtocol.cpp


示例12: GCUseBuffEffect

void GCUseBuffEffect(LPOBJ lpObj, BYTE btEffectIndex, BYTE btEffectUseOption, WORD wOptionType, WORD wEffectType, int iLeftTime)
{
	PMSG_SEND_BUFF_ICON pMsg;

	PHeadSetB((LPBYTE)&pMsg, 0x2D, sizeof(PMSG_SEND_BUFF_ICON));

	pMsg.btEffectIndex = btEffectIndex;
	pMsg.byEffectOption = btEffectUseOption;
	pMsg.wOptionType = wOptionType;
	pMsg.wEffectType = wEffectType;
	pMsg.iLeftTime = iLeftTime;

	if ( lpObj->Type == OBJ_USER )
	{
		DataSend(lpObj->m_Index, (LPBYTE)&pMsg, pMsg.h.size);
	}

	if(btEffectUseOption == 0)
	{
		GCStateInfoSend(lpObj, 1, btEffectIndex);
	}
	else
	{
		GCStateInfoSend(lpObj, 0, btEffectIndex);
	}
}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:26,代码来源:BuffEffectSlot.cpp


示例13: GJReqMapSvrMove

void GJReqMapSvrMove(int iIndex, WORD wDesMapSvrCode, WORD wMapNumber, BYTE btX, BYTE btY)
{
	PMSG_REQ_MAPSVRMOVE pMsg;
	
	if ( gObjIsConnected(iIndex) == PLAYER_EMPTY )
	{
		LogAddC(2, "[MapServerMng] Packet Error GJ [0x7A] - User not Connected : %d", iIndex);
	}
	else
	{
		PHeadSetB((LPBYTE)&pMsg, 0x7A, sizeof(PMSG_REQ_MAPSVRMOVE));
		pMsg.iIndex = iIndex;

		memcpy(pMsg.szAccountID , gObj[iIndex].AccountID, sizeof( pMsg.szAccountID)-1);
		pMsg.szAccountID[10] = 0;
		memcpy(pMsg.szCharName, gObj[iIndex].Name, sizeof( pMsg.szCharName)-1);
		pMsg.szCharName[10] = 0;

		pMsg.wCurMapSvrCode = gGameServerCode;
		pMsg.wDstMapSvrCode = wDesMapSvrCode;
		pMsg.wMapNumber = wMapNumber;
		pMsg.btX = btX;
		pMsg.btY = btY;

		wsJServerCli.DataSend((char*)&pMsg, pMsg.h.size);
	}
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:27,代码来源:SProtocol.cpp


示例14: JGPGetCharList

void JGPGetCharList(LPSDHP_GETCHARLIST lpMsg,int aIndex)
{
	char cBUFFER[10000]={0};

	LPSDHP_CHARLISTCOUNT pCount = (LPSDHP_CHARLISTCOUNT)(cBUFFER);
	LPSDHP_CHARLIST pCL = (LPSDHP_CHARLIST)(cBUFFER + sizeof(SDHP_CHARLISTCOUNT));

	char szAccountID[MAX_IDSTRING+1];
	memcpy(szAccountID,lpMsg->Id,MAX_IDSTRING);
	szAccountID[MAX_IDSTRING] = 0;

	PMSG_ANS_SUMMONER_CREATE pMsg;
	PHeadSetB((LPBYTE)&pMsg,0x72,sizeof(pMsg));

	memcpy(pMsg.szAccount,szAccountID,MAX_IDSTRING);
	pMsg.Number = lpMsg->Number;
	pMsg.Result = GetSummonerCreate(&pMsg,szAccountID);

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

	pCount->Number = lpMsg->Number;
	lstrcpy(pCount->AccountId,szAccountID);

	pCount->Count = GetCharList(szAccountID,pCount,pCL);

	PHeadSetW((LPBYTE)pCount, 0x01, sizeof(SDHP_CHARLISTCOUNT) + sizeof(SDHP_CHARLIST) * pCount->Count);

	DataSend(aIndex,(LPBYTE)&cBUFFER,sizeof(SDHP_CHARLISTCOUNT) + sizeof(SDHP_CHARLIST) * pCount->Count);
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:29,代码来源:DataServer.cpp


示例15: SCNoUpdateSend

void SCNoUpdateSend(int aIndex)
{
	PMSG_DEFRESULT	pMsg={0};	
	PHeadSetB((LPBYTE)&pMsg, 2, sizeof(pMsg));

	pMsg.result     = 0;

	DataSend(aIndex, (LPBYTE)&pMsg, pMsg.h.size);
	ObjDel(aIndex);
}
开发者ID:ADMTec,项目名称:TitanCS,代码行数:10,代码来源:Protocol.cpp


示例16: 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,代码来源:NpcTalk.cpp


示例17: PHeadSetB

BOOL TMonsterAIUtil::SendMonsterMoveMsg(LPOBJ lpObj)
{
	PMSG_RECVMOVE pMove;
#if (__ENG__ == 1)
		// KOR PROTOCOL
	PHeadSetB((LPBYTE)&pMove, 0xD4, sizeof(pMove));
#else
	// KOR PROTOCOL
	PHeadSetB((LPBYTE)&pMove, 0xD7, sizeof(pMove));
#endif

	pMove.NumberH = SET_NUMBERH(lpObj->m_Index);
	pMove.NumberL = SET_NUMBERL(lpObj->m_Index);
	pMove.X = lpObj->MTX;
	pMove.Y = lpObj->MTY;
	pMove.Path = lpObj->Dir << 4;

	this->SendMonsterV2Msg(lpObj, (LPBYTE)&pMove, pMove.h.size);
	return TRUE;
}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:20,代码来源:TMonsterAIUtil.cpp


示例18: PHeadSetB

void PartyClass::PartyMemberLifeSend(int party_number)
{
	if ( this->IsParty(party_number) == FALSE )
	{
		return;
	}

	PMSG_DEFAULT_COUNT pCount;
	PMSG_PARTYLIFEALL pList;
	int usern;
	char sendbuf[512];
	int lOfs = 0;
	int tlife = 0;

	PHeadSetB((LPBYTE)&pCount, 0x44, sizeof(pCount));
	pCount.Count = this->m_PartyS[party_number].Count;
	lOfs += sizeof(pCount);
	
	for ( int i = 0; i<MAX_USER_IN_PARTY ; i++ )
	{
		if ( (this->m_PartyS[party_number].Number[i] >= 0 ) && (this->m_PartyS[party_number].DbNumber[i] >= 0) )
		{
			usern = this->m_PartyS[party_number].Number[i];

			if ( gObjIsConnected(usern) != PLAYER_EMPTY )
			{
				pList.Number = (i * 16) & 0xF0 ;
				tlife = ( (BYTE)(  gObj[usern].Life / ((gObj[usern].MaxLife + gObj[usern].AddLife )/10.0f)     )  ) & 0x0F;
				pList.Number |= tlife;
				memcpy(&sendbuf[lOfs], &pList, 1);
				lOfs++;
			}
			else
			{
				this->m_PartyS[party_number].Number[i] = -1;
				this->m_PartyS[party_number].DbNumber[i] = -1;
				this->m_PartyS[party_number].Count--;
			}
		}
	}

	pCount.h.size = lOfs;
	memcpy(sendbuf, &pCount, sizeof(pCount));

	for (int i=0 ; i<MAX_USER_IN_PARTY ; i++ )
	{
		usern = this->m_PartyS[party_number].Number[i];

		if ( usern >= 0 )
		{
			DataSend(usern, (unsigned char*)sendbuf, lOfs);
		}
	}
}
开发者ID:ADMTec,项目名称:GameServer,代码行数:54,代码来源:PartyClass.cpp


示例19: GJNotifyMaxUserCount

void GJNotifyMaxUserCount()
{
	PMSG_NOTIFY_MAXUSER pMsg;

	PHeadSetB((LPBYTE)&pMsg, 0x7C, sizeof(PMSG_NOTIFY_MAXUSER));
	pMsg.iSvrCode = gGameServerCode;
	pMsg.iMaxUserCount = gServerMaxUser;
	pMsg.iCurUserCount = gObjTotalUser;
	
	wsJServerCli.DataSend((char*)&pMsg, pMsg.h.size);
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:11,代码来源:SProtocol.cpp


示例20: PHeadSetB

void CIllusionTempleEvent::GEReqIllusionTempleIncEnterCount(LPOBJECTSTRUCT lpObj)
{
	PMSG_REQ_ILLUSION_TEMPLE_INC_COUNT pMsg;	
	PHeadSetB((LPBYTE)&pMsg, 0x13, sizeof(pMsg));
	
	memcpy(pMsg.AccountID, lpObj->AccountID, MAX_IDSTRING);
	memcpy(pMsg.GameID, lpObj->Name, MAX_IDSTRING);
	pMsg.ServerCode = gGameServerCode;
	
	DataSendRank((char *)&pMsg, pMsg.h.size);
}
开发者ID:EderRS,项目名称:muOnline-season6,代码行数:11,代码来源:IllusionTempleEvent.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PICOS2KHZ函数代码示例发布时间:2022-05-30
下一篇:
C++ PH_THROW函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap