浏览代码

Merge branch 'dev' of http://ylsjtt.game7000.com:3000/YLSJ/jzhj2024server into dev

王刚 1 年之前
父节点
当前提交
dc20b6ff24

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

@@ -192,8 +192,8 @@ class GameConfig {
     public static function waves_getItemArray($key) {
         return self::get_hash_item('waves', $key);
     }
-
-    /**
+   
+    /*
      * 活动: 七日签到
      * @return \activity_day7
      */

+ 9 - 4
Gameserver/App/model/Const/sm_activeTask.php

@@ -1,10 +1,10 @@
 <?php
 
 ////////////////////
-// 由CodeGenerator创建。
-// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
-// author: gwang
-// 日期: 2024-05-22 10:13:17
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-05-22 14:46:41
 ////////////////////
 
 /**
@@ -71,4 +71,9 @@ class sm_activeTask {
      * @var String 活跃点
      */
     public $activePoint;
+
+    /**
+    * @var Int32 前往类型 default(0) 
+    */
+    public $gotoType;
 }

+ 10 - 4
Gameserver/App/model/Const/sm_activeTask_type.php

@@ -1,10 +1,10 @@
 <?php
 
 ////////////////////
-// 由CodeGenerator创建。
-// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
-// author: gwang
-// 日期: 2024-05-22 10:13:17
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-05-22 14:46:41
 ////////////////////
 
 /**
@@ -71,4 +71,10 @@ class sm_activeTask_type {
      * @var String 活跃点
      */
     public $activePoint;
+
+    /**
+    * @var Int32 前往类型 default(0) 
+    */
+    public $gotoType;
+
 }

+ 4 - 4
Gameserver/App/model/Const/sm_item.php

@@ -1,10 +1,10 @@
 <?php
 
 ////////////////////
-// 由CodeGenerator创建。
-// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
-// author: gwang
-// 日期: 2024-05-22 09:33:18
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-05-22 09:33:18
 ////////////////////
 
 /**

+ 4 - 4
Gameserver/App/model/User/Info_Task.php

@@ -30,27 +30,27 @@ class Info_Task extends Object_ext{
      * 每日任务累计值
      * @var type
      */
-    public $dailyTaskAccumulate = 0;
+    //public $dailyTaskAccumulate = 0;
     
     /**
      * 
      * @var type
      */
     #[ArrayType]
-    public $dailyTaskAccumulateDrawed = array();
+    //public $dailyTaskAccumulateDrawed = array();
     
     /**
      * 周常任务累计值
      * @var type
      */
-    public $weekTaskAccumulate = 0;
+    //public $weekTaskAccumulate = 0;
 
     /**
      * 
      * @var type
      */
     #[ArrayType]
-    public $weekTaskAccumulateDrawed = array();
+    //public $weekTaskAccumulateDrawed = array();
     
     /**
      * 成就信息

+ 0 - 200
Gameserver/App/process/TaskProc.php

@@ -369,206 +369,6 @@ class TaskProc {
         ctx()->task->weekTaskPoint = 0;
     }
 
-    /**
-     * 每日任务重置--废弃
-     */
-    static function ResetTask_Daily() {
-        $dic = GameConfig::taskcard();
-
-        $retDic = new \stdClass();
-        $taskcards = ctx()->task->taskcards;
-
-        $dailyCards = array();
-        foreach ($dic as $id => $mo) {
-            if ($mo->type == 1) {
-                foreach ($taskcards as $uid => $card) {
-                    if ($card->typeId == $mo->typeId) {
-                        $dailyCards[] = $uid;
-                    }
-                }
-
-                $retDic->$id = $mo;
-            }
-        }
-
-        foreach ($dailyCards as $uid) {
-            unset($taskcards->$uid);
-        }
-
-        $retDic = (array) $retDic;
-        if (count($retDic) <= 0) {
-            return;
-        }
-
-        ksort($retDic);
-        $index = ctx()->task->taskIndex;
-        foreach ($retDic as $id => $mo) {
-            $index += 1;
-            $task = new Ins_TaskCard($id);
-            $taskcards->$index = $task;
-        }
-        ctx()->task->taskIndex = $index;
-        ctx()->task->taskcards = $taskcards;
-
-        UserProc::updateUserInfo();
-    }
-
-    /**
-     * 每周任务重置--废弃
-     */
-    static function ResetTask_Week() {
-        $dic = GameConfig::taskcard();
-
-        $retDic = new \stdClass();
-        $taskcards = ctx()->task->taskcards;
-
-        $dailyCards = array();
-        foreach ($dic as $id => $mo) {
-            if ($mo->type == 2) {
-                foreach ($taskcards as $uid => $card) {
-                    if ($card->typeId == $mo->typeId) {
-                        $dailyCards[] = $uid;
-                    }
-                }
-
-                $retDic->$id = $mo;
-            }
-        }
-
-        foreach ($dailyCards as $uid) {
-            unset($taskcards->$uid);
-        }
-
-        $retDic = (array) $retDic;
-        if (count($retDic) <= 0) {
-            return;
-        }
-
-        ksort($retDic);
-        $index = ctx()->task->taskIndex;
-        foreach ($retDic as $id => $mo) {
-            $index += 1;
-            $task = new Ins_TaskCard($id);
-            $taskcards->$index = $task;
-        }
-        ctx()->task->taskIndex = $index;
-        ctx()->task->taskcards = $taskcards;
-
-        UserProc::updateUserInfo();
-    }
-
-    //---------------------       
-
-    /**
-     * 每日登陆
-     */
-    static function OnUserLogin() {
-        $taskEventArg = new Ins_TaskEventArgs(Enum_TaskCmdType::DailyLogin, Enum_PropelType::set, 1, array());
-        self::CheckTaskCardConditions($taskEventArg);                           # 检查日常任务
-    }
-
-    /**
-     * 参与主线关卡X次
-     */
-    static function OnChallengeZhuXianGate() {
-        $taskEventArg = new Ins_TaskEventArgs(Enum_TaskCmdType::ChallengeZhuXianGate, Enum_PropelType::add, 1, array());
-        self::CheckTaskCardConditions($taskEventArg);                           # 检查日常任务
-    }
-
-    /**
-     * 参与日常关卡1次
-     */
-    static function OnChallengeDailyGate() {
-        $taskEventArg = new Ins_TaskEventArgs(Enum_TaskCmdType::ChallengeDailyGate, Enum_PropelType::add, 1, array());
-        self::CheckTaskCardConditions($taskEventArg);                           # 检查日常任务
-    }
-
-    /**
-     * 每日商店购买物品1次
-     */
-    static function OnDailyShopBuyNum() {
-        $taskEventArg = new Ins_TaskEventArgs(Enum_TaskCmdType::DailyShopBuyNum, Enum_PropelType::add, 1, array());
-        self::CheckTaskCardConditions($taskEventArg);                           # 检查日常任务
-    }
-
-    static function CheckTaskCardConditions($taskParam) {
-        $bUpdate = false;
-        $tasks = ctx()->task->taskcards;
-        foreach ($tasks as $tid => &$task) {
-            $task = new Ins_TaskCard($task);
-            if ($task->state != Enum_TaskCardStateType::ing) {
-                continue;
-            }
-            foreach ($task->curSteps as &$tsp) {                                # 初期里面只有一个任务
-                $tsp = new Ins_TaskStep($tsp);
-                if ($tsp->check_new($taskParam)) {
-                    $bUpdate = true;
-                    $tsp->propel($taskParam);
-                    NormalEventProc::OnTaskCardStep_Process($task->uid, $tsp->typeId); # 任务进度更新
-                    if ($tsp->isFinish()) {
-                        NormalEventProc::OnTaskCardStep_Complete($task->uid, $tsp->typeId); # 广播任务步骤完成事件
-//                        $tsp->doFinishAct();
-                    }
-                }
-            }
-
-            if ($task->IsFinish()) {                                            # 检查后添加后续任务
-                $arr = array();
-                foreach ($task->curSteps as &$tsp) {                            # 初期里面只有一个任务
-                    $tsp = new Ins_TaskStep($tsp);
-                    if (strlen($tsp->mo()->next) > 0) {                         # 有后续任务
-                        $arr = array_merge($arr, explode(',', $tsp->mo()->next)); # 累加下一个任务步骤
-                    }
-                }
-                foreach ($arr as $stpid) {                                      # 轮询添加后续任务
-                    if ($stpid > 0) {
-                        $task->AddStep($stpid);                                 # 将后续任务追加到任务列表中
-                    }
-                }
-
-                if (count($arr) != 0) {
-                    self::autoRecoverStateMissions($taskParam);
-                }
-            }
-            if ($task->IsFinish()) {                                            # 检查是否任务卡的所有步骤都已完成
-                $task->state = Enum_TaskCardStateType::finish;
-                NormalEventProc::OnTaskCard_Finish($task->uid, null);           # 广播卡完成事件
-            }
-        }
-
-        if ($bUpdate) {                                                         # 带回数据到客户端
-            ctx()->task->taskcards = $tasks;
-            UserProc::updateUserInfo();                                         # 更新玩家数据
-        }
-
-        return $bUpdate;
-    }
-
-    /**
-     * 自动修复状态型任务
-     */
-    static function autoRecoverStateMissions() {
-        $tasks = ctx()->task->taskcards;
-        foreach ($tasks as $tid => &$task) {
-            $task = new Ins_TaskCard($task);
-
-            if ($task->state == Enum_TaskCardStateType::ing //                  # 进行中的或者已完成的
-                    || $task->state == Enum_TaskCardStateType::finish) {
-                foreach ($task->curSteps as &$tsp) {                            # 初期里面只有一个任务
-                    $tsp = new Ins_TaskStep($tsp);
-                    $tsp->autoCalcStatusCur();
-                }
-                if ($task->state == Enum_TaskCardStateType::finish) {           # 检查是否任务卡的所有步骤都已完成
-                    if (!$task->IsFinish()) {
-                        $task->state = Enum_TaskCardStateType::ing;             # 状态回退
-                    }
-                }
-            }
-        }
-//        Clog::info("更新状态统计类的任务卡!");
-        ctx()->task->taskcards = $tasks;
-    }
-
 // <editor-fold defaultstate="collapsed" desc="不同活动任务监测信息-">
 
     /**