Explorar el Código

Merge branch 'dev' of http://ylsjtt.game7000.com:3000/YLSJ/jzhj2024server into dev

cyzhao hace 10 meses
padre
commit
17002aacc9
Se han modificado 1 ficheros con 22 adiciones y 0 borrados
  1. 22 0
      Gameserver/App/Services/TestServer.php

+ 22 - 0
Gameserver/App/Services/TestServer.php

@@ -131,6 +131,28 @@ class TestServer {
         }
     }
 
+    /**
+     * 一键解锁所有剧情关卡
+     * @param type $uid
+     * @param type $zoneid
+     */
+    static public function PassAllPlotGates($uid, $zoneid) {
+        new Req('{"uid":"639743559740E0681F7E0EBBFE60B5C8","cmd":6000,"paras":[1722393844],"ts":1722393875,"zoneid":1,"SN":14,"TK":"4dbkqpf2","CV":"unityEditor"}');
+        req()->uid = $uid;
+        req()->zoneid = $zoneid;
+        $userRedisKey = MemKey_User::Info_hash($zoneid, $uid);
+        $gates = new Info_Gates(gMem()->hget($userRedisKey, 'gates'));
+        $nextId = $gateId = glc()->FirstGateId;
+        do {
+            if ($nextId != $gateId) {
+                $gateId = $nextId;
+            }
+            $nextId = $gates->UnlockNextPlotGate($gateId);                    # 解锁下一主线关卡
+        } while ($nextId != $gateId);
+        gMem()->hset($userRedisKey, 'gates', $gates);
+        return "last: $nextId";
+    }
+
     /**
      * 跳过当前任务步骤
      * @param type $uid