?? map.h
字號:
int pMaxY,
CBeing *pProperty,
char *pMapTitle,
_POINT pPoint,
_POINT* pPvpPoint);
int GetMapType( BYTE pLayer ) { return MapConfig[ pLayer ].nMapType; }
// --------------------------------------------------------------------------------
// 甘撈 加己 瀝焊甫 館券 矯糯
// --------------------------------------------------------------------------------
CBeing * GetGlobalMapProperty( BYTE pLayer ) { return &MapConfig[ pLayer].GlobalMapProperty; }
// --------------------------------------------------------------------------------
// 秦寸 Layer狼 Map 撈撫闌 館券 矯糯
// --------------------------------------------------------------------------------
char* GetMapTitle( BYTE pLayer ) { return MapConfig[ pLayer ].strMapTitle; }
void SetFightZoneProperty(_FIGHTZONE *,int iLayer = 0) ;
void SetLobby(int nLayer, int nX, int nY) ;
// Account ID肺 Socket Handle 茫扁
_LPSOCKET_FD Find_Account( char *pAccountID )
{
return (_LPSOCKET_FD)m_MapAccountID.Find( pAccountID );
}
void Delete_Account(char *pAccountID )
{
m_MapAccountID.Delete(pAccountID);
}
// Handle肺 Socket Handle 茫扁
_LPSOCKET_FD Find_Player( DWORD pHandle )
{
return (_LPSOCKET_FD)m_MapPlayerHandle.Find( pHandle );
}
// --------------------------------------------------------------------------------
// 救傈 瘤開 魄瀝
// 2003-11-3 加檔甫 困秦 牢扼牢欄肺 函版
// --------------------------------------------------------------------------------
bool IsSafeZone( int pMapLayer, _POINT_TILE pTile )
{
if( pMapLayer >= m_nMaxLayer ) return false;
if (pTile.x < 0 || pTile.x > MapConfig[pMapLayer].nMaxX ) return false;
if (pTile.y < 0 || pTile.y > MapConfig[pMapLayer].nMaxY ) return false;
// 2004.05.10 坷幅肺 Duke Kim眠啊
if( pMapLayer >= MAX_MAPLAYER ) return false;
if(_MAP[pMapLayer][pTile.x][pTile.y].nCheckBit & CHK_SAFEZONE) return true ;
else return false; // 救傈瘤開 咯何
}
// --------------------------------------------------------------------------------
// 框流烙 啊瓷 瘤開
// 2003-11-3 加檔甫 困秦 牢扼牢欄肺 函版
// --------------------------------------------------------------------------------
bool IsMoveable( int pMapLayer, int pX, int pY )
{
if( pMapLayer >= m_nMaxLayer ) return false;
if ( pX > MapConfig[pMapLayer].nMaxX ) return false;
if ( pY > MapConfig[pMapLayer].nMaxY ) return false;
return (_MAP[pMapLayer][pX][pY].nCheckBit & CHK_MOVE) ;
}
bool IsFightZone( int pMapLayer, int pX, int pY )
{
if( pMapLayer >= m_nMaxLayer ) return false;
if ( ( pX < 0 ) || pX > MapConfig[pMapLayer].nMaxX ) return false;
if ( ( pY < 0 ) || pY > MapConfig[pMapLayer].nMaxY ) return false;
if(_MAP[pMapLayer][pX][pY].nCheckBit & CHK_FIGHTZONE) return true;
else return false ;
}
// --------------------------------------------------------------------------------
// PK 瘤開 魄瀝
// 2003-11-3 加檔甫 困秦 牢扼牢欄肺 函版
// --------------------------------------------------------------------------------
bool IsPKZone( BYTE pMapLayer, _POINT_TILE pTile)
{
if( pMapLayer >= m_nMaxLayer ) return false;
if ( ( pTile.x < 0 ) || pTile.x > MapConfig[pMapLayer].nMaxX ) return false;
if ( ( pTile.y < 0 ) || pTile.y > MapConfig[pMapLayer].nMaxY ) return false;
if(_MAP[pMapLayer][pTile.x][pTile.y].nCheckBit & CHK_PKZONE) return true;
else return false ;
}
NPC * Find_NPC( BYTE & nMapLayer,DWORD & pHandle )
{
if(nMapLayer >= m_nMaxLayer )
return NULL ;
return ((NPC *)m_MapNPC[nMapLayer]->Find( pHandle ));
}
int Count_Player() { return m_MapPlayerHandle.m_SafeMap.size(); }
_LPSOCKET_FD Find_Player( char * pPlayerID );
void MAP_PlayerClear( DWORD pHandle );
bool CheckNPCMoveable( BYTE pMapIndex, int x, int y, BYTE nNPC = MAP_MONSTER);
void Monster_Create( NPC *pNPC, _POINT_TILE pTile, BYTE nNPC = MAP_MONSTER );
void NPC_Create( NPC *pNPC, _POINT_TILE pTile );
int CreateTempHandle(); // Temp Handle 積己
// --------------------------------------------------------------------------------
// Memory Pool包訪 Functions
// --------------------------------------------------------------------------------
bool CreateMemory();
void* Pool_Socket_Pop(); // Sokcet Pool
void Pool_Socket_Push( void *pPlayer );
CItem* Pool_Item_Pop(); // Item Pool
void Pool_Item_Push( void *pItem, int pDebugCode=0 );
void* Pool_Skill_Pop(); // Skill Pool
void Pool_Skill_Push( void *pSkill ,int i = 0 ); // Skill Push
void* Pool_Guild_Pop(); // Guild Pool
void Pool_Guild_Push( void *pGuild )
{
m_PoolGuild.Insert( (_LPGUILD)pGuild );
}
// --------------------------------------------------------------------------------
// Party包訪 Functions
// --------------------------------------------------------------------------------
void Party_Create( _LPZW_PARTYCREATE_REP pPacket ); // 頗萍 積己
void Party_Create( _LPZW_PARTYLIST_REP pPacket );
CParty * Find_Party( DWORD pHandle ) { return (CParty *)m_MapParty.Find( pHandle ); }
void Party_Delete( DWORD pHandle, bool bForce );
// --------------------------------------------------------------------------------
// Guild包訪 Functions
// --------------------------------------------------------------------------------
_LPGUILD Find_Guild(char * lpGuildName) { return (_LPGUILD) m_MapGuild.Find(lpGuildName); }
void Guild_Delete(char * lpGuildName);
// --------------------------------------------------------------------------------
// Map俊 IN/OUT
// --------------------------------------------------------------------------------
bool MAP_PlayerIn( _LPSOCKET_FD pSocketFD, _POINT &pPoint );
bool MAP_PlayerOut( PlayerInfo *pPlayer );
// --------------------------------------------------------------------------------
// AOI郴 PC & NPC Control
// --------------------------------------------------------------------------------
int AOI_PlayerMove( _LPSOCKET_FD pSocketFD, _POINT &pPoint ); // AOI郴 PC 澇仿
int AOI_NPCMove( NPC* pNpcHandle, _POINT pMoveTile , BYTE nNPC = MAP_MONSTER ); // AOI郴 NPC 澇仿
bool AOI_PlayerDelete( CPlayer *pPlayer );
// --------------------------------------------------------------------------------
// NOTENOTE: 2003-10-30 badajoa CriticalSection甫 臨撈扁 困茄 累訣闌 茄促.
// --------------------------------------------------------------------------------
void AOI_PlayerFastDelete( CPlayer *pPlayer ) ;
bool AOI_PlayerDelete( DWORD pHandle, BYTE pMapLayer, BYTE pX, BYTE pY );
// --------------------------------------------------------------------------------
// AOI Functions
// --------------------------------------------------------------------------------
int MapView( BYTE pMapLayer, DWORD pX, DWORD pY );
void AOI_NPCPut(NPC *pNpcHandle, _POINT_TILE pMoveTile,BYTE nNPC = MAP_MONSTER);
void AOI_NPCPoint( NPC* pNpcHandle , _POINT_TILE pTile );
int AOI_MovePoint( BYTE pMapLayer, _POINT_TILE pTile );
// --------------------------------------------------------------------------------
// AOI郴 Item Control
// --------------------------------------------------------------------------------
int AOI_ItemCreate( CItem *pItem, _POINT_TILE pTile );
void AOI_ItemDelete(CItem *pItem );
void AOI_BatchItemDelete(CItem *pItem );
// --------------------------------------------------------------------------------
// 澇仿 X,Y Map俊 困摹茄 PC Object甫 掘瀾
//
// - 付闌撈 酒囪 版快父 茫瀾
// --------------------------------------------------------------------------------
void * GetPCObject( BYTE pMapLayer, WORD pX, WORD pY)
{
if( _MAP[pMapLayer][pX][pY].nType == MAP_PC && // PC撈絆
!(_MAP[pMapLayer][pX][pY].nCheckBit & CHK_SAFEZONE)
)
{
return _MAP[pMapLayer][pX][pY].pObject;
}
return NULL;
}
// --------------------------------------------------------------------------------
// 澇仿 X,Y Map俊 困摹茄 PC Object甫 掘瀾
//
// - 付闌撈 酒囪 版快父 茫瀾
// --------------------------------------------------------------------------------
void * GetNPCObject( BYTE pMapLayer, WORD pX, WORD pY)
{
if( _MAP[pMapLayer][pX][pY].nType == MAP_MONSTER && // NPC撈絆
!(_MAP[pMapLayer][pX][pY].nCheckBit & CHK_SAFEZONE)
)
{
return _MAP[pMapLayer][pX][pY].pObject;
}
return NULL;
}
// --------------------------------------------------------------------------------
// 澇仿 X,Y Map俊 困摹茄 PC Object甫 掘瀾
//
// - 付闌撈 酒囪 版快父 茫瀾
// --------------------------------------------------------------------------------
void * GetTargetObject( BYTE pMapLayer, WORD pX, WORD pY,bool & IsNPC) ;
void * GetAllTargetObject( BYTE pMapLayer, WORD pX, WORD pY,bool & IsNPC) ;
};
#endif //#if !defined(_MAP_H_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -