|
@@ -68,29 +68,8 @@ class Ins_TaskStep extends Object_ext {
|
|
|
if ($this->mo()->finishact > 0) {
|
|
|
$act = GameConfig::eventAction_getItem($this->mo()->finishact);
|
|
|
$this->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]);
|
|
|
-// foreach ($arr as $plot) {
|
|
|
-// isEditor() and $plot = new \sm_plot();
|
|
|
-// if (!empty($plot->presentItem)) {
|
|
|
-// StoreProc::AddMultiItemInStore(req(), $plot->presentItem);
|
|
|
-// }
|
|
|
-// if (!empty($plot->recycleItem)) {
|
|
|
-// $val = explode(",", $plot->recycleItem);
|
|
|
-// my_Assert(count($val) > 1, "解析回收道具字符串出错");
|
|
|
-// StoreProc::removeItemFromStore($store, $val[0], $val[1]);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// case Enum_EventActionType::UnlockBuild: # 解锁建筑
|
|
|
-// req()->userInfo->game->privateState->unlockedBuild[] = $act->parameters;
|
|
|
-// $this->actState = 2;
|
|
|
-// break;
|
|
|
-// }
|
|
|
}
|
|
|
+ $this->actState = 2;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -107,8 +86,9 @@ class Ins_TaskStep extends Object_ext {
|
|
|
foreach ($arr as $plot) {
|
|
|
isEditor() and $plot = new \sm_plot();
|
|
|
if (!empty($plot->presentItem)) {
|
|
|
- if (strtolower($plot->presentItem) == strtolower("unlockBuild") //
|
|
|
- || strtolower($plot->presentItem) == strtolower("rename")) {
|
|
|
+ if (strtolower($plot->presentItem) == strtolower("unlockBuild")) { # 特殊处理, 剧情中解锁建筑
|
|
|
+ req()->userInfo->game->privateState->unlockedBuild[] = $plot->presentEffect;
|
|
|
+ } else if (strtolower($plot->presentItem) == strtolower("rename")) {
|
|
|
// 跳过特殊字符串
|
|
|
} else {
|
|
|
StoreProc::AddMultiItemInStore(req(), $plot->presentItem);
|
|
@@ -117,13 +97,12 @@ class Ins_TaskStep extends Object_ext {
|
|
|
if (!empty($plot->recycleItem)) {
|
|
|
$val = explode(",", $plot->recycleItem);
|
|
|
my_Assert(count($val) > 1, "解析回收道具字符串出错");
|
|
|
- StoreProc::removeItemFromStore($store, $val[0], $val[1]);
|
|
|
+ StoreProc::removeItemFromStore(req()->userInfo->game->store, $val[0], $val[1]);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case Enum_EventActionType::UnlockBuild: # 解锁建筑
|
|
|
req()->userInfo->game->privateState->unlockedBuild[] = $act->parameters;
|
|
|
- $this->actState = 2;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -135,30 +114,8 @@ class Ins_TaskStep extends Object_ext {
|
|
|
if ($this->mo()->startact > 0) {
|
|
|
$act = GameConfig::eventAction_getItem($this->mo()->startact);
|
|
|
$this->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]);
|
|
|
-// foreach ($arr as $plot) {
|
|
|
-// isEditor() and $plot = new \sm_plot();
|
|
|
-// if (!empty($plot->presentItem)) {
|
|
|
-// StoreProc::AddMultiItemInStore(req(), $plot->presentItem);
|
|
|
-// }
|
|
|
-// if (!empty($plot->recycleItem)) {
|
|
|
-// $val = explode(",", $plot->recycleItem);
|
|
|
-// my_Assert(count($val) > 1, "解析回收道具字符串出错");
|
|
|
-// StoreProc::removeItemFromStore($store, $val[0], $val[1]);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// case Enum_EventActionType::UnlockBuild: # 解锁建筑
|
|
|
-// req()->userInfo->game->privateState->unlockedBuild[] = $act->parameters;
|
|
|
-// NormalEventProc::OnUnlockBuild($act->parameters);
|
|
|
-// $this->actState = 1;
|
|
|
-// break;
|
|
|
-// }
|
|
|
}
|
|
|
+ $this->actState = 1;
|
|
|
}
|
|
|
|
|
|
/**
|