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

📄 murimnetsystem.cpp

📁 墨香最新私服
💻 CPP
字号:
// MurimNetSystem.cpp: implementation of the CMurimNetSystem class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "MurimNetSystem.h"

#include "MNServerManager.h"
#include "MNPlayerManager.h"
#include "ChannelManager.h"
#include "PlayRoomManager.h"
#include "Front.h"


CMurimNetSystem g_MNSystem;


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

CMurimNetSystem::CMurimNetSystem()
{
	m_pMNServerMgr	= NULL;
	m_pMNPlayerMgr	= NULL;
	m_pChannelMgr	= NULL;
	m_pPlayRoomMgr	= NULL;
//	m_pFront		= NULL;
}

CMurimNetSystem::~CMurimNetSystem()
{

}

void CMurimNetSystem::Init()
{
	m_pMNServerMgr		= new CMNServerManager;
	m_pMNPlayerMgr		= new CMNPlayerManager;
	m_pChannelMgr		= new CChannelManager;
	m_pPlayRoomMgr		= new CPlayRoomManager;
//	m_pFront			= new CFront;

//	m_pMNServerMgr->Init();	//
	m_pMNPlayerMgr->Init( MAXPLAYER_IN_MURIMNET );
	m_pChannelMgr->Init( MAXCHANNEL_IN_MURIMNET );
	m_pPlayRoomMgr->Init( MAXPLAYROOM_IN_MURIMNET );
//	m_pFront->Init( MAXPLAYER_IN_FRONT );	


/*///////////
//---for test
	PLAYROOM_INFO PlayRoomInfo;

	PlayRoomInfo.dwPlayRoomIndex	= 1;
	PlayRoomInfo.nPlayRoomKind		= 0;
	PlayRoomInfo.dwMaxPlayerNum		= 50;
	PlayRoomInfo.dwMaxPlayerPerTeam	= 20;
	甘逞滚 牢磊 眠啊 HS
	
	strcpy( PlayRoomInfo.strPlayRoomName, "公覆齿 抛胶飘 霸烙" );

	m_pPlayRoomMgr->CreatePlayRoom( &PlayRoomInfo );
*///////////

}


void CMurimNetSystem::Release()
{
	m_pMNPlayerMgr->Release();
//	m_pChannelMgr->Release();
	m_pPlayRoomMgr->Release();

	SAFE_DELETE( m_pMNServerMgr );
	SAFE_DELETE( m_pMNPlayerMgr );
	SAFE_DELETE( m_pChannelMgr );
	SAFE_DELETE( m_pPlayRoomMgr );
//	SAFE_DELETE( m_pFront );
}



void CMurimNetSystem::SelectChannelMode( CMNPlayer* pMNPlayer, int nChannelMode )
{
	switch( nChannelMode )
	{
	case eCNL_MODE_ID:
		{

		}
		break;
	case eCNL_MODE_CHANNEL:
		{
			m_pChannelMgr->SendMsg_ChannelList( pMNPlayer );
		}
		break;
	case eCNL_MODE_PLAYROOM:
		{
			m_pPlayRoomMgr->SendMsg_PlayRoomList( pMNPlayer );
		}
		break;
	}
}

⌨️ 快捷键说明

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