浏览代码

1. 添加挑战的后端接口

gwang 5 年之前
父节点
当前提交
b237b7eba0

+ 6 - 38
Gameserver/Amfphp/base/CmdCode.php

@@ -624,39 +624,22 @@ class CmdCode {
     const cmd_fight_arenassweep = 6802;
 
     /**
-     * 获得星星奖励
+     * 挑战 - 获得挑战对手的信息
      */
-    const cmd_fight_GetArenasStarReward = 6803;
+    const cmd_fight_GetChallengeAdversaryInfo = 6803;
 
     /**
-     * 扣除买buffer的费用
+     * 挑战 - 记录挑战结果
      */
-    const cmd_fight_ConsumeBufferGold = 6804;
+    const cmd_fight_LogChallengeResult = 6804;
 
     /**
-     * 查询已经借用过的好友
+     * 挑战 - 拉取挑战记录
      */
-    const cmd_fight_GetborrowedFriend = 6805;
+    const cmd_fight_GetChallengeLog = 6805;
 
-    /**
-     * 扣除借用好友的费用
-     */
-    const cmd_fight_BorrowFriend = 6806;
 
-    /**
-     * 挑战无尽模式
-     */
-    const cmd_fight_ChallengeEndlessFightMode = 6807;
 
-    /**
-     * 开启副本
-     */
-    const cmd_fight_OpenCarbon = 6808;
-
-    /**
-     * 挑战副本
-     */
-    const cmd_fight_ChallengeCarbon = 6809;
 //
 //      <editor-fold defaultstate="collapsed" desc="    PVP 挑战    ">
 //
@@ -696,22 +679,7 @@ class CmdCode {
      */
     const cmd_fight_pvp_drawactivereward = 6815;
 
-    /**
-     * 剧情关卡_  挑战关卡
-     */
-    const cmd_fight_Challenge_StoryGate = 6816;
-
-    /**
-     * 新版地图 挑战关卡
-     */
-    const cmd_new_arenas_fight = 6817;
-
-    /**
-     *  新版地图 挑战关卡
-     */
-    const cmd_new_arenas_changeStayCity = 6818;
 
-//    const cmd_fight_pvp_shop...
 //
 // </editor-fold>
 //

+ 15 - 31
Gameserver/Amfphp/process/FightProc.php

@@ -6,11 +6,10 @@ require_once __DIR__ . '/FightProc/SweepGatesProc.php';
 require_once __DIR__ . '/FightProc/PVPProc.php';
 
 /**
- * 战斗
+ * 战斗业务逻辑分发
  * @author gwang
  */
 class FightProc {
-    //put your code here
 
     /**
      * 战斗逻辑分发
@@ -22,24 +21,18 @@ class FightProc {
             # 关卡-征战
             case CmdCode::cmd_fight_arenasfight:                                # 6801 挑战关卡
                 return SweepGatesProc::Arenas_Fight($req);
-//            case CmdCode::cmd_fight_arenassweep:                              # 6802 扫荡关卡
-//                return SweepGatesProc::Arenas_SweepFight($req);
-            case CmdCode::cmd_fight_GetArenasStarReward:                        # 6803 扫荡关卡
-                return SweepGatesProc::GetArenasStarReward($req);
-            case CmdCode::cmd_fight_ConsumeBufferGold:                          # 6804 扣除买buffer费用
-                return SweepGatesProc::ConsumeBufferGold($req);
-            case CmdCode::cmd_fight_GetborrowedFriend:                          # 6805 查询已经借用过的好友
-                return SweepGatesProc::GetBorrowedFriends($req);
-            case CmdCode::cmd_fight_BorrowFriend:                               # 6806 扣除借用好友的费用
-                return SweepGatesProc::ConsumeBorrowFriend($req);
-            case CmdCode::cmd_fight_ChallengeEndlessFightMode:                  # 6807 '黄金之城'无限挑战
-                return SweepGatesProc::ChallengeEndlessFightMode_Gold($req);
-// ---------------
-            case CmdCode::cmd_fight_OpenCarbon:                                 # [6808] 开启副本
-                return SweepGatesProc::OpenTheCarbon($req);
-            case CmdCode::cmd_fight_ChallengeCarbon:                            # [6809] 挑战副本关卡
-                return SweepGatesProc::NewChallengeCarbon($req);
-// --------- pvp  -----------------
+            case CmdCode::cmd_fight_arenassweep:                                # [6802] 扫荡
+                return Resp::err(ErrCode::function_notopen_msg);                # 暂未开放扫荡功能. -gwang 2020.4.20
+                return SweepGatesProc::Arenas_NewSweepFight($req);
+
+            # 玩家-挑战    
+            case CmdCode::cmd_fight_GetChallengeAdversaryInfo:                  # 6803 获取挑战对手的信息
+                return PVPProc::GetChallengeAdversaryInfo($req);
+            case CmdCode::cmd_fight_LogChallengeResult:                         # 6804 记录挑战结果
+                return PVPProc::LogChallengeInfo($req);
+            case CmdCode::cmd_fight_GetChallengeLog:                            # 6805 拉取挑战记录
+                return PVPProc::GetChagllengeLog($req);
+// <editor-fold defaultstate="collapsed" desc=" PVP 模块 ">
 //            case CmdCode::cmd_fight_pvp_maininfo:                               # [6810] pvp 主界面拉取信息
 //                return PVPProc::pvpMainInfo($req);
 //            case CmdCode::cmd_fight_pvp_pk:                                     # [6811] pvp 挑战对手
@@ -55,17 +48,8 @@ class FightProc {
 //                return PVPProc::pvp_drawacitverewards($req);
 //            case CmdCode::fight_pvp_getChanlianInfo:                            # [6819] pvp 拉取蝉联信息
 //                return PVPProc::getChanlianINfo($req);
-//  ----------------- 剧情关卡 ----------------------
-            case CmdCode::cmd_fight_Challenge_StoryGate:                        # [6816] 挑战剧情关卡
-                return SweepGatesProc::ChallengeStoryGate($req);
-            //------------------------------------------------
-            case CmdCode::cmd_new_arenas_fight:                                 # [6817] 新的挑战关卡
-                return Resp::err(ErrCode::function_notopen_msg);
-                return SweepGatesProc::NewArenas_Fight($req);
-            case CmdCode::cmd_new_arenas_changeStayCity:                        # [6818] 记录玩家到达哪一关的
-                return SweepGatesProc::ChangeArenas_StayCity($req);
-            case CmdCode::cmd_fight_arenassweep:                                # [6802] 扫荡
-                return SweepGatesProc::Arenas_NewSweepFight($req);
+// </editor-fold>
+
             default:
                 return Resp::err(ErrCode::cmd_err);
         }

+ 63 - 0
Gameserver/Amfphp/process/FightProc/PVPProc.php

@@ -11,6 +11,67 @@ namespace loyalsoft;
  */
 class PVPProc {
 
+    /**
+     * [6803] 挑战 - 查询对手信息 等级、头像、昵称、战队信息(言灵师,等级,星级,武器,技能,言灵)
+     * @param req $req
+     */
+    public static function GetChallengeAdversaryInfo($req) {
+        // 参数: 无
+        $targetUID = $req->paras[0];                                            # 对手的UID
+        $uinfo = UserProc::getUserInfo($req->mem, $req->zoneid, $targetUID);    # 读取玩家信息
+        $adversary = array(#                                                    # 拼装玩家信息
+            'uid' => $targetUID,
+            'name' => my_null_default($uinfo->game->name, ""),
+            'level' => my_null_default($uinfo->game->level, 1),
+            'headImg' => my_null_default($uinfo->game->img, ""),
+//            'skills' => null, #                                                  # skills暂时没有实例数据 
+            'equipment' => my_null_default($uinfo->game->store->equipment, new \stdClass()), # 武器
+            'yanling' => my_null_default($uinfo->game->store->yanling, new \stdClass()), # 言灵
+            'heros' => my_null_default($uinfo->game->heros->collectHeros, new \stdClass()), # 英雄集合
+        );
+
+        $result = array(#                                                       # 拼装返回值
+            "adversaryInfo" => $adversary
+        );
+        return Resp::ok($result);
+    }
+
+    /**
+     * [6804] 挑战 - 记录挑战结果
+     * @param req $req
+     */
+    static function LogChallengeInfo($req) {
+        // 参数: 对手uid, 对战结果, 胜利者的留言(失败忽略)
+        // 分胜负 if {
+        //     记录自己的主动挑战记录, 胜利
+        //     写入对手的挑战记录.
+        // } else {
+        //     记录自己的主动挑战记录, 失败.
+        //     写入对手的挑战记录, 
+        // }
+        // 暂无发放奖励流程
+        // 更新每日任务
+        // 回写自己的用户信息
+        // 回写对手的交互信息
+        // 返回
+        // 
+    }
+
+    /**
+     * [6805] 挑战 - 拉取挑战记录
+     * @param req $req
+     */
+    static function GetChagllengeLog($req) {
+        // 参数:无
+        // 拉取自己的挑战记录
+        // Ps. 挑战记录分为2个榜, 且按照时间戳记录,晚于指定时间戳的判定为未读消息,挑战记录最多记录99条
+        // 记录拉取时间戳(在主界面有个未读消息条数显示, 需要靠最后拉取时间戳对比, 时间戳之后的消息是未读消息)
+        // 回传数据记录
+    }
+
+    //
+    // <editor-fold defaultstate="collapsed" desc=" 旧版PVP 681x ">
+
     /**
      * 查找对手数量
      */
@@ -646,4 +707,6 @@ class PVPProc {
 
 // </editor-fold>
 //
+// </editor-fold>
+// 
 }

+ 112 - 267
Gameserver/Amfphp/process/FightProc/SweepGatesProc.php

@@ -9,167 +9,130 @@ namespace loyalsoft;
 class SweepGatesProc {
     //
     // <editor-fold defaultstate="collapsed" desc="三层关卡">
-
-    /**
-     * [6817]新版本的挑战地图关卡
-     * @param req $req
-     */
-    public static function NewArenas_Fight($req) {
-        # 提取参数
-        $gateId = $req->paras[0];                                               # 0. 挑战的关卡Id
-        $difficulty = $req->paras[1];                                           # 1. 关卡难度 difficulty
-        $star = $req->paras[2];                                                 # 2. 几星
-        $TeamObj = $req->paras[3];                                              # 3. 队伍信息
-        $bossId = $req->paras[4];                                               # 4. 本关消灭的bossid (<=0代表本关卡未出现boss)
-        $rewards = $req->paras[5];                                              # 5. 本关获得的宝箱列表,id:num,id:num,...  
-
-        $smGate = GameConfig::gate_getItem($gateId);                            # 关卡配置数据
-///按   三个难度取不同的值.
-        $i = $difficulty + 1;
-        $tili = self::getProperty_n($smGate, "tili", $i);
-//        $reward = self::getProperty_n($smGate, "reward", $i);
-        $gold = self::getProperty_n($smGate, "gold", $i);
-        $exp = self::getProperty_n($smGate, "exp", $i);
-
-        self::newRecordFight($req, $gateId, $difficulty, $star);                # 更新战斗记录
-
-        $canfighterr = SweepGatesProc::CanFight($req, $gateId, $difficulty);    # 是否可以挑战当前关卡计算
-
-        if ($canfighterr) {                                                     # 不能符合战斗要求
-            return $canfighterr;
-        }
-//  
-        ActiveProc::ChangeTili(-$tili);                                         # 扣减体力
-        $req->userInfo->game->gates->TotalNum++;                                # 更新战斗次数统计
-        $req->userInfo->game->gates->Times++;
-///增加英雄经验 组长去掉
-        foreach ($TeamObj as $heroUID) {
-            if ($heroUID > 0) {
-                HeroProc::HeroAddEXP($heroUID, $tili);
-            }
-        }
-
-        $rewardsArr = explode(",", $rewards);                                   // 开箱子抽奖品
-        $rewardArr = array();
-        foreach ($rewardsArr as $r) {
-            $arr = explode(':', $r);
-            $boxID = intval($arr[0]);
-            $num = intval($arr[1]);
-//            $boxMo = GameConfig::item_box_getItem($boxID);
-            $boxPool = GameConfig::boxpool_getItem($boxID);                     # 提取对应序列的奖池, 
-            $itemArr = array_filter($boxPool, function($item) use($dropindex) { # 这一步形同虚设了. 所有dropType都填的1
-                return $item->dropType == 1;
-            });
-            $itemArr = Lotterys::FilterPrizepool($req, $itemArr);               # 对奖池依解锁等级进行过滤
-            foreach ($itemArr as $item) {
-                $prop = $item->normal;
-                if ($prop < 0) {
-                    $prop = 0;
-                }
-                $item->probability = $prop;
-            }
-            $err = Lotterys::Dice($itemArr, $num, $rewardstr);                  # 投骰子
-            if ($err != ErrCode::ok) {                                          # 出错了
-                return Resp::err($err);
-            }
-            if (strlen($rewardstr) <= 0) {                                      # 抽奖结果为空
-                return Resp::err(ErrCode::err_innerfault);
-            }
-            $rewardArr[] = $rewardstr;
-        }
-        if ($bossId > 0) {                                                      # boss关处理
-            $req->userInfo->game->gates->killedBoss[] = $bossId;
-        }
-        UserGameModel::Add_Gold($req->userInfo->game, $gold); # 发放金币奖励
-
-        UserGameModel::Add_Exp($req->userInfo->game, $exp);                     # 发放经验奖励
-        UserProc::updateUserInfo();                                         # 在获取战利品哪里已经update了.
-        $result = array(
-            'store' => $req->userInfo->game->store,
-            'heros' => $req->userInfo->game->heros,
-            'gates' => $req->userInfo->game->gates,
-            'tili' => $req->userInfo->game->tili,
-            'time' => $req->userInfo->game->privateState->TiliTime,
-            'gold' => $gold,
-            'exp' => $exp,
-            'rewardstr' => implode(';', $rewardArr)
-        );
-        return Resp::ok($result);
-    }
-
-    /**
-     * 更新战斗记录(新)
-     * @param req $req
-     * @param type $gateId
-     * @param type $difficulty
-     * @param type $star
-     */
-    private static function newRecordFight($req, $gateId, $difficulty, $star) {
-        if (!CommUtil::isPropertyExists($req->userInfo->game->gates, "newGateRecord")) {
-            $req->userInfo->game->gates->newGateRecord = ObjectInit();          # 防御未初始化的变量
-        }
-        $gatesRecord = $req->userInfo->game->gates->newGateRecord;
-        if (!CommUtil::isPropertyExists($gatesRecord, "record")) {              # 防御未初始化的变量
-            $gatesRecord->record = ObjectInit();
-        }
-        if (!CommUtil::isPropertyExists($gatesRecord->record, $gateId)) {       # 补充战斗记录
-            $gatesRecord->record->$gateId = ObjectInit();
-        }
-
-        if ($difficulty <= 0) {
-            $gatesRecord->record->$gateId->normal = $star;
-            if (!CommUtil::isPropertyExists($gatesRecord->record->$gateId, "normalToday")) {
-                $gatesRecord->record->$gateId->normalToday = 0;
-            }
-        } else if ($difficulty == 1) {
-            $gatesRecord->record->$gateId->hard = $star;
-            if (!CommUtil::isPropertyExists($gatesRecord->record->$gateId, "hardToday")) {
-                $gatesRecord->record->$gateId->hardToday = 0;
-            }
-        } else if ($difficulty == 2) {
-            $gatesRecord->record->$gateId->elite = $star;
-            if (!CommUtil::isPropertyExists($gatesRecord->record->$gateId, "eliteToday")) {
-                $gatesRecord->record->$gateId->eliteToday = 0;
-            }
-        }
-        $req->userInfo->game->gates->newGateRecord = $gatesRecord;              # 回写数据
-    }
-
 //    /**
-//     * [6818]更改地图所停留的城镇
-//     * //需要消耗体力
-//     * @param type $req
-//     * @deprecated since version 0
+//     * [6817]新版本的挑战地图关卡
+//     * @param req $req
 //     */
-//    public static function ChangeArenas_StayCity($req) {
-//# 提取参数
-//# 0. 目标地址
-//# 1. 消耗体力
-//        $cityId = $req->paras[0];
-//        $costTili = $req->paras[1];
-//        if (!CommUtil::isPropertyExists($req->userInfo->game->gates, "newGateRecord")) {
-//            $req->userInfo->game->gates->newGateRecord = ObjectInit();
+//    public static function NewArenas_Fight($req) {
+//        # 提取参数
+//        $gateId = $req->paras[0];                                               # 0. 挑战的关卡Id
+//        $difficulty = $req->paras[1];                                           # 1. 关卡难度 difficulty
+//        $star = $req->paras[2];                                                 # 2. 几星
+//        $TeamObj = $req->paras[3];                                              # 3. 队伍信息
+//        $bossId = $req->paras[4];                                               # 4. 本关消灭的bossid (<=0代表本关卡未出现boss)
+//        $rewards = $req->paras[5];                                              # 5. 本关获得的宝箱列表,id:num,id:num,...  
+//
+//        $smGate = GameConfig::gate_getItem($gateId);                            # 关卡配置数据
+/////按   三个难度取不同的值.
+//        $i = $difficulty + 1;
+//        $tili = self::getProperty_n($smGate, "tili", $i);
+////        $reward = self::getProperty_n($smGate, "reward", $i);
+//        $gold = self::getProperty_n($smGate, "gold", $i);
+//        $exp = self::getProperty_n($smGate, "exp", $i);
+//
+//        self::newRecordFight($req, $gateId, $difficulty, $star);                # 更新战斗记录
+//
+//        $canfighterr = SweepGatesProc::CanFight($req, $gateId, $difficulty);    # 是否可以挑战当前关卡计算
+//
+//        if ($canfighterr) {                                                     # 不能符合战斗要求
+//            return $canfighterr;
+//        }
+////  
+//        ActiveProc::ChangeTili(-$tili);                                         # 扣减体力
+//        $req->userInfo->game->gates->TotalNum++;                                # 更新战斗次数统计
+//        $req->userInfo->game->gates->Times++;
+/////增加英雄经验 组长去掉
+//        foreach ($TeamObj as $heroUID) {
+//            if ($heroUID > 0) {
+//                HeroProc::HeroAddEXP($heroUID, $tili);
+//            }
 //        }
-//        $gatesRecord = $req->userInfo->game->gates->newGateRecord;
 //
-//        #在此补充检查消耗体力的数值是否正确
-//        #
-//
-//        $gatesRecord->lastStayCityId = $cityId;
-//        $req->userInfo->game->gates->newGateRecord = $gatesRecord;
-//        #体力变化
-//        ActiveProc::ChangeTili(-$costTili, $req);
-//        UserProc::updateUserInfo($req);
+//        $rewardsArr = explode(",", $rewards);                                   // 开箱子抽奖品
+//        $rewardArr = array();
+//        foreach ($rewardsArr as $r) {
+//            $arr = explode(':', $r);
+//            $boxID = intval($arr[0]);
+//            $num = intval($arr[1]);
+////            $boxMo = GameConfig::item_box_getItem($boxID);
+//            $boxPool = GameConfig::boxpool_getItem($boxID);                     # 提取对应序列的奖池, 
+//            $itemArr = array_filter($boxPool, function($item) use($dropindex) { # 这一步形同虚设了. 所有dropType都填的1
+//                return $item->dropType == 1;
+//            });
+//            $itemArr = Lotterys::FilterPrizepool($req, $itemArr);               # 对奖池依解锁等级进行过滤
+//            foreach ($itemArr as $item) {
+//                $prop = $item->normal;
+//                if ($prop < 0) {
+//                    $prop = 0;
+//                }
+//                $item->probability = $prop;
+//            }
+//            $err = Lotterys::Dice($itemArr, $num, $rewardstr);                  # 投骰子
+//            if ($err != ErrCode::ok) {                                          # 出错了
+//                return Resp::err($err);
+//            }
+//            if (strlen($rewardstr) <= 0) {                                      # 抽奖结果为空
+//                return Resp::err(ErrCode::err_innerfault);
+//            }
+//            $rewardArr[] = $rewardstr;
+//        }
+//        if ($bossId > 0) {                                                      # boss关处理
+//            $req->userInfo->game->gates->killedBoss[] = $bossId;
+//        }
+//        UserGameModel::Add_Gold($req->userInfo->game, $gold); # 发放金币奖励
 //
+//        UserGameModel::Add_Exp($req->userInfo->game, $exp);                     # 发放经验奖励
+//        UserProc::updateUserInfo();                                         # 在获取战利品哪里已经update了.
 //        $result = array(
+//            'store' => $req->userInfo->game->store,
+//            'heros' => $req->userInfo->game->heros,
 //            'gates' => $req->userInfo->game->gates,
 //            'tili' => $req->userInfo->game->tili,
 //            'time' => $req->userInfo->game->privateState->TiliTime,
+//            'gold' => $gold,
+//            'exp' => $exp,
+//            'rewardstr' => implode(';', $rewardArr)
 //        );
 //        return Resp::ok($result);
 //    }
-// </editor-fold>
 //
+//    /**
+//     * 更新战斗记录(新)
+//     * @param req $req
+//     * @param type $gateId
+//     * @param type $difficulty
+//     * @param type $star
+//     */
+//    private static function newRecordFight($req, $gateId, $difficulty, $star) {
+//        if (!CommUtil::isPropertyExists($req->userInfo->game->gates, "newGateRecord")) {
+//            $req->userInfo->game->gates->newGateRecord = ObjectInit();          # 防御未初始化的变量
+//        }
+//        $gatesRecord = $req->userInfo->game->gates->newGateRecord;
+//        if (!CommUtil::isPropertyExists($gatesRecord, "record")) {              # 防御未初始化的变量
+//            $gatesRecord->record = ObjectInit();
+//        }
+//        if (!CommUtil::isPropertyExists($gatesRecord->record, $gateId)) {       # 补充战斗记录
+//            $gatesRecord->record->$gateId = ObjectInit();
+//        }
+//
+//        if ($difficulty <= 0) {
+//            $gatesRecord->record->$gateId->normal = $star;
+//            if (!CommUtil::isPropertyExists($gatesRecord->record->$gateId, "normalToday")) {
+//                $gatesRecord->record->$gateId->normalToday = 0;
+//            }
+//        } else if ($difficulty == 1) {
+//            $gatesRecord->record->$gateId->hard = $star;
+//            if (!CommUtil::isPropertyExists($gatesRecord->record->$gateId, "hardToday")) {
+//                $gatesRecord->record->$gateId->hardToday = 0;
+//            }
+//        } else if ($difficulty == 2) {
+//            $gatesRecord->record->$gateId->elite = $star;
+//            if (!CommUtil::isPropertyExists($gatesRecord->record->$gateId, "eliteToday")) {
+//                $gatesRecord->record->$gateId->eliteToday = 0;
+//            }
+//        }
+//        $req->userInfo->game->gates->newGateRecord = $gatesRecord;              # 回写数据
+//    }
 
     /**
      * 提取某个对象的某个字段(利用后面2个参数组合为字段名)
@@ -331,51 +294,13 @@ class SweepGatesProc {
 
 //
 // <editor-fold defaultstate="collapsed" desc=" 扫荡  ">
-//    /**
-//     * 关卡-扫荡
-//     * @param RequestVo $req
-//     */
-//    public static function Arenas_SweepFight($req)
-//    {
-//        $resp = ResponseVo::err($req, ErrCode::msg_methodnotimplement);
-//        # 提取参数
-//        # 0. 扫荡的关卡Id
-//        # 1. 扫荡次数
-//        # 2. 挑战记录  // 验证之用.
-//        $gateId = $req->paras[0];
-//        $iNum = $req->paras[1];
-//        $fightLog = $req->paras[2];
-//        $isNewbieGuideGate = false;
-//        $gates = $req->userInfo->game->gates;
-//        if ($gateId == 504001) {
-//            $isNewbieGuideGate = true;
-//        }
-//        if ($iNum && !$fightLog) {# 检查挑战记录
-//            return ResponseVo::err($req, ErrCode::err_arenas_logillegal);
-//        }
-//        if (!$isNewbieGuideGate) {
-//            if ($gateId > $gates->highest + 1) { # 不能跳关
-//                return ResponseVo::err($req, ErrCode::err_arenasgate_indexillegal);
-//            }
-//        }
-//        #记录数据
-//        $uGate = new UGateModel();
-//        if (isset($gates->gates->$gateId)) {
-//            $uGate = $gates->gates->$gateId;
-//        }
-//        $uGate->challengeTimes += $iNum;
-//        $gates->gates->$gateId = $uGate;
-//        UserProc::updateUserInfo($req);
-//        $resp = ResponseVo::ok($req, array()); // 返回成功,以及奖励数据
-//
-//        return $resp;
-//    }
 
     /**
      * [6802]新扫荡
      * @param req $req 
      */
     public static function Arenas_NewSweepFight($req) {
+
         $gateId = $req->paras[0];
         $difficulty = $req->paras[1];                                           # 关卡难度 difficulty
         $costItemId = $req->paras[2];                                             #扫荡券id
@@ -507,86 +432,6 @@ class SweepGatesProc {
 
 // </editor-fold>
 //
-
-    /**
-     * [6803] 关卡—————— 根据星星数量获得对应奖励
-     * @param type $req
-     * @deprecated since version 0 用新版
-     */
-    public static function GetArenasStarReward($req) {
-        return Resp::err(ErrCode::err_method_notimplement);                     # 屏蔽此方法
-
-        $rewardID = $req->paras[0]; //奖励的数据ID
-
-        $rewardCfg = GameConfig::gate_starreward_getItem($rewardID);
-        if (!$rewardCfg) {                                                      //1.检查奖励数据是否存在
-            return Resp::err(ErrCode::err_arenas_starreward_const_no);
-        }
-        $gates = $req->userInfo->game->gates;
-        $getStarRewardRecord = ArrayInit();
-        if (CommUtil::isPropertyExists($gates, "starRewards")) {                //2.检查玩家是否已经领取了
-            $getStarRewardRecord = $gates->starRewards;
-        }
-        if (CommUtil::isInArray($getStarRewardRecord, $rewardID)) {
-            return Resp::err(ErrCode::err_arenas_hasgetstarreward);
-        }
-
-        $totalStarNum = 0;                                                      # 总得星数
-        $normalRecord = $gates->normal;
-        foreach ($normalRecord->gates as $key => $gate) {
-            $totalStarNum += $gate->star;
-        }
-
-        $hardRecord = $gates->hard;
-        foreach ($hardRecord->gates as $key => $gate) {
-            $totalStarNum += $gate->star;
-        }
-
-        $eliteRecord = $gates->elite;
-        foreach ($eliteRecord->gates as $key => $gate) {
-            $totalStarNum += $gate->star;
-        }
-
-        DebugHelper::var_dump($totalStarNum);
-        if ($totalStarNum < $rewardCfg->star) {                                 //3.检查玩家的当前星星数是否满足数量要求
-            return Resp::err(ErrCode::err_arenas_starreward_starNotEnough);
-        }
-        $rewardStr = $rewardCfg->reward;
-        $arr_reward = explode(",", $rewardStr);
-        $itemId = $arr_reward[0];
-        $itemNum = $arr_reward[1];
-        $str1 = substr($itemId, 0, 3);
-        switch ($str1) {
-            case "101":                                                         ///怪物卡或者英雄卡牌获取
-            case "201":
-//                HeroProc::AddHeroTFromStore($req, $itemId);
-                break;
-            case "301":                                                         ///装备物品的获取.
-            case "302":
-            case "303":
-                StoreProc::PutEquipInStore($itemId, $req);
-                break;
-            case "304":                                                         // 宝石的获取
-                StoreProc:: PutOverlyingItemInStore($itemId, $itemNum);
-                break;
-            case "399":
-                if ($itemId == "399002") {                                      // 金币的获取
-                    UserGameModel::Add_Gold($req->userInfo->game, $itemNum);
-                }
-                break;
-            default:
-                break;
-        }
-
-        $getStarRewardRecord[] = $rewardID;                                     // 保存记录
-        $req->userInfo->game->gates->starRewards = $getStarRewardRecord;
-        UserProc::updateUserInfo();                                         //  更新数据库数据 
-        $result = array(
-            "getreward" => true
-        );
-        return Resp::ok($result);
-    }
-
 //
 // <editor-fold defaultstate="collapsed" desc="    好友租借   ">
 //    /**

+ 4 - 5
Gameserver/nbproject/private/private.xml

@@ -13,12 +13,11 @@
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
             <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/process/RankProc.php</file>
-            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/process/PreProc.php</file>
-            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/process/ActiveProc.php</file>
-            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/process/HeroProc.php</file>
+            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/base/Resp.php</file>
+            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/process/UserProc.php</file>
             <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/base/CmdCode.php</file>
-            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/base/ErrCode.php</file>
-            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/process/FightProc/PVPProc.php</file>
+            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/base/MemKey_GameRun.php</file>
+            <file>file:/E:/www/ylsj2019/Gameserver/Amfphp/model/User/PrivateStateModel.php</file>
         </group>
     </open-files>
 </project-private>