mapinfo.cpp

来自「国内著名网络游戏dragon的服务端完整源码 内附完整数据库结构」· C++ 代码 · 共 34 行

CPP
34
字号
// MapInfo.cpp: implementation of the CMapInfo class.
//
//////////////////////////////////////////////////////////////////////

#include "..\stdAfx.h"
#include "MapInfo.h"

t_MapInfo MapInfo[MAX_MAP_];

t_MapInfo* GetMapInfoByMapName(const char *szMapName)
{	//< CSD-030506
	for (int i = 0;  i< MAX_MAP_; ++i)
	{
		if (!stricmp(MapInfo[i].mapfile, szMapName))
		{
			return &MapInfo[i];
		}
	}

	return NULL;
}	//> CSD-030506

t_MapInfo* GetMapInfoByMapPort(int nPort)
{	//< CSD-030506
	for (int i = 0;  i< MAX_MAP_; ++i)
	{
		if (MapInfo[i].port == nPort)
		{
			return &MapInfo[i];
		}
	}

	return NULL;
}	//> CSD-030506

⌨️ 快捷键说明

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