Browse Source

无尽塔

gwang 4 years ago
parent
commit
6680b5527d

+ 14 - 1
Gameserver/Amfphp/base/CmdCode.php

@@ -480,7 +480,7 @@ class CmdCode {
      * 升级
      */
     const cmd_hero_YanlinUpLevel = 6327;
-    
+
     /**
      * 突破
      */
@@ -899,6 +899,19 @@ class CmdCode {
     const fight_worldBoss_refresh_bossSkill = 6835;
 // 
 // // </editor-fold>
+// 
+// <editor-fold defaultstate="collapsed" desc="无尽塔">
+
+    /**
+     * 无尽塔 - 查询当前层
+     */
+    const fight_endlessTower_Get = 6841;
+
+    /**
+     * 无尽塔 - 前进
+     */
+    const fight_endlessTower_Up = 6842;
+// </editor-fold>
 //
 // </editor-fold>
     //

+ 16 - 7
Gameserver/Amfphp/base/ErrCode.php

@@ -478,16 +478,16 @@ class ErrCode {
      * 
      */
     const hero_yanling_starMax = 3332;
-    
+
     /**
      * 错误的言灵
      */
-    const hero_yanling_errorYanling= 3333;
-    
+    const hero_yanling_errorYanling = 3333;
+
     /**
      * 不能突破
      */
-    const hero_yanling_canotTupo= 3334;
+    const hero_yanling_canotTupo = 3334;
 //
 // </editor-fold>
     //
@@ -914,12 +914,12 @@ class ErrCode {
      * 活动 - 兑换码已经使用过了
      */
     const active_activecode_used = 3952;
-    
+
     /**
      * 活动不存在
      */
     const active_activeNoExistent = 3953;
-    
+
     /**
      * 抽奖次数已经达到上限
      */
@@ -1115,7 +1115,16 @@ class ErrCode {
     const email_appendix_drawed = 4204;
 
 // </editor-fold>
-    //  
+    //
+    // <editor-fold defaultstate="collapsed" desc="战斗错误码">
+    // 
+
+    /**
+     * 无尽塔 - 错误的关卡索引
+     */
+    const Fight_endlessTower_index = 4341;
+    // 
+    // </editor-fold>
     //
     // <editor-fold defaultstate="collapsed" desc="    拍卖 47xx    ">
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-27 17:49:58
+ // 日期: 2021-05-27 20:51:44
 ////////////////////
 
 /**

+ 2 - 2
Gameserver/Amfphp/model/Const/sm_gate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-27 14:20:29
+ // 日期: 2021-05-27 20:49:31
 ////////////////////
 
 
@@ -194,7 +194,7 @@ class sm_gate
     public $passCondition;
 
     /**
-    * @var String 战斗类型(0普通 怪物全部创建 1Boss站 2引导剧情 3竞技场 4非战斗场景 5 材料副本)  
+    * @var String 战斗类型(0普通 怪物全部创建 1Boss站 2引导剧情 3竞技场 4非战斗场景 5 材料副本 6无尽之塔 7世界BOSS
     */
     public $battleType;
 

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_hero.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-27 15:51:58
+ // 日期: 2021-05-27 19:42:50
 ////////////////////
 
 

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_sysmail.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-12 18:06:08
+ // 日期: 2021-05-27 19:50:03
 ////////////////////
 
 

+ 8 - 2
Gameserver/Amfphp/model/User/Info_PrivateState.php

@@ -101,13 +101,18 @@ class Info_PrivateState extends Object_ext {
      * @var array[int]
      */
     public $unlockedBuild = array();
-    
+
     /**
      * 已经解锁得npc
      * @var type
      */
     public $unlockNpc = array();
 
+    /**
+     * @var int 无尽塔的当前进度
+     */
+    public $endlessTower = 1;
+
 // <editor-fold defaultstate="collapsed" desc="    初始化    ">
 
     /**
@@ -117,12 +122,13 @@ class Info_PrivateState extends Object_ext {
         $this->maxItemNum = GameConfig::primordial_data()->User_Private_MaxItem_num; # Ps.默认100; 
         $this->TiliTime = now();
     }
+
     /**
      * 添加已经解锁得npc
      * @param type $npcId
      */
     public function addUnlockNpc($npcId) {
-        if(!in_array($npcId,$this->unlockNpc)){
+        if (!in_array($npcId, $this->unlockNpc)) {
             $this->unlockNpc[] = $npcId;
         }
     }

+ 28 - 1
Gameserver/Amfphp/process/FightProc.php

@@ -63,13 +63,22 @@ class FightProc {
                 return PVPProc::pvpShopRefresh();
             // </editor-fold>
 
-            case CmdCode::fight_worldBoss_refresh_rank :
+            case CmdCode::fight_worldBoss_refresh_rank :                        # 6834 查询世界boss伤害输出榜
                 return self::GetWorldBossRank();
+
+            case CmdCode::fight_endlessTower_Get:                               # 6841 查询无尽塔的进度
+                return self::EndlessTower_Get();
+            case CmdCode::fight_endlessTower_Up:                                # 6842 无尽塔升级
+                return self::EndlessTower_Up();
+
             default:
                 return Resp::err(ErrCode::cmd_err);
         }
     }
 
+    /**
+     * [6834] 查询世界boss伤害输出榜
+     */
     static function GetWorldBossRank() {
         $dateHour = date('YmdH');
         $zoneid = req()->zoneid;
@@ -78,6 +87,24 @@ class FightProc {
         return Resp::ok(array('rank' => $rank));
     }
 
+    /**
+     * [6841] 查询无尽塔的进度
+     */
+    static function EndlessTower_Get() {
+        return Resp::ok(array('index' => ctx()->privateData()->endlessTower));
+    }
+
+    /**
+     * [6842] 无尽塔升级
+     */
+    static function EndlessTower_Up() {
+        list( $index) = req()->paras;
+        my_Assert($index == ctx()->privateData()->endlessTower, ErrCode::Fight_endlessTower_index);
+        ctx()->privateData()->endlessTower++;
+        UserProc::updateUserInfo();
+        return Resp::ok(array('index' => ctx()->privateData()->endlessTower));
+    }
+
     /**
      * 清理每日字段
      */