refactor: packet

This commit is contained in:
pk5ls20 committed 2025-01-11 16:23:02 +08:00
1 parent f51f3b9861
commit 5778daeb60
10 files changed
+78 -65

No files matched your search

+5 -5
View File
@@ -7,19 +7,19 @@ import { PacketOperationContext } from "@/core/packet/context/operationContext";
import { PacketMsgConverter } from "@/core/packet/message/converter";
export class PacketContext {
readonly msgConverter: PacketMsgConverter;
readonly napcore: NapCoreContext;
readonly logger: PacketLogger;
readonly client: PacketClientContext;
readonly highway: PacketHighwayContext;
readonly msgConverter: PacketMsgConverter;
readonly operation: PacketOperationContext;
constructor(core: NapCatCore) {
this.napcore = new NapCoreContext(core);
this.logger = new PacketLogger(this);
this.client = new PacketClientContext(this);
this.highway = new PacketHighwayContext(this);
this.msgConverter = new PacketMsgConverter();
this.napcore = new NapCoreContext(core);
this.logger = new PacketLogger(this.napcore);
this.client = new PacketClientContext(this.napcore, this.logger);
this.highway = new PacketHighwayContext(this.napcore, this.logger, this.client);
this.operation = new PacketOperationContext(this);
}
}