zhanwencai 1 vuosi sitten
vanhempi
sitoutus
a7ccf6d7d7
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 1 2
      webServer/src/controller/ApiController.ts
  2. 2 1
      webServer/src/utils/msg.ts

+ 1 - 2
webServer/src/controller/ApiController.ts

@@ -1532,13 +1532,12 @@ class ApiController {
           itemList: itemList,
         });
       }
-
       let sendMsg = new Msg();
       sendMsg.connect(serverUrl, Account);
       logger.info("api cdk 发送服务器 param:", { param: param });
       new Promise((resolve) => {
         setTimeout(async () => {
-          sendMsg.CG_TEST_PROTO(body.account, param);
+          sendMsg.CG_TEST_PROTO(body.account, param, body.serverId);
         }, 1000);
       });
     } catch (error) {

+ 2 - 1
webServer/src/utils/msg.ts

@@ -217,12 +217,13 @@ export default class Msg {
         return true;
     }
 
-    CG_TEST_PROTO(account: string, param: string) {
+    CG_TEST_PROTO(account: string, param: string,server_id = 1) {
         console.log("发送CDK道具消息", this.websocket.readyState, this.isConnect);
         if (this.isConnect != true || this.websocket.readyState != 1) return false;
         this.sendBufLen = 4;
         this.writeString(account)
         this.writeString(param)
+        this.writeInt(server_id);
         this.sendBufDV.setInt16(2, 1259);
         this.sendBufDV.setInt16(0, this.sendBufLen - 4);
         this.send(1259);