Jump to content

Haruka

Inactive Member
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Haruka

  1. Follow me!

    Server:

    In game/packet_info.cpp find this "Set(HEADER_CG_PONG, sizeof(BYTE), "Pong", true);"

    replace with

    "Set(HEADER_CG_PONG, sizeof(BYTE), "Pong", false);"

    Client:

    In PythonNetworkStream.cpp find function "bool CPythonNetworkStream::RecvPingPacket()" and change to:

    Spoiler
    
    bool CPythonNetworkStream::RecvPingPacket()
    {
    	Tracef("recv ping packet. (securitymode %u)\n", IsSecurityMode());
    
    	TPacketGCPing kPacketPing;
    
    	if (!Recv(sizeof(TPacketGCPing), &kPacketPing))
    		return false;
    
    	m_dwLastGamePingTime = ELTimer_GetMSec();
    
    	TPacketCGPong kPacketPong;
    	kPacketPong.bHeader = HEADER_CG_PONG;
    
    	if (!Send(sizeof(TPacketCGPong), &kPacketPong))
    		return false;
    
    	//if (IsSecurityMode())
    	//	return SendSequence();
    	//else
    	return true;
    }

    In AccountConnector.cpp find "bool CAccountConnector::__AuthState_SendPong()" and change to:

    Spoiler
    
    bool CAccountConnector::__AuthState_SendPong()
    {
    	TPacketCGPong kPacketPong;
    	kPacketPong.bHeader = HEADER_CG_PONG;
    	if (!Send(sizeof(kPacketPong), &kPacketPong))
    		return false;
    
    	//if (IsSecurityMode())
    	//return SendSequence();
    
    	return true;
    }

     

    Hello,

    I've seen a lot of questions about header 254 error in server logs, and all what I've found were diffs for binaries. Below you will find a way how to fix it in source.

    Let's start:

    SERVER:

    In game/packet_info.cpp find this "Set(HEADER_CG_PONG, sizeof(BYTE), "Pong", true);" replace with "Set(HEADER_CG_PONG, sizeof(BYTE), "Pong", false);"

    CLIENT:

    All changes will be in UserInterface folder:

    In PythonNetworkStream.cpp find function "bool CPythonNetworkStream::RecvPingPacket()" and change to:

    bool CPythonNetworkStream::RecvPingPacket()
    {
    	Tracef("recv ping packet. (securitymode %u)\n", IsSecurityMode());
    
    	TPacketGCPing kPacketPing;
    
    	if (!Recv(sizeof(TPacketGCPing), &kPacketPing))
    		return false;
    
    	m_dwLastGamePingTime = ELTimer_GetMSec();
    
    	TPacketCGPong kPacketPong;
    	kPacketPong.bHeader = HEADER_CG_PONG;
    
    	if (!Send(sizeof(TPacketCGPong), &kPacketPong))
    		return false;
    
    	//if (IsSecurityMode())
    	//	return SendSequence();
    	//else
    	return true;
    }

     

    In AccountConnector.cpp find

    "bool CAccountConnector::__AuthState_SendPong()"

    and change to:

    bool CAccountConnector::__AuthState_SendPong()
    {
    	TPacketCGPong kPacketPong;
    	kPacketPong.bHeader = HEADER_CG_PONG;
    	if (!Send(sizeof(kPacketPong), &kPacketPong))
    		return false;
    
    	//if (IsSecurityMode())
    	//return SendSequence();
    
    	return true;
    }

     

    In GuildMarkDownloader.cpp find

    "bool CGuildMarkDownloader::__LoginState_RecvPing()"

    and change to:

    Spoiler
    
    bool CGuildMarkDownloader::__LoginState_RecvPing()
    {
    	TPacketGCPing kPacketPing;
    
    	if (!Recv(sizeof(kPacketPing), &kPacketPing))
    		return false;
    
    	TPacketCGPong kPacketPong;
    	kPacketPong.bHeader = HEADER_CG_PONG;
    
    	if (!Send(sizeof(TPacketCGPong), &kPacketPong))
    		return false;
    
    	//if (IsSecurityMode())
    	//return SendSequence();
    	//else
    	return true;
    }

    In GuildMarkUploader.cpp find

    "bool CGuildMarkUploader::__LoginState_RecvPing()"

    and change to:

    Spoiler
    
    bool CGuildMarkUploader::__LoginState_RecvPing()
    {
    	TPacketGCPing kPacketPing;
    	if (!Recv(sizeof(kPacketPing), &kPacketPing))
    		return false;
    
    	TPacketCGPong kPacketPong;
    	kPacketPong.bHeader = HEADER_CG_PONG;
    
    	if (!Send(sizeof(TPacketCGPong), &kPacketPong))
    		return false;
    
    	//if (IsSecurityMode())
    	//return SendSequence();
    	//else
    	return true;
    }

     

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.