فهرست منبع

关卡ins文件里加挑战次数

cyzhao 10 ماه پیش
والد
کامیت
50a18f6c4a
2فایلهای تغییر یافته به همراه10 افزوده شده و 3 حذف شده
  1. 6 0
      Gameserver/App/model/User/Ins_GateInfo.php
  2. 4 3
      Gameserver/App/process/FightProc.php

+ 6 - 0
Gameserver/App/model/User/Ins_GateInfo.php

@@ -40,6 +40,12 @@ class Ins_GateInfo extends Object_ext {
      * @var type
      */
     public $plotStart = 0;
+    
+    /**
+     * 本关挑战次数
+     * @var type
+     */
+    public $fightNum = 0;
 
     /**
      * @return bool 是否主线关卡

+ 4 - 3
Gameserver/App/process/FightProc.php

@@ -259,10 +259,11 @@ class FightProc {
             if (ctx()->gates()->TowerGateInfo()->TodayChanNum < 1) {           # 剩余次数校验
                 Err(ErrCode::tower_timeNo);
             }
-            ctx()->gates()->TowerGateInfo()->TodayChanNum--;                        # 增加次数
-        } else {                                                                # 主线剧情
+            ctx()->gates()->TowerGateInfo()->TodayChanNum--;                    # 增加次数
+        } else {                                                                # 主线剧情           
+            ctx()->gates->GateList[$gateId]->fightNum += 1;
             my_Assert(ctx()->base()->Consume_tili($mo->cost_tili), ErrCode::notenough_tili);
-        }
+        }           
         UserProc::updateUserInfo();
         return Resp::ok(array("tili" => ctx()->baseInfo->tili, "tili_ts" => ctx()->baseInfo->tili_ts));
     }