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

📄 msgallot.cpp

📁 网络游戏魔域的服务端与客户端完整源代码 包括详细的说明文档与开发日志
💻 CPP
字号:
// MsgAllot.cpp: implementation of the CMsgAllot class.
//
//////////////////////////////////////////////////////////////////////

#include "AllMsg.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CMsgAllot::CMsgAllot()
{
	Init();
	m_pInfo	=(MSG_Info *)m_bufMsg;
}

CMsgAllot::~CMsgAllot()
{

}

//-------------------------------------------------------------------

BOOL CMsgAllot::Create(char* pbufMsg, DWORD dwMsgSize)
{
	if (!CNetMsg::Create(pbufMsg, dwMsgSize))
		return false;

	if(_MSG_ALLOT != this->GetType())
		return false;
	
	return true;
}

//-------------------------------------------------------------------

BOOL CMsgAllot::Create(unsigned char ucForce, unsigned char ucSpeed, unsigned char ucHealth, unsigned char ucSoul)
{
	// init
	this->Init();
	
	if((ucForce+ucSpeed+ucHealth+ucSoul) == 0)
	{
		return false;
	}

	m_pInfo->ucForce = ucForce;
	m_pInfo->ucHealth = ucHealth;
	m_pInfo->ucSoul = ucSoul;
	m_pInfo->ucSpeed = ucSpeed;

	m_unMsgType	=_MSG_ALLOT;
	m_unMsgSize	=sizeof(MSG_Info);

	return true;
}

//-------------------------------------------------------------------
void CMsgAllot::Process(void* pInfo)
{
	return;
}
//-------------------------------------------------------------------

⌨️ 快捷键说明

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