?? map.h
字號:
////////////////////////////////////////////////////////////////////////////////////////
// Map Array包府 (AOI 單撈鷗 棺 阿輛 Object包府)
//
//
// - 眠饒 Map Manager客 Map闌 備煉甫 函版矯糯
////////////////////////////////////////////////////////////////////////////////////////
#if !defined(_MAP_H_)
#define _MAP_H_
#include "SafeList.h" // STL LIST
#include "SafeMap.h" // STL MAP
#include "npc.h" // NPC Class
#include "tgaBase.h" // Added by ClassView
#include "Party.h"
// ------------------------------------------------------------------------------------
// Map Type
// ------------------------------------------------------------------------------------
#define MAP_NORMAL 0 // 老館甘
#define MAP_EVENT 1 // 頗萍傈儈 撈亥飄甘
#define MAP_AZIT 2 // 酒瘤飄 傈儈 甘
////////////////////////////////////////////////////////////////////////////////////////
// Map 包府
//
// 1. Map 柳澇啊/閡啊
//
// -> 眠饒 鷗 瘤開 楷悼矯 Link肺 葷儈
// 包訪 Struct 彌利拳 累訣 鞘夸
////////////////////////////////////////////////////////////////////////////////////////
#define CHK_MOVE 0x01
#define CHK_SAFEZONE 0x02
#define CHK_FIGHTZONE 0x04
#define CHK_PKZONE 0x08
typedef struct
{
// move 1 safezone 2 bIsFightzone 4 bIsPKZone 8
BYTE nCheckBit ;
BYTE nType; // 1 : PC / 2 : NPC / 3: SUMMONNPC /
DWORD dwHandle; // PC/NPC Handle
void* pObject; // Object Handle (Memory);
DWORD dwItemHandle; // Item Handle
void* pItemObject; // Item Object
} _GAME_MAP_ ;
////////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////////
class Map
{
// Attributes
public:
// Operations
public:
Map();
~Map();
protected:
// --------------------------------------------------------------------------------
// Memory Temp Handle 包府 (Memory俊 烙矯肺 葷儈且 Key慣鞭)
// --------------------------------------------------------------------------------
int m_nTempHandle; // Temp Handle
CRITICAL_SECTION m_MapLock; // MAP 傈儈 Critical Section
public:
CRITICAL_SECTION m_DBLock; // DB 傈儈 Critical Section
int m_nMaxLayer;
bool m_bHaveFightzone ;
// --------------------------------------------------------------------------------
// MAP狼 加己 瀝焊
// --------------------------------------------------------------------------------
class _MapConfig_
{
public:
int nMapType; // 甘狼 輛幅 - Duke Kim 2004-08-02
// ----------------------------------------------------------------------------
// DB 加己 瀝焊
// ----------------------------------------------------------------------------
int nMaxX;
int nMaxY;
BYTE nMapID;
DWORD dwMapSeq;
BOOL bPKMode;
CBeing GlobalMapProperty; // Map Global Property
char strMapTitle[20]; // MAP TITLE
_POINT StartPoint; // 納腐磐 矯累 困摹
// ----------------------------------------------------------------------------
// FightZone 甘老錠
// ----------------------------------------------------------------------------
bool m_bIsFightZone ;
char m_strMapFile[100];
_POINT PvpSpawnPoint[2]; // 葷捧厘俊輯 磷闌 版快 矯累 困摹 - Jason : 2004-07-02
//
// 酒瘤飄 包訪 悸潑
//
int nAzitMax;
#ifdef DEF_AZITSIMULATION
// 甘狼 穿利 技陛
__int64 m_i64TotalTax ;
#endif
} MapConfig[MAX_MAPLAYER];
// --------------------------------------------------------------------------------
// MAP Object
// --------------------------------------------------------------------------------
_GAME_MAP_ ** _MAP[MAX_MAPLAYER]; // AOI Control Memory
SafeMap * m_MapNPC[MAX_MAPLAYER]; // MAP NPC
struct
{
DWORD dwMapID;
_POINT StartPoint; // 納腐磐 矯累 困摹
} _LOBBY_ ;
struct
{
DWORD dwMapID;
_POINT StartPoint; // 納腐磐 矯累 困摹
} _HIDDENLOBBY_ ;
// --------------------------------------------------------------------------------
// Memory Pool ( Player / Skill / Item ) - 眠饒 Pool Class肺 盒府矯糯
// --------------------------------------------------------------------------------
SafeList m_PoolSocket; // SOCKET Memory POOL
SafeList m_PoolSkill; // SKILL Memory POOL
SafeList m_PoolItem; // ITEM Memory POOL
SafeList m_PoolParty; // PARTY Memory POOL
SafeList m_PoolGuild; // Guild Memory POOL
// --------------------------------------------------------------------------------
// Object Control ( NPC / Player List )
// --------------------------------------------------------------------------------
SafeMap m_MapAccountID; // 立加 ACCOUNT ID
SafeMap m_MapPlayerID; // 立加 PLYAER ID
SafeMap m_MapPlayerHandle; // 立加 PLAYER SOCKET
//#ifdef DEF_LOGOUT_TO_WORLD
// SafeMap m_MapTempPlayerID; // 烙矯 歷厘儈 AccountID
//#endif
SafeList m_LocationNPC; // NPC狼 檬扁 困摹 包府
SafeMap m_MapItem; // Field俊 積己等 Item包府
SafeMap m_MapParty; // PARTY 瀝焊 包府
SafeMap m_MapGuild; // 辨靛瀝焊 瀝焊 包府
public:
bool IsChannelMap( BYTE pLayer );
bool Initialize();
bool IsFightMap( BYTE pMapLayer );
void Delete_Player(char * pPlayerID);
//
// 酒瘤飄 殿廢 甘
//
#ifdef DEF_AZIT
void AzitNPC_Create(NPC *pNPC, _POINT_TILE pTile);
#endif
#ifdef DEF_AZITSIMULATION
void AddAzitTax(BYTE pMapLayer,int iAddTax)
{
if(pMapLayer >= m_nMaxLayer ) return ;
// 技啦 * 10父 飄扼啊 彌措 甸絹棵 薦 樂綽 技陛撈促.
// 技啦撈 5 撈擱 50父 飄扼啊 彌措 技陛撈促.
iAddTax = MIN( DEF_AZITTAX_DEFAULTRATE*100 * 100000 , iAddTax) / 2 ;
MapConfig[pMapLayer].m_i64TotalTax += iAddTax ;
}
#endif
////////////////////////////////////////////////////////////////////////////////////////
// Monster 殿廢 矯糯 (UNIQUE)
////////////////////////////////////////////////////////////////////////////////////////
void Monster_Create(NPC *pNPC)
{
if(pNPC->m_nMapLayer >= m_nMaxLayer ) return ;
m_MapNPC[pNPC->m_nMapLayer]->Insert( pNPC->m_dwHandle, pNPC ); // NPC包府 Map 秦寸 瀝焊甫 澇仿 矯糯
};
bool IsMoveable(BYTE pMapLayer, _POINT_TILE pPoint );
// --------------------------------------------------------------------------------
// 甘 扁夯 瀝焊 包府
// --------------------------------------------------------------------------------
#ifdef DEF_AZITSIMULATION
void SetMapConfig( BYTE pLayer, DWORD pMapSeq, BYTE pMapID, BOOL pPKMode, char * ,__int64 i64Tax );
#else // DEF_AZITSIMULATION
void SetMapConfig( BYTE pLayer, DWORD pMapSeq, BYTE pMapID, BOOL pPKMode, char * );
#endif // DEF_AZITSIMULATION
// --------------------------------------------------------------------------------
// 秦寸 Layer狼 MAP ID甫 館券 矯糯
// --------------------------------------------------------------------------------
int GetMapID(BYTE pLayer)
{
return MapConfig[ pLayer ].nMapID;
}
// --------------------------------------------------------------------------------
// 秦寸 Layer狼 MAP SEQ甫 館券 矯糯
// --------------------------------------------------------------------------------
DWORD GetMapSeq(BYTE pLayer)
{
return MapConfig[ pLayer ].dwMapSeq;
}
// --------------------------------------------------------------------------------
// 甘 加己 瀝焊 包府
// --------------------------------------------------------------------------------
void SetGlobalMapProperty( int pMapType,
BYTE pLayer,
int pMaxX,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -