Browse Source

查找用户信息功能

Alex 1 year ago
parent
commit
6c0e5ac872
2 changed files with 49 additions and 30 deletions
  1. 11 7
      yyyy_js/assets/main/index.jsc
  2. 38 23
      yyyy_js/python-server/script.js

+ 11 - 7
yyyy_js/assets/main/index.jsc

@@ -366802,19 +366802,19 @@ window.__require = function e(methodPath, cacheExports, exportKeyArray) {
         "../../../../scripts/common/MultiTableHelper": "MultiTableHelper",
         "../../components/lobby/cv": "cv"
     }],
-    NetWork: [function (e, t, n) {
+    NetWork: [function (moduleLoader, moduleKey, moduleInstance) {
         "use strict";
-        cc._RF.push(t, "e93a6atiglGeIIneILp46VP", "NetWork");
+        cc._RF.push(moduleKey, "e93a6atiglGeIIneILp46VP", "NetWork");
         var o = this && this.__decorate || function (e, t, n, o) {
             var i, r = arguments.length, a = r < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, n) : o;
             if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, o); else for (var s = e.length - 1; s >= 0; s--) (i = e[s]) && (a = (r < 3 ? i(a) : r > 3 ? i(t, n, a) : i(t, n)) || a);
             return r > 3 && a && Object.defineProperty(t, n, a), a;
         };
-        Object.defineProperty(n, "__esModule", {
+        Object.defineProperty(moduleInstance, "__esModule", {
             value: !0
         });
-        n.NetWork = void 0;
-        var i = e("./ByteArray"), r = e("../../components/game/cowboy/CowboyWsNetWork"), a = e("../../components/lobby/cv"), s = e("../plugg/aesHandler"), c = e("../tools/HashMap"), l = e("./BitHandler"), u = e("../../components/game/pokerMaster/PokerMasterNetWork"), d = cc._decorator, p = d.ccclass, h = (d.property,
+        moduleInstance.NetWork = void 0;
+        var i = moduleLoader("./ByteArray"), r = moduleLoader("../../components/game/cowboy/CowboyWsNetWork"), a = moduleLoader("../../components/lobby/cv"), s = moduleLoader("../plugg/aesHandler"), c = moduleLoader("../tools/HashMap"), l = moduleLoader("./BitHandler"), u = moduleLoader("../../components/game/pokerMaster/PokerMasterNetWork"), d = cc._decorator, p = d.ccclass, netWorkInstance = (d.property,
             function () {
                 function e() {
                     this.wSocket = null;
@@ -366891,6 +366891,7 @@ window.__require = function e(methodPath, cacheExports, exportKeyArray) {
                     }
                 };
                 e.prototype.sendMsg = function (e, t, n, o, i) {
+                    console.log(`====>>>>sendMsg `,e,t,n,o,i);
                     if (this.sendPackage(e, t, n, o, i)) {
                         a.default.LoadingView.addWebSocketMsg(i, t);
                         return !0;
@@ -366899,6 +366900,8 @@ window.__require = function e(methodPath, cacheExports, exportKeyArray) {
                     return !1;
                 };
                 e.prototype.sendPackage = function (e, t, n, o, c) {
+                    console.log(`====>>>>sendPackage `,e,t,n,o,c);
+
                     var l, d = this.isEncrypt(c);
                     d && (l = s.aesHandler.EncryptBytes(e));
                     var p = new i.ByteArray();
@@ -366918,6 +366921,7 @@ window.__require = function e(methodPath, cacheExports, exportKeyArray) {
                     return c == a.default.Enum.GameId.PokerMaster ? window.CurrentUserInfo.user.wasUserInDiamondGame ? u.PokerMasterNetWork.getInstance().send(p.getbuffer()) : this.send(p.getbuffer()) : c == a.default.Enum.GameId.CowBoy && window.CurrentUserInfo.user.wasUserInDiamondGame ? r.CowboyWsNetWork.getInstance().send(p.getbuffer()) : this.send(p.getbuffer());
                 };
                 e.prototype.send = function (e) {
+                    console.log(`====>>>>send `,e);
                     if (!this.wSocket) return !1;
                     if (this.wSocket.readyState == WebSocket.OPEN) {
                         this.wSocket.send(e);
@@ -367107,7 +367111,7 @@ window.__require = function e(methodPath, cacheExports, exportKeyArray) {
                 var t;
                 return t = o([p], e);
             }());
-        n.NetWork = h;
+        moduleInstance.NetWork = netWorkInstance;
         cc._RF.pop();
     }, {
         "../../components/game/cowboy/CowboyWsNetWork": "CowboyWsNetWork",
@@ -380382,7 +380386,7 @@ window.__require = function e(methodPath, cacheExports, exportKeyArray) {
                 this.registerMessage(e, t, s.default.Enum.GameId.PokerMaster);
             };
             t.prototype._sendNetMsg = function (e, t, n, o) {
-                console.log("pokermaster_proto-send-" + n + "-" + e + " = " + t);
+                console.log(`====>>>> pokermaster_proto-send-`, n + "-" + e + " = " + t);
                 var i = this.encodePB(e, t);
                 return this.sendMsg(i, n, o, s.default.Enum.SeverType.SeverType_Game, s.default.Enum.GameId.PokerMaster);
             };

+ 38 - 23
yyyy_js/python-server/script.js

@@ -161,25 +161,25 @@ function hookPokerMasterSocket(){
 //hookPokerMasterSocket();
 
 
-function hookRoomManagerRequestJoinRoom(){
-    let RoomManager = window.__require("RoomManager")
-    if(RoomManager){
-        let _RoomManager = RoomManager.RoomManager.getInstance()
-        let originRequestJoinRoom = _RoomManager.RequestJoinRoom
-        _RoomManager.RequestJoinRoom = function(e,t,n,i,r){
-            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+e);
-            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+t);
-            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+n);
-            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+i);
-            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+r);
-            printStack();
-            originRequestJoinRoom.call(_RoomManager,e,t,n,i,r);
-        }
-    }else{
-        console.log(`====>>>>RoomManager未找到`);
-        lws.send("====>>>>RoomManager未找到");
-    }
-}
+//function hookRoomManagerRequestJoinRoom(){
+//    let RoomManager = window.__require("RoomManager")
+//    if(RoomManager){
+//        let _RoomManager = RoomManager.RoomManager.getInstance()
+//        let originRequestJoinRoom = _RoomManager.RequestJoinRoom
+//        _RoomManager.RequestJoinRoom = function(e,t,n,i,r){
+//            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+e);
+//            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+t);
+//            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+n);
+//            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+i);
+//            lws.send("====>>>>重写了RequestJoinRoom,看看房间号是些什么东西:"+r);
+//            printStack();
+//            originRequestJoinRoom.call(_RoomManager,e,t,n,i,r);
+//        }
+//    }else{
+//        console.log(`====>>>>RoomManager未找到`);
+//        lws.send("====>>>>RoomManager未找到");
+//    }
+//}
 //hookRoomManagerRequestJoinRoom();
 
 function openPokerMasterGameWithRoomId(){
@@ -187,7 +187,7 @@ function openPokerMasterGameWithRoomId(){
     if (window.HMFExtension && typeof window.HMFExtension.openPokerMasterGameWithRoomId === "function") {
         let originFunc = window.HMFExtension.openPokerMasterGameWithRoomId;
         // 调用函数并传递roomId和exitWhere参数
-        var roomId = 719936; // 示例房间ID
+        var roomId = 716619; // 示例房间ID
 //        var exitWhere = "lobby"; // 示例退出位置
 //        window.HMFExtension.openPokerMasterGameWithRoomId=function(roomId, exitWhere){
 //            lws.send("====>>>>重写了openPokerMasterGameWithRoomId,看看房间号是什么东西:"+roomId);
@@ -196,13 +196,28 @@ function openPokerMasterGameWithRoomId(){
 //        }
         originFunc.call(window.HMFExtension,roomId,"");
 
-        setTimeout(function(){
-            window.__require("PokerMasterHallSocket").PokerMasterHallSocket.getInstance().requestLeaveRoom();
-        },6000);
+//        setTimeout(function(){
+//            window.__require("PokerMasterHallSocket").PokerMasterHallSocket.getInstance().requestLeaveRoom();
+//        },16000);
     } else {
         console.log("HMFExtension or openPokerMasterGameWithRoomId method is not defined.");
     }
 }
 openPokerMasterGameWithRoomId();
 
+//function getData() {
+//    var t = {
+//        userId: 22542051,
+//        roomId: 716619,
+//        targetUserId: 5741489,
+//        playType: 0
+//    };
+//    HMFHTTPClient.sendByPromise(new HMFRequest("/battle/getUserInfo", t)).then(function (data) {
+//        console.log("====>>>>获取到的数据:", data);
+//        lws.send("====>>>>获取到的数据:"+JSON.stringify(data));
+//    });
+//}
+
+//getData();
+
 console.log("====>>>>远程脚本加载结束");