Browse Source

fixed: 解析action的参数.

gwang 4 years ago
parent
commit
9b3e7ee036
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Gameserver/Amfphp/model/User/Ins_TaskStep.php

+ 6 - 1
Gameserver/Amfphp/model/User/Ins_TaskStep.php

@@ -93,12 +93,17 @@ class Ins_TaskStep extends Object_ext {
         }
     }
 
+    /**
+     * 
+     * @param \sm_eventAction $act
+     */
     private function execAct($act) {
         my_Assert($act, ErrCode::err_const_no);
         switch ($act->cmd) {
             case Enum_EventActionType::StartPlotScene:                          # 触发场景剧情,
             case Enum_EventActionType::StartPlotNPC:                            # 触发NPC剧情
-                $arr = GameConfig::plot_getItem($act->parameters[0], $act->parameters[1]);
+                $paras = explode(',', $act->parameters);                        # 解析下参数
+                $arr = GameConfig::plot_getItem($paras[0], $paras[1]);          # 查找对应的剧情
                 foreach ($arr as $plot) {
                     isEditor() and $plot = new \sm_plot();
                     if (!empty($plot->presentItem)) {