瀏覽代碼

fix: 解锁下一关

王刚 1 年之前
父節點
當前提交
32212f39d0
共有 1 個文件被更改,包括 15 次插入15 次删除
  1. 15 15
      Gameserver/App/process/FightProc.php

+ 15 - 15
Gameserver/App/process/FightProc.php

@@ -554,7 +554,7 @@ class FightProc {
             TaskProc::OnPassGate_X($gateId);                                    # 刷新任务进度: 通关第X关
 
             if (Ins_GateInfo::GateTypeFromId($gateId) == Enum_GateType::MainStoryGate) {
-                ctx()->gates()->UnlockNextPlotGate();                           # 解锁下一主线关卡
+                ctx()->gates()->UnlockNextPlotGate($gateId);                    # 解锁下一主线关卡
 //                ctx()->gates()->UnlockMainChallengeGate($gateId);              # 挑战关卡解锁逻辑. -gwang 2024年4月15日
             } else {                                                            # 不是主线关卡, 暂时没有其他逻辑
             }
@@ -728,18 +728,18 @@ class FightProc {
         $uid = req()->uid;
         $arr = array();
         $power = self::countUserFightPower();
-        $rankPower = gMem()->zscore($memKey,$uid);
-        
-        if($rankPower == null){
+        $rankPower = gMem()->zscore($memKey, $uid);
+
+        if ($rankPower == null) {
             $rankPower = 0;
-        }             
-        
+        }
+
         if ($power > $rankPower) {
             $arr["$uid"] = $power;
-            $mem->zadd($memKey, $arr);           
+            $mem->zadd($memKey, $arr);
             self::IsAchievedFightPower_PassReward($power);
         }
-        
+
         $length = $mem->zlen($memKey);
         if ($length > glc()->Rank_FightPower_OnListRank) {
             $num = $length - glc()->Rank_FightPower_OnListRank;
@@ -783,12 +783,12 @@ class FightProc {
             }
         }
 
-        $selfRank = self::initOtherUidRankInfo(req()->uid, $selfExtraInfo,$type);
+        $selfRank = self::initOtherUidRankInfo(req()->uid, $selfExtraInfo, $type);
 
         $retArr = array();
         if (count($list) > 0) {
             foreach ($list as $uid => $score) {
-                $rankInfo = self::initOtherUidRankInfo($uid, $score,$type);
+                $rankInfo = self::initOtherUidRankInfo($uid, $score, $type);
                 if ($rankInfo->uid == req()->uid) {
                     $selfIsHasRank = 1;
                     $selfRank = $rankInfo;
@@ -814,15 +814,15 @@ class FightProc {
      * @param type $score
      * @return \loyalsoft\Ins_rank
      */
-    static function initOtherUidRankInfo($uid, $score,$type = null) {
+    static function initOtherUidRankInfo($uid, $score, $type = null) {
         $ins_rank = new Ins_rank();
-                    
-        if($type == 1){
+
+        if ($type == 1) {
             $lv = gMem()->zrevrank(MemKey_GameRun::Rank_MainGateIndex_Zone_zset(req()->zoneid), $uid);
         } else {
             $lv = gMem()->zrevrank(MemKey_GameRun::Rank_FightPower_Zone_zset(req()->zoneid), $uid);
         }
-        
+
         if ($lv == null) {
             $lv = 0;
         }
@@ -880,7 +880,7 @@ class FightProc {
      * 战力奖励是否达成
      */
 
-    public static function IsAchievedFightPower_PassReward($power) {    
+    public static function IsAchievedFightPower_PassReward($power) {
         $rewards = GameConfig::rank_fightpowerreward();
 
         $memKey = MemKey_GameRun::RankReward_FightPower_Zone_hash(req()->zoneid);