Browse Source

fix: 解锁下一关算法

王刚 1 year ago
parent
commit
f0fb917048
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Gameserver/App/model/User/Info_Gates.php

+ 2 - 1
Gameserver/App/model/User/Info_Gates.php

@@ -157,10 +157,11 @@ class Info_Gates extends Object_ext {
         $nextId = $gateId;
         foreach (GameConfig::gate() as $k => $v) {
             isEditor() and $v = new \sm_gate();
-            if ($v->unlockGateId == $this->CurrentGateId) {
+            if ($v->unlockGateId == $gateId) {
                 $nextId = $v->gateId;
             }
         }
+//        echoLine("解锁下一关卡 $nextId");
         if (Ins_GateInfo::gateNum($this->UnlockedGatesMaxId) < Ins_GateInfo::gateNum($nextId)# 下一关尚未解锁
                 && !StlUtil::dictHasProperty($this->GateList, $nextId)) {
 //            $this->CurrentGateId = $nextId;                                   # 不再自动推到下一关, -2024.5.31