Hi,
da ich keine Lust habe immer neu zu Compilieren nur weil ich MapKey haben will, habe ich mich entschieden es per .ini zu machen.
(Noch nicht getestet)
Löscht die Funktion
void CWorldMng::CheckMapKey( CUser* pUser, const char* szFileName, const char* szMapKey )
bis
#endif // __WORLDSERVER
#endif // __MAP_SECURITY
Und fügt das ein
Code
void CWorldMng::CheckMapKey( CUser* pUser, const char* szFileName, const char* szMapKey )
{
map<string, string>::iterator it = m_mapMapKey.find( szFileName );
if( it != m_mapMapKey.end() )
{
if( !strcmpi( szMapKey, it->second.c_str() ) ) // ¸Ê ÀÎÁõ ¼º°ø!
return;
}
#ifdef __VincitoreMapKey
if(g_eLocal.GetState(EVE_VincitoreMapKey))
{
#endif
#if __VER >= 15
int x = int( pUser->GetPos().x ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
int z = int( pUser->GetPos().z ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
#else // __VER >= 15
int x = int( pUser->GetPos().x ) / ( MAP_SIZE * MPU );
int z = int( pUser->GetPos().z ) / ( MAP_SIZE * MPU );
#endif // __VER >= 15
char szLandFile[MAX_PATH] = {0,};
if( pUser->GetWorld() )
{
strncpy( szLandFile, pUser->GetWorld()->m_szFileName, strlen( pUser->GetWorld()->m_szFileName ) - 4 );
}
Error( "Invalid Map Key - [User : %s, %07d], [Land : %s%02d-%02d]", pUser->GetName(), pUser->m_idPlayer, szLandFile, x, z );
// mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
if( ::GetLanguage() != LANG_GER )
{
g_DPSrvr.QueryDestroyPlayer( pUser->m_Snapshot.dpidCache, pUser->m_Snapshot.dpidUser, pUser->m_dwSerial, pUser->m_idPlayer );
}
// mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
#ifdef __VincitoreMapKey
}
else
{
#if __VER == 8
int x = int( pUser->GetPos().x ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
int z = int( pUser->GetPos().z ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
#else // __VER == 8
int x = int( pUser->GetPos().x ) / ( MAP_SIZE * MPU );
int z = int( pUser->GetPos().z ) / ( MAP_SIZE * MPU );
#endif // __VER == 8
char szLandFile[MAX_PATH] = {0,};
if( pUser->GetWorld() )
{
strncpy( szLandFile, pUser->GetWorld()->m_szFileName, strlen( pUser->GetWorld()->m_szFileName ) - 4 );
}
// mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
if( ::GetLanguage() != LANG_GER )
{
}
// mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
}
#endif
}
#endif // __WORLDSERVER
#endif // __MAP_SECURITY
Alles anzeigen
flyffevent.h(unter EVE_RAINBOWRACE,)
worldserver.cpp(unter #endif // __RAINBOW_RACE)
Code
#ifdef __VincitoreMapKey
else if( s.Token == "VINCITOREMAPKEY")
{
g_eLocal.SetState(EVE_VincitoreMapKey, 1);
}
#endif //__VincitoreMapKey
versioncommon.h(unter EVE_RAINBOWRACE,)
worldserver.ini im scriptordner
Credits:
Alexsh (r*zone) für den Code um Map Key aus zu schalten.
Me[Vincitore](Um per ini Auszuschalten)
mfg. Vincitore