王刚 преди 1 година
родител
ревизия
6c08077073

+ 36 - 47
Gameserver/App/base/ErrCode.php

@@ -269,9 +269,9 @@ class ErrCode {
      * 资源点不足
      */
     const notenough_resPoint = 3048;
-    
+
     /**
-     * 
+     *
      */
     const notenough_item = 3049;
 // </editor-fold>
@@ -332,124 +332,113 @@ class ErrCode {
      * 没有这种奖励类型
      */
     const user_reward_typeno = 3031;
-
 // </editor-fold>
 //
+//   // <editor-fold defaultstate="collapsed" desc="    关卡     ">
 
-//   // <editor-fold defaultstate="collapsed" desc="    关卡     ">    
+    const gate_NoUserGateInfo = 3201;
 
-    const user_Gate_NoUserGateInfo = 3201;  
-    
     /**
-     * 
+     *
      */
-    const user_Gate_GateNoUnlock = 3202;
-    
+    const gate_GateNoUnlock = 3202;
+
     /**
      * 奖励已经被领取
      */
-    const user_Gate_GatePriceHasReceive = 3203;
-    
+    const gate_GatePriceHasReceive = 3203;
+
     /**
      * 不能扫荡
      */
-    const user_Gate_NoSweep = 3204;
-    
+    const gate_NoSweep = 3204;
+
     /**
      * 今日扫荡已达最大次数
      */
-    const user_Gate_SweepMaxNum_limit = 3205;
+    const gate_SweepMaxNum_limit = 3205;
+
+    /**
+     * 挑战关卡: 今日挑战次数已用完
+     */
+    const tower_timeNo = 3210;
+
 // </editor-fold>
 //
-    
-//   // <editor-fold defaultstate="collapsed" desc="    store 3300    ">    
+//   // <editor-fold defaultstate="collapsed" desc="    store 3300    ">
 
     /**
      * 不存在该装备
      */
     const user_store_NoEquip = 3301;
-    
+
     /**
      * 背包
      */
     const user_store_NoItem = 3302;
-    
+
     /**
      * 宝石不能被镶嵌
      */
     const user_store_GemCanotSet = 3303;
-    
+
     /**
      * 不存在可以替换的宝石
      */
     const user_store_NoExistGemReplace = 3304;
-    
+
     /**
      * 同一件装备无法镶嵌多个技能相同的宝石
      */
-    const user_store_SameGemCanotEquip= 3305;
-    
+    const user_store_SameGemCanotEquip = 3305;
+
     /**
      * 前端给的宝石存在不能合成的宝石
      */
     const user_store_GemCanotCompose = 3306;
-    
     const user_store_NotExistGem = 3307;
-    
     const user_store_GemNotXilian = 3308;
 // </editor-fold>
 //
-    
-    
-//   // <editor-fold defaultstate="collapsed" desc="    shop 3400    ">    
+//   // <editor-fold defaultstate="collapsed" desc="    shop 3400    ">
 
     const user_shop_NotRepeatBuy = 3401;
-    
     const user_shop_LimitNum = 3402;
-    
+
     /**
      * 活动过期
      */
     const user_shop_activeExpire = 3403;
-    
     const user_shop_FreeNumLimit = 3404;
-    
     const user_shop_buyTiliNumLimit = 3405;
     const user_shop_GuanggaoGetTiliNumLimit = 3406;
 // </editor-fold>
 //
-    
-//   // <editor-fold defaultstate="collapsed" desc="    active 3500    ">    
+//   // <editor-fold defaultstate="collapsed" desc="    active 3500    ">
 
     /**
      * 奖励已经领过
      */
     const active_hasgetted = 3501;
-    
+
     /**
      * 无效的时间内不能领取奖励
      */
     const active_day7_expired = 3502;
-    
+
 // </editor-fold>
-//    
-    
-//   // <editor-fold defaultstate="collapsed" desc="    task 3600    ">    
+//
+//   // <editor-fold defaultstate="collapsed" desc="    task 3600    ">
 
     /**
      * 任务不存在
      */
     const task_NoExist = 3601;
-    
-    const task_CanotPriceReviced= 3602;
-    
-    const task_PriceRepeatReviced= 3603;
-       
-// </editor-fold>
-//  
-    
-    
+    const task_CanotPriceReviced = 3602;
+    const task_PriceRepeatReviced = 3603;
 
+// </editor-fold>
+//
 // <editor-fold defaultstate="collapsed" desc="    反射方法    ">
 
     /**

+ 1 - 1
Gameserver/App/main.php

@@ -91,7 +91,7 @@ function gMongo() {
 
 /**
  * 简化提取全局变量的写法
- * @return \globalsettings
+ * @return \sm_globalsettings
  */
 function glc() {
     return GameConfig::globalsettings();

+ 1 - 1
Gameserver/App/model/Const/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-05-14 10:31:17
+ // 日期: 2024-05-14 15:04:56
 ////////////////////
 
 /**

+ 1 - 1
Gameserver/App/model/Const/sm_gate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-05-11 17:10:38
+ // 日期: 2024-05-14 14:32:56
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_globalsettings.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-05-14 10:02:44
+ // 日期: 2024-05-14 10:32:56
 ////////////////////
 
 

+ 1 - 6
Gameserver/App/model/Const/sm_plots.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-05-07 15:32:55
+ // 日期: 2024-05-14 15:03:36
 ////////////////////
 
 
@@ -115,11 +115,6 @@ class sm_plots
     */
     public $recycleEffect;
 
-    /**
-    * @var DateTime 上次修改时间 default(CURRENT_TIMESTAMP) 
-    */
-    public $lastupdate;
-
     /**
     * @var Single 打印字幕速度 default(0.1) 
     */

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

@@ -133,7 +133,7 @@ class Info_Gates extends Object_ext {
      */
     public function CurGateInfo() {
         $gateId = $this->CurrentGateId;
-        my_Assert(StlUtil::dictHasProperty($this->GateList, $gateId), ErrCode::user_Gate_NoUserGateInfo);
+        my_Assert(StlUtil::dictHasProperty($this->GateList, $gateId), ErrCode::gate_NoUserGateInfo);
         $gateInfo = ctx()->gates->GateList->$gateId;
         return $gateInfo;
     }

+ 14 - 9
Gameserver/App/model/User/Ins_TowerGateInfo.php

@@ -1,5 +1,4 @@
 <?php
- 
 
 namespace loyalsoft;
 
@@ -8,13 +7,19 @@ namespace loyalsoft;
  * @author gwang
  */
 class Ins_TowerGateInfo {
-   /**
-    * @var int 当前层数
-    */
-   public $CurLayer = 0;
 
-   /**
-    * @var type 当天挑战次数
-    */
-   public $TodayChanNum = 0;
+    /**
+     * @var int 当前层数
+     */
+    public $CurLayer = 0;
+
+    /**
+     * @var int 当天挑战次数
+     */
+    public $TodayChanNum = 0;
+
+    /**
+     * @var int 当天刷新技能次数
+     */
+    public $RefreshSkillTimes = 0;
 }

+ 33 - 29
Gameserver/App/process/FightProc.php

@@ -44,12 +44,12 @@ class FightProc {
      */
     public static function FightSweep() {
         //list($gateId) = req()->paras;
-        my_Assert(ctx()->gates->UnlockedGatesMaxId != 0, ErrCode::user_Gate_NoSweep);
+        my_Assert(ctx()->gates->UnlockedGatesMaxId != 0, ErrCode::gate_NoSweep);
         $mo = GameConfig::gate_getItem(ctx()->gates->UnlockedGatesMaxId);
         $costTili = glc()->sweep_cost_tili;
         my_Assert(ctx()->baseInfo->tili >= $costTili, ErrCode::notenough_tili);
         $max = glc()->sweepMaxNum;
-        my_Assert(ctx()->gates->fightSweepNum < $max, ErrCode::user_Gate_SweepMaxNum_limit);
+        my_Assert(ctx()->gates->fightSweepNum < $max, ErrCode::gate_SweepMaxNum_limit);
         ctx()->gates->fightSweepNum += 1;
         ctx()->baseInfo->Consume_tili($costTili);
         $prizeArr = array();
@@ -321,7 +321,13 @@ class FightProc {
      * 6809 挑战关卡: 刷新初始技能(扣除免费次数/cost)
      */
     public static function TowerRefreshSkills() {
+        list($isFree) = req()->paras;                                           # 参数解析
+        if ($isFree) {
+//            if()
+        } else {
 
+        }
+        return Resp::ok();
     }
 
     /**
@@ -329,14 +335,12 @@ class FightProc {
      * @return type
      */
     public static function ChallengeGateStartFight() {
-        list($type, $id) = req()->paras;
-
+        if (ctx()->gates()->TowerGateInfo()->TodayChanNum > glc()->tower_daily_chanceNum) {
+            return Resp::err(ErrCode::tower_timeNo);
+        }
+        ctx()->gates()->TowerGateInfo()->TodayChanNum++;
         UserProc::updateUserInfo();
-        $ret = array(
-            'store' => ctx()->store,
-            'gates' => ctx()->gates,
-        );
-        return Resp::ok($ret);
+        return Resp::ok();
     }
 
     /**
@@ -344,23 +348,23 @@ class FightProc {
      * @return type
      */
     public static function GateChallengePriceReviced() {
-        list($zhangjieId, $gateId) = req()->paras;
-
-        $gateMo = GameConfig::gate_getItem($gateId);
-        my_Assert($gateMo != null, ErrCode::err_const_no);
-
-        if (!StlUtil::dictHasProperty(ctx()->gates->GatesChallengeRecord, $zhangjieId)) {
-            ctx()->gates->GatesChallengeRecord->$zhangjieId = array();
-        }
-
-        my_Assert(!in_array($gateId, ctx()->gates->GatesChallengeRecord->$zhangjieId), ErrCode::user_Gate_GatePriceHasReceive);
-        my_Assert(in_array($gateMo->challengeUnlockId, ctx()->gates->GatesChallengeRecord->$zhangjieId), ErrCode::user_Gate_GateNoUnlock);
-
-        ctx()->gates->GatesChallengeRecord->$zhangjieId[] = $gateId;
-
-        StoreProc::AddMultiItemInStore($gateMo->reward_win);
-
-        ctx()->gates->CurrentGateId = $gateId;
+//        list($zhangjieId, $gateId) = req()->paras;
+//
+//        $gateMo = GameConfig::gate_getItem($gateId);
+//        my_Assert($gateMo != null, ErrCode::err_const_no);
+//
+//        if (!StlUtil::dictHasProperty(ctx()->gates->GatesChallengeRecord, $zhangjieId)) {
+//            ctx()->gates->GatesChallengeRecord->$zhangjieId = array();
+//        }
+//
+//        my_Assert(!in_array($gateId, ctx()->gates->GatesChallengeRecord->$zhangjieId), ErrCode::gate_GatePriceHasReceive);
+//        my_Assert(in_array($gateMo->challengeUnlockId, ctx()->gates->GatesChallengeRecord->$zhangjieId), ErrCode::gate_GateNoUnlock);
+//
+//        ctx()->gates->GatesChallengeRecord->$zhangjieId[] = $gateId;
+//
+//        StoreProc::AddMultiItemInStore($gateMo->reward_win);
+//
+//        ctx()->gates->CurrentGateId = $gateId;
 
         UserProc::updateUserInfo();
         $ret = array(
@@ -396,7 +400,7 @@ class FightProc {
         $gateMo = GameConfig::gate_getItem($gateId);
         my_Assert($gateMo != null, ErrCode::err_const_no);
 
-        my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::user_Gate_NoUserGateInfo);
+        my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::gate_NoUserGateInfo);
         $gateInfo = ctx()->gates->GateList->$gateId;
 
         $tag = false;
@@ -431,7 +435,7 @@ class FightProc {
         }
 
         if ($tag) {
-            my_Assert($mask > $gateInfo->FirstReward, ErrCode::user_Gate_GatePriceHasReceive);
+            my_Assert($mask > $gateInfo->FirstReward, ErrCode::gate_GatePriceHasReceive);
             $gateInfo->FirstReward = $mask;
             StoreProc::AddMultiItemInStore($prize);
         }
@@ -453,7 +457,7 @@ class FightProc {
         list($resultType, $gateId, $gold, $curTs, $pickups) = req()->paras;
         $gateMo = GameConfig::gate_getItem($gateId);
         my_Assert($gateMo != null, ErrCode::err_const_no);
-        my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::user_Gate_NoUserGateInfo);
+        my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::gate_NoUserGateInfo);
         $gateInfo = ctx()->gates->GateList->$gateId;
         $ts = $gateInfo->MaxSeconds;
         if ($curTs >= $ts) {