[SOURCE] MapKey off/on per .ini

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • [SOURCE] MapKey off/on per .ini

      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

      Quellcode

      1. void CWorldMng::CheckMapKey( CUser* pUser, const char* szFileName, const char* szMapKey )
      2. {
      3. map<string, string>::iterator it = m_mapMapKey.find( szFileName );
      4. if( it != m_mapMapKey.end() )
      5. {
      6. if( !strcmpi( szMapKey, it->second.c_str() ) ) // ¸Ê ÀÎÁõ ¼º°ø!
      7. return;
      8. }
      9. #ifdef __VincitoreMapKey
      10. if(g_eLocal.GetState(EVE_VincitoreMapKey))
      11. {
      12. #endif
      13. #if __VER >= 15
      14. int x = int( pUser->GetPos().x ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
      15. int z = int( pUser->GetPos().z ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
      16. #else // __VER >= 15
      17. int x = int( pUser->GetPos().x ) / ( MAP_SIZE * MPU );
      18. int z = int( pUser->GetPos().z ) / ( MAP_SIZE * MPU );
      19. #endif // __VER >= 15
      20. char szLandFile[MAX_PATH] = {0,};
      21. if( pUser->GetWorld() )
      22. {
      23. strncpy( szLandFile, pUser->GetWorld()->m_szFileName, strlen( pUser->GetWorld()->m_szFileName ) - 4 );
      24. }
      25. Error( "Invalid Map Key - [User : %s, %07d], [Land : %s%02d-%02d]", pUser->GetName(), pUser->m_idPlayer, szLandFile, x, z );
      26. // mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
      27. if( ::GetLanguage() != LANG_GER )
      28. {
      29. g_DPSrvr.QueryDestroyPlayer( pUser->m_Snapshot.dpidCache, pUser->m_Snapshot.dpidUser, pUser->m_dwSerial, pUser->m_idPlayer );
      30. }
      31. // mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
      32. #ifdef __VincitoreMapKey
      33. }
      34. else
      35. {
      36. #if __VER == 8
      37. int x = int( pUser->GetPos().x ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
      38. int z = int( pUser->GetPos().z ) / ( MAP_SIZE * pUser->GetWorld()->m_iMPU );
      39. #else // __VER == 8
      40. int x = int( pUser->GetPos().x ) / ( MAP_SIZE * MPU );
      41. int z = int( pUser->GetPos().z ) / ( MAP_SIZE * MPU );
      42. #endif // __VER == 8
      43. char szLandFile[MAX_PATH] = {0,};
      44. if( pUser->GetWorld() )
      45. {
      46. strncpy( szLandFile, pUser->GetWorld()->m_szFileName, strlen( pUser->GetWorld()->m_szFileName ) - 4 );
      47. }
      48. // mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
      49. if( ::GetLanguage() != LANG_GER )
      50. {
      51. }
      52. // mulcom BEGIN100330 ¸Êº¯Á¶ È®ÀÎ µ¶ÀÏÀº Á¦¿Ü ½ÃÅ´
      53. }
      54. #endif
      55. }
      56. #endif // __WORLDSERVER
      57. #endif // __MAP_SECURITY
      Alles anzeigen



      flyffevent.h(unter EVE_RAINBOWRACE,)

      Quellcode

      1. #ifdef __VincitoreMapKey
      2. EVE_VincitoreMapKey,
      3. #endif //__VincitoreMapKey

      worldserver.cpp(unter #endif // __RAINBOW_RACE)

      Quellcode

      1. #ifdef __VincitoreMapKey
      2. else if( s.Token == "VINCITOREMAPKEY")
      3. {
      4. g_eLocal.SetState(EVE_VincitoreMapKey, 1);
      5. }
      6. #endif //__VincitoreMapKey


      versioncommon.h(unter EVE_RAINBOWRACE,)

      Quellcode

      1. #define __VincitoreMapKey //__VincitoreMapKey

      worldserver.ini im scriptordner

      Quellcode

      1. Für MapKey
      2. VINCITOREMAPKEY
      3. Ohne Map Key
      4. vincitoremapkey

      Credits:
      Alexsh (r*zone) für den Code um Map Key aus zu schalten.
      Me[Vincitore](Um per ini Auszuschalten)

      mfg. Vincitore
    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )