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

📄 msgnpc.h

📁 网络游戏魔域的服务端与客户端完整源代码 包括详细的说明文档与开发日志
💻 H
字号:
// MsgNpc.h: interface for the CMsgNpc class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MSGNPC_H__B662BA21_4E11_41B2_B997_584B4833F266__INCLUDED_)
#define AFX_MSGNPC_H__B662BA21_4E11_41B2_B997_584B4833F266__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "NetMsg.h"

//define constant ..
enum {
		EVENT_BEACTIVED = 0,				// to server		// 触发
		EVENT_ADDNPC,						// no use
		EVENT_LEAVEMAP,						// to client		// 删除
		EVENT_DELNPC,						// to server
		EVENT_CHANGEPOS,					// to client/server
		EVENT_LAYNPC,						// to client(id=region,data=lookface), answer MsgNpcInfo(CMsgPlayer for statuary)
};

class CMsgNpc   : public CNetMsg  
{
public:
	CMsgNpc();
	virtual ~CMsgNpc();
	BOOL	Create	(int nAction, OBJID id, int nType = 0, DWORD dwData = 0);

public:	
	BOOL			Create		(char* pMsgBuf, DWORD dwSize);
	void			Process		(CGameSocket* pSocket);

protected:
	typedef struct {
		MSGHEAD_DEFINE

		OBJID id;								// may be ID_NONE, EVENT_LAYNPC: region
		union{
			DWORD			dwData;
			struct{
				USHORT			usPosX;
				USHORT			usPosY;
			};
		};
		unsigned short usAction;
		unsigned short usType;
	}MSG_Info;

	MSG_Info*	m_pInfo;

};

#endif // !defined(AFX_MSGNPC_H__B662BA21_4E11_41B2_B997_584B4833F266__INCLUDED_)

⌨️ 快捷键说明

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