msgtasklist.cpp

来自「网络游戏魔域的服务端与客户端完整源代码 包括详细的说明文档与开发日志」· C++ 代码 · 共 50 行

CPP
50
字号
// MsgTaskList.cpp: implementation of the CMsgTaskList class.
//
//////////////////////////////////////////////////////////////////////

#include "AllMsg.h"

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

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

CMsgTaskList::~CMsgTaskList()
{

}

BOOL CMsgTaskList::Create(char* pbufMsg,DWORD dwMsgSize)
{
	if (!CNetMsg::Create(pbufMsg, dwMsgSize))
		return false;
	
	if(_MSG_TASK_LIST != this->GetType())
		return false;
	
	return true;
}

void CMsgTaskList::Process(void *pInfo)
{
	int nAmount = m_pInfo->usAmount;
	if (0 == nAmount || TASKLIST_NONE == m_pInfo->usType)
		return;
	else
	{
		g_objHero.ClearPlayerTaskList();
		g_objHero.SetPlayerTaskListType(m_pInfo->usType);
		for(int i=0;i<nAmount;i++)
		{
			g_objHero.AddPlayerTaskList(m_pInfo->setTask[i].idTask,
				m_pInfo->setTask[i].szTitle,
				m_pInfo->setTask[i].ucReqLev);
		}
		::PostCmd(CMD_FLASH_PLAYERTASKLIST);
	}
}

⌨️ 快捷键说明

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