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

📄 mailmgr.h

📁 国内著名网络游戏dragon的客户端登陆用完整源码 配套一起上传的服务端部分可开服 无说明文档
💻 H
字号:
// MailMgr.h: interface for the CMailMgr class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAILMGR_H__E18F4BAB_960A_4A80_AB39_22247C783034__INCLUDED_)
#define AFX_MAILMGR_H__E18F4BAB_960A_4A80_AB39_22247C783034__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "network.h"
#include "menuset.h"

enum eMAIL_VIEW_TYPE
{//牢磐其捞胶狼 nWillDo俊档 荤侩 邓聪促.
	MVT_RECV_LIST = 0,//罐篮祈瘤窃
	MVT_DELETE_LIST = 1,//瘤款 祈瘤窃
};

class CMailMgr  
{
public:
	enum eVALUE
	{
		LIST_LINE_GAB	= 24,
	};
	
	enum eMAIL_TYPE
	{
		NORMAL_MAIL	= 1,
		GUILD_MAIL	= 2,
		GAMEMASTER_MAIL	= 3,
		
		NORMAL_MAIL_REPLY		= 101,
		GAMEMASTER_MAIL_REPLY	= 103,
	};
public:
	CMailMgr();
	virtual ~CMailMgr();
public:
	bool Send(const int iType, const char* szTarget, const char *szTitle, const char *szBody);//焊郴扁
	void SendDelete(const int iCallType);//瘤快扁(府胶飘 锅龋甫 焊忱聪促.)
	void SendRepair();//泅犁 急琶等 府胶飘甫 汗盔钦聪促.

	void RequestBody(const int iMailIndex);//秦寸 皋老狼 郴侩 罐扁
	void RecvBody(t_packet *p);

	void SaveMailToLocal();//急琶等 皋老 历厘 窍扁.

	void RecvAlert();
	void RecvSendResult(int cmd_type);
	
public:
	void SelectAll();//葛滴 急琶窍扁
	void SendReqOtherPage(const int iPageFlag);//促弗 其捞瘤 夸没
	void RecvMailList(t_packet *p);
	void SendReqMailList(const int eViewType, const int iPageIndex);//皋老 府胶飘 夸没

public:
	const int GetMailIndex(const int iMailListIndex);
	const bool GetMailIsRead(const int iMailListIndex);
	const int GetMailType(const int iMailListIndex);
	const char* GetMailSender(const int iMailListIndex);
	const char* GetMailTitle(const int iMailListIndex);
	const bool GetMailDate(const int iMailListIndex,const bool bIsDetail, char* szTime);
	
	const int GetMailIconNo(const int iMailType)
	{
		switch(iMailType)
		{
		case GUILD_MAIL:
			{
				return 45;
			}break;
		case GAMEMASTER_MAIL:
			{
				return 46;
			}break;
		case NORMAL_MAIL_REPLY:
			{
				return 47;
			}break;
		case GAMEMASTER_MAIL_REPLY:
			{
				return 48;
			}break;
		case NORMAL_MAIL:
		default:
			{
				return 44;
			}break;
		}
		return 0;
	}

	const bool IsRead(const int iMailListIndex);
	const bool IsSelected(const int iMailListIndex);
	void SetSelected(const int iMailListIndex, const bool bIsSelect);

	void SetInterFaceMailData(const int iMailListIndex, const bool bIsSelect , LPMAILDATA pMailData);
	
	bool CheckIndex(const int iMailListIndex)
	{
		if( 0 > iMailListIndex
		||	MAX_MAIL_PAGE <= iMailListIndex)
		{
			return false;
		}
		return true;
	}

public:
	void ClearTempData();//烙矫傍埃阑 昏力 钦聪促.
	
	const int GetTempMailIndex();
	const int GetTempMailType();
	
	char* GetTempMailSender();
	char* GetTempMailTitle();
	bool GetTempMailDate(const bool bIsDetail,char *szTime);
	char* GetTempMailBody();

	void SetTempMailType(const int iMailType);
	void SetTempMailReceiver(const char* szName);
	
	void IncTempMailType();
	void DecTempMailType();
	
	__int32 GetNowViewPageNo(){return m_iNowViewPageNo;}

	void SetExistNotRead(const bool bIsHave){m_bIsExistNotRead = bIsHave;}
	bool GetExistNotRead()const{return m_bIsExistNotRead;}

	void Clear();

private:
	INTERFACEMAILDATA m_MailList[MAX_MAIL_PAGE];

	MAILDATA m_TempMailData;
	MAILBODY m_TempMailBody;//罐绊 镜锭 烙矫 傍埃
private:
	__int32 m_iNowViewType;
	__int32 m_iNowViewPageNo;

	bool m_bIsExistNotRead;
};

extern CMailMgr g_MailMgr;

extern inline bool IsMailMenuOpen();
extern void Call_MAIL_WRITE_MENU(const char* szTargetName, const bool bIsReply = false);//皋老 静扁 皋春 龋免
extern void RegistFriend(const char *szName);
//------------------------------
////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
#endif // !defined(AFX_MAILMGR_H__E18F4BAB_960A_4A80_AB39_22247C783034__INCLUDED_)
	

⌨️ 快捷键说明

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