Shutdown command fix

  • I noticed a problem on my server that one person had before, the problem is this;


    Bitte melden Sie sich an, um diesen Link zu sehen.


    As you can see, when I close the game with the shutdown command, if I try to log in, a packet error occurs and the game closes. I think this problem occurs after removing packet encryption (cryptopp).


    The cause of the problem is that AUTH core does not establish P2P connection like other cores, it only establishes connection with DB. Therefore, the P2P packet sent during the shutdown command does not reach AUTH.


    The solution is as follows;


    open game/cmd_general.cpp and search;

    Code
    1. ACMD(do_shutdown)


    and add this on top of " Shutdown(10); ";

    Code
    1. db_clientdesc->DBPacketHeader(HEADER_GD_GO_SHUTDOWN, 0, 0);


    open game/input_db.cpp and search;

    Code
    1. case HEADER_DG_WEDDING_END


    and add below this;

    Code
    1. case HEADER_DG_GO_SHUTDOWN:
    2. g_bNoMoreClient = true;
    3. break;


    open common/tables.h and search;

    Code
    1. HEADER_DG_ITEMAWARD_INFORMER = 180,



    and add below this;

    Code
    1. HEADER_DG_GO_SHUTDOWN = 182,


    search again;

    Code
    1. HEADER_GD_DELETE_AWARDID = 138,


    add below again this;

    Code
    1. HEADER_GD_GO_SHUTDOWN = 146,


    open db/clientmanager.cpp and search;

    Code
    1. case HEADER_GD_DELETE_AWARDID:


    add below this;

    Code
    1. case HEADER_GD_GO_SHUTDOWN:
    2. m_pkAuthPeer->EncodeHeader(HEADER_DG_GO_SHUTDOWN, 0, 0);
    3. break;


    Done.


    After the fix, it will now give a popup message instead of closing the game;


    Bitte melden Sie sich an, um diesen Link zu sehen.

    3 Mal editiert, zuletzt von Pedobear ()