浏览代码

fixed: 添加新的任务类型, 每日参与boss战.

王刚 3 年之前
父节点
当前提交
5e852abcd8
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 2 0
      Gameserver/Amfphp/model/User/Enum_TaskCmdType.php
  2. 6 1
      Gameserver/Amfphp/process/TaskProc.php

+ 2 - 0
Gameserver/Amfphp/model/User/Enum_TaskCmdType.php

@@ -35,6 +35,8 @@ class Enum_TaskCmdType extends Enum {
     const DailyPVP = 104;                                                       # 暂不支持
     const DailyRankChalenge = 105;                                              # 暂不支持
     const DailyShopping = 106;                                                  # 暂不支持
+    const DailyBossChallenge = 107;                                             # 参数boss战(num:次数,paras:[])(跳转boss战选择界面)
+    #
     // ---------  任务卡  --------
     const KillMonster = 201;                                                    # 击杀怪物 (num:数量,paras:[怪物id]) (跳到某个关卡)
     const GainItem = 202;                                                       # 获得道具 (num:数量,paras:[道具id]

+ 6 - 1
Gameserver/Amfphp/process/TaskProc.php

@@ -359,7 +359,8 @@ class TaskProc {
         $num = 0;
         array_walk($cardDic, function ($inst) use (&$num) {
 //             $inst = new Ins_TaskCard($inst);
-            if ($inst->state == Enum_TaskCardStateType::ing && GameConfig::item_taskcard_getItem($inst->typeId)->type != 3) {
+            if ($inst->state == Enum_TaskCardStateType::ing                     #
+                    && GameConfig::item_taskcard_getItem($inst->typeId)->type != 3) {
                 $num++;
             }
         });
@@ -867,6 +868,9 @@ class TaskProc {
         $taskEventArg = new Ins_TaskEventArgs(Enum_TaskCmdType::PassWorldBoss, Enum_PropelType::set, 1, array($gateId));
 //        var_dump($taskEventArg);
         self::CheckTaskCardConditions($taskEventArg);
+        $taskEventArgDaily = new Ins_TaskEventArgs(Enum_TaskCmdType::DailyBossChallenge, Enum_PropelType::add, 1, array($gateId));
+//        var_dump($taskEventArg);
+        self::CheckTaskCardConditions($taskEventArgDaily);
     }
 
     /**
@@ -983,6 +987,7 @@ class TaskProc {
         $pri = req()->userInfo->game->privateData();
         for ($tp = 1; $tp < 5; $tp++) {
             $curId = my_null_default($pri->taskCardTracing->$tp, 0);            # 当前追踪中的任务卡id
+
             $needRefresh = false;
             if ($curId > 0) {                                                   # 存在任务卡
                 if (CommUtil::isPropertyExists($tasks, $curId)) {