NL0bP/Archeage-Server-emulator

Reconnect

Closed this issue · 6 comments

NL0bP commented

Reconnect not work

这个问题我有注意到,并解决了。

Just adding a Google translation here:

English: "I have noticed this problem and solved it."

Russian: "Я заметил эту проблему и решил ее."

NL0bP commented

@yanlong-li, where is the error can you tell?
Chinese: 哪里是错误你能告诉我吗?

public static byte m_NumPck = 0

这个属性应当每个网络连接独自使用,而非所有网络连接共用。

你可以看

24c7d13

MY Code:

in file NetPacket.cs

private static byte m_NumPck ; //глобальный подсчет пакетов DD05
public static byte NumPck { get => m_NumPck; set => m_NumPck = value; }

in file ClientConnection.cs

public override void SendAsync(NetPacket packet)
{
packet.IsArcheAgePacket = true;
NetPacket.NumPck = m_NumPck;
base.SendAsync(packet);
m_NumPck = NetPacket.NumPck;
}

NL0bP commented

Fix reconnect bug. Thanks Yanlong-LI