Skip to content

Commit a9111f8

Browse files
authored
fix(CaiBotLite): 仅在连接未完成时过滤LoadNetModule包 (#1175)
* fix(CaiBotLite): block unexpected netmodule packet * feat(CaiBotLite): 在主线程新增登录队列,以缓解背包还原失败 * 更改 * fix review issues * fix(CaiBotLite): 仅在连接未完成时过滤 LoadNetModule包
1 parent 61f9f16 commit a9111f8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/CaiBotLite/CaiBotLite.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace CaiBotLite;
1313
// ReSharper disable once ClassNeverInstantiated.Global
1414
public class CaiBotLite(Main game) : TerrariaPlugin(game)
1515
{
16-
public static readonly Version VersionNum = new (2026, 07, 7, 0);
16+
public static readonly Version VersionNum = new (2026, 07, 7, 1);
1717
internal static int InitCode = -1;
1818
internal static bool DebugMode = Program.LaunchParameters.ContainsKey("-caidebug");
1919
private const string CharacterInfoKey = "CaiBotLite.CharacterInfo";

src/CaiBotLite/Common/LoginHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ internal static void OnGetData(GetDataEventArgs args)
104104
return;
105105
}
106106

107-
if (type == PacketTypes.LoadNetModule)
107+
if (player.State < (int) ConnectionState.Complete && type == PacketTypes.LoadNetModule)
108108
{
109109
var moduleId = (GetDataHandlers.NetModuleType)args.Msg.reader.ReadUInt16();
110110
// 客户端疑似异常发送 CreativePowers

0 commit comments

Comments
 (0)