Selaa lähdekoodia

添加了关于任务卡的任务.

gwang 4 vuotta sitten
vanhempi
commit
e69f9bd55b

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-03 22:27:34
+ // 日期: 2021-03-04 09:49:24
 ////////////////////
 
 /**

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-02 14:52:58
+ // 日期: 2021-03-03 23:31:53
 ////////////////////
 
 

+ 1 - 1
Gameserver/Amfphp/model/User/Enum_TaskCmdType.php

@@ -33,7 +33,7 @@ class Enum_TaskCmdType extends Enum {
     const GainItem = 202;                                                       # 获得道具 (num:数量,paras:[道具id]
     const PlotOver = 203;                                                       # 对话结束 (num:1,paras:[gateid,stage]
     const BuyTaskCard_Num = 204;                                                # 购买任务卡_带数量(num:数量,paras:[]) (跳任务卡商店)
-    const FinishTaskCard_ID = 205;                                              # 完成任务_指定id(num:1,paras:[taskCardId]) (无前往)
+    const FinishTaskCard_noID = 205;                                            # 完成任务_指定id(num:1,paras:[]) (无前往)
     const DrawSysMail_ID = 206;                                                 # 领取系统邮件_指定id(num:1,paras:[邮件id]) (跳邮件界面)
 
 }

+ 15 - 5
Gameserver/Amfphp/process/TaskProc.php

@@ -123,6 +123,7 @@ class TaskProc {
         $userInfo->taskCardShop->selled[] = $typeId;                            # 添加售罄记录
         UserProc::updateUserInfo();
         NormalEventProc::OnTaskBag_new_Card($cid, $num);                        # 播放获得任务卡事件
+        self::OnBuyTaskCard($num);                                              # 监控购买任务卡的任务卡[・_・?]
         return Resp::ok(array(
                     'gold' => $req->userInfo->game->baseInfo->gold,
                     'cash' => $req->userInfo->game->baseInfo->cash,
@@ -362,6 +363,7 @@ class TaskProc {
         $taskCard->state = Enum_TaskCardStateType::drawed;
         $store->taskcards->$taskCardUID = $taskCard;                            # 回写任务数据
         NormalEventProc::OnTaskCard_Reward($taskCard->mo()->reward, null);      # 带入事件
+        self::OnFinishTaskCard();                                               # 触发检查任务卡的任务卡[・_・?]
         StlUtil::dictRemove($req->userInfo->game->store->taskcards, $taskCardUID); # 移除任务卡
         $req->userInfo->game->store = $store;
         self::autoRecoverStateMissions();                                       # 重新更新其它状态类的任务卡
@@ -898,21 +900,29 @@ class TaskProc {
     }
 
     /**
-     * 购买任务卡
-     * @param type $cardTypeId
+     * 购买n张任务卡(非特定) 
      * @param type $_num
      * @return type
      */
-    static function OnBuyTaskCard($cardTypeId, $_num = 1) {
+    static function OnBuyTaskCard($_num = 1) {
         $taskParam = new Ins_TaskEventArgs(Enum_TaskCmdType::BuyTaskCard_Num, Enum_PropelType::add, $_num, array());
         return self::CheckTaskCardConditions($taskParam);
     }
 
-    static function OnFinishTaskCard($cardTypeId) {
-        $taskParam = new Ins_TaskEventArgs(Enum_TaskCmdType::FinishTaskCard_ID, Enum_PropelType::set, 1, array($cardTypeId));
+    /**
+     * 完成任务卡(不指定) 这是要造检查任务卡的任务卡[・_・?]
+     * @return type
+     */
+    static function OnFinishTaskCard() {
+        $taskParam = new Ins_TaskEventArgs(Enum_TaskCmdType::FinishTaskCard_ID, Enum_PropelType::set, 1, array());
         return self::CheckTaskCardConditions($taskParam);
     }
 
+    /**
+     * 领取系统邮件奖励
+     * @param type $mailId 指定邮件id
+     * @return type
+     */
     static function OnDrawSysMail($mailId) {
         $taskParam = new Ins_TaskEventArgs(Enum_TaskCmdType::DrawSysMail_ID, Enum_PropelType::set, 1, array($mailId));
         return self::CheckTaskCardConditions($taskParam);

+ 6 - 3
Gameserver/nbproject/private/private.xml

@@ -12,17 +12,20 @@
     </editor-bookmarks>
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/test.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_PrivateState.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/HeroProc.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/FightProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/StoreProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/EventProc/NormalEventProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/TaskProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/EventProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_Map.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/FightProc/SweepGatesProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_TaskCard.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_TaskStep.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Enum_EventActionType.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/test.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_PrivateState.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/HeroProc.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/base/CmdCode.php</file>
         </group>
     </open-files>
 </project-private>