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

📄 msgcallpetinfo.cpp

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

#include "allmsg.h"
#include "Npc.h"
#include "NpcManager.h"
#include "GameMap.h"
#include "MapGroup.h"
#include "MsgCallPetInfo.h"

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

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

CMsgCallPetInfo::~CMsgCallPetInfo()
{

}

//////////////////////////////////////////////////////////////////////
BOOL CMsgCallPetInfo::Create(OBJID id, DWORD dwLookFace, int nAIType, int usPosX, int usPosY, OBJID idItem)
{
	CHECKF(id);

	// init
	this->Init();

	// fill info now
	m_unMsgSize	=sizeof(MSG_Info);
	m_unMsgType	=_MSG_PETINFO;

	m_pInfo->id				= id;
	m_pInfo->dwLookFace		= dwLookFace;
	m_pInfo->nAIType		= nAIType;
	m_pInfo->usPosX			= usPosX;
	m_pInfo->usPosY			= usPosY;
	m_pInfo->idItem			= idItem;

	return true;
}

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

	memcpy(this->m_bufMsg, pbufMsg, dwMsgSize);
	return true;
}

//////////////////////////////////////////////////////////////////////
void CMsgCallPetInfo::Process(CGameSocket* pSocket)
{
#ifdef _MYDEBUG
	::LogSave("Process CMsgCallPetInfo: ID:0x:%x, Type:%d, LookType:%d, CellX:%d, CellY:%d, Name:%s",
				m_pInfo->id	, m_pInfo->ucType,
				m_pInfo->usLook, m_pInfo->usCellX, 
				m_pInfo->usCellY, m_pInfo->szName);

#endif
	ASSERT(!"CMsgCallPetInfo::Process");
}

⌨️ 快捷键说明

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