Selaa lähdekoodia

新增服务之间协议

249435196@qq.com 1 vuosi sitten
vanhempi
sitoutus
99fb2797e6
3 muutettua tiedostoa jossa 24 lisäystä ja 1 poistoa
  1. 9 0
      script/common/InnerHandler.lua
  2. 12 0
      script/common/InnerProto.lua
  3. 3 1
      script/common/InnerProtoID.lua

+ 9 - 0
script/common/InnerHandler.lua

@@ -32,3 +32,12 @@ function LW_HEARTBEAT(fd, msg)
     MiddleHeartBeat.LW_HEARTBEAT(fd, msg)
 end
 
+function LW_MOZHU_QUERY(fd,msg)
+    if _G.IS_MIDDLE ~= true then return end
+    MoZhuMiddleLogic.LW_MOZHU_QUERY(fd,msg)
+end
+
+function WL_MOZHU_QUERY(fd,msg)
+    if _G.IS_MIDDLE ~= true then return end
+    MoZhuMiddleLogic.LW_MOZHU_QUERY(fd,msg)
+end

+ 12 - 0
script/common/InnerProto.lua

@@ -9,3 +9,15 @@ LW_HEARTBEAT = {
 	{"svrIndexData",  "table"},
 }
 
+LW_MOZHU_QUERY = {
+  {"uuid",            "string"},
+  {"unionUuid",       "string"},
+}
+
+WL_MOZHU_QUERY = {
+  {"uuid",             "string"},
+  {"myRank",             "int"},
+  {"roleRank",         "table"},
+  {"unionRank",        "table"},
+  {"info",             "table"},
+}

+ 3 - 1
script/common/InnerProtoID.lua

@@ -1,3 +1,5 @@
 _ENV[1]='LW_HELLO'
 _ENV[2]='LW_DISCONNECT'
-_ENV[3]='LW_HEARTBEAT'
+_ENV[3]='LW_HEARTBEAT'
+_ENV[4] = 'LW_MOZHU_QUERY'
+_ENV[5] = 'WL_MOZHU_QUERY'