Jump to content

How To Fix SEQUENCE mismatch header 254 C++


wezt

Recommended Posts

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:

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:

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;
}

 

With these changes the game won't send sequence for PONG packet, and you'll not have errors about it in syserr, at least i don't have them now.

P.S.: Probably it's not a best way. I'm open for suggestions :)

 

Regards

  • Love 2
Link to comment
Share on other sites

20 minutes ago, wezt said:

Yes, it is.

But the thing is that sequence tables are the same on server/client sides (in my case). And with disabled _IMPROVED_PACKET_ENCRYPTION_ I had to disable sequence packet.

The problem is from where start sequence tables.

Don't matter is are the same.  Sequence start from  , the start should look like this (Directly from my source ) :

 

    0xb1, 0x34, 0xa2, 0xe0, 0xae, 0x96, 0xd7, 0xfb, 0x67, 0xf1, 0x24, 0x93, 0xd8, 0x61, 0x8d, 0xc2,
    0x39, 0xd2, 0xe2, 0x0c, 0x36, 0x6a, 0x66, 0x60, 0x9f, 0xe0, 0x40, 0xed, 0xc7, 0x70, 0x13, 0xfd,

 

:)

In your sources looks like this :

    0xaf,0xca,0x8a,0xcf,0x48,0xa7,0x54,0xc7,0xd7,0xdf,0x1,0x25,0x72,0xf7,0x6f,0x84,
    0xbc,0x37,0x46,0xe3,0x24,0xda,0xa1,0xc8,0xee,0x36,0x7c,0x33,0x2f,0x98,0x76,0x5e,
 

 

Good luck to rewrite sequence table.

Link to comment
Share on other sites

  • 1 month later...
On 10.3.2016 at 2:33 AM, ds_aim said:

The problem is from where start sequence tables.

Don't matter is are the same.  Sequence start from  , the start should look like this (Directly from my source ) :

 

    0xb1, 0x34, 0xa2, 0xe0, 0xae, 0x96, 0xd7, 0xfb, 0x67, 0xf1, 0x24, 0x93, 0xd8, 0x61, 0x8d, 0xc2,
    0x39, 0xd2, 0xe2, 0x0c, 0x36, 0x6a, 0x66, 0x60, 0x9f, 0xe0, 0x40, 0xed, 0xc7, 0x70, 0x13, 0xfd,

 

:)

In your sources looks like this :

    0xaf,0xca,0x8a,0xcf,0x48,0xa7,0x54,0xc7,0xd7,0xdf,0x1,0x25,0x72,0xf7,0x6f,0x84,
    0xbc,0x37,0x46,0xe3,0x24,0xda,0xa1,0xc8,0xee,0x36,0x7c,0x33,0x2f,0x98,0x76,0x5e,
 

 

Good luck to rewrite sequence table.

And how can fix this ?

  • Love 1
Link to comment
Share on other sites

Announcements



×
×
  • 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.