diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapOptionPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapOptionPanel.lua index 72578256fd..2d20d307e1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapOptionPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapOptionPanel.lua @@ -147,7 +147,8 @@ function MapOptionPanel:OnOpen(...) if isFirstOpen then this.SetBg() end - this.RefreshPanel() + jumpId = 0 + nextOptId = 0 if panleType == 3 then nextOptId = options[1] jumpId = options[2] @@ -157,6 +158,7 @@ function MapOptionPanel:OnOpen(...) elseif panleType == 11 then nextOptId = options[1] end + this.RefreshPanel() else Log("传入的参数为空!!") return @@ -176,15 +178,18 @@ function this.OnInfoChange(_showType, _eventId, _showValues, _options) local isOptionPanel = panleType == 4 this.PanelInit(isOptionPanel) - - if isOptionPanel then + jumpId = 0 + nextOptId = 0 + if panleType == 3 then + nextOptId = options[1] + jumpId = options[2] + elseif panleType == 4 then -- 初始化动画 this.InitAnimi() - else + elseif panleType == 11 then nextOptId = options[1] - jumpId = options[2] - this.RefreshPanel() end + this.RefreshPanel() end end @@ -305,7 +310,6 @@ function this.ShowLive2d(resId, live2dDir) else live2dRoot = this.left2dRoot end - LogGreen("roleName:"..roleName) if not roleName or roleName == "" then this.nameFrame:SetActive(false) else diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua index eaea556bbf..c73d979404 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua @@ -437,6 +437,7 @@ local funcList = { [8] = noHandle, [9] = noHandle, [10] = createNamePanel, + [11] = mapDialoguePanel, [13] = walkingShop, [14] = elitePanel, [15] = trailMapShop, diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/OptionBehaviourManager.lua b/Assets/ManagedResources/~Lua/Modules/Mission/OptionBehaviourManager.lua index b3546ffb2f..608fd87bc7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/OptionBehaviourManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/OptionBehaviourManager.lua @@ -21,19 +21,13 @@ end function this.UpdateEventPoint(msg, optionId, func) -- 下一个事件ID this.nextEventId = msg.eventId - -- 行为类型 - LogGreen("msg.EventBehaviorCommon.behaviorType:"..msg.EventBehaviorCommon.behaviorType) local behaviorType = msg.EventBehaviorCommon.behaviorType - -- 推任务专用消息 - -- --LogGreen("msg中返回的事件ID是 ".. (msg.eventId or "无事件id")) - -- --LogGreen("msg中得到的行为类型是 ".. behaviorType) - -- --LogGreen("msg中返回的剩余时间 " .. (msg.leftTime or "无时间")) local beArgs = {} for i=1, #msg.EventBehaviorCommon.eventBehaviorValues do local item = msg.EventBehaviorCommon.eventBehaviorValues[i] local args = {} for j=1, #item.behaviorValues do - --Log("item id:"..item.behaviorValues[j]) + ----Log("item id:"..item.behaviorValues[j]) args[j] = item.behaviorValues[j] end beArgs[i] = args @@ -54,7 +48,6 @@ function this.UpdateEventPoint(msg, optionId, func) elseif behaviorType == 3 then -- 侦查 elseif behaviorType == 4 then elseif behaviorType == 5 then - Log("服务器收到的地图ID") behaviorNodeList = { {"MoveTo", {mapID = beArgs[1][1], u = beArgs[1][2], v = beArgs[1][3] }}, @@ -147,7 +140,7 @@ function this.UpdateEventPoint(msg, optionId, func) } elseif behaviorType == 23 then --第一次触发时,完成任务往下推一步。 elseif behaviorType == 24 then --服务器跳转地图点到指定状态,客户端不读取新事件 - Log("服务器执行行为") + --Log("服务器执行行为") elseif behaviorType == 25 then --完成任务往下推一步,销毁当前地图点,服务器跳转地图点到指定状态,客户端不读取新事件 4#103018#103019 任务id#地图点id#新事件id behaviorNodeList = { {"ParseMission", {mission = msg.mission, isInit = false, drop = msg.missionDrop}}, @@ -157,7 +150,7 @@ function this.UpdateEventPoint(msg, optionId, func) elseif behaviorType == 27 then -- 服务器推送下一个任务 elseif behaviorType == 28 then -- 扣除行动力 local num = beArgs[1][1] - Log("28 ------------事件点扣除行动力------------- MapManager.leftStep-num ".. MapManager.leftStep.." "..num) + --Log("28 ------------事件点扣除行动力------------- MapManager.leftStep-num ".. MapManager.leftStep.." "..num) Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 6, 0, 0, num, false) elseif behaviorType == 29 then -- 消耗道具并销毁当前位置 @@ -274,7 +267,6 @@ function this.UpdateEventPoint(msg, optionId, func) } elseif behaviorType == 49 then -- 事件点开始倒计时 - Log("事件点开始倒计时,在Indication中执行") behaviorNodeList = { {"ShowReward", {drop = msg.drop}}, } @@ -327,7 +319,7 @@ function this.UpdateEventPoint(msg, optionId, func) table.insert(behaviorNodeList, {"ShowReward", {drop = msg.drop}}) end -- 执行行为节点 - Log("执行事件,behaviorType = ".. behaviorType) + --Log("执行事件,behaviorType = ".. behaviorType) BHController.SeqExcuteNodeArray(behaviorNodeList, function() if func then func(this.nextEventId) end end) @@ -356,7 +348,7 @@ function this.JumpEventPoint(eventId, optionId, panel, func) elseif jumpType == 1 or jumpType == 2 or jumpType == 3 or jumpType == 11 then --读取,刷新事件点 NetManager.EventUpdateRequest(eventId, optionId, function (e) MissionManager.EventPointTrigger(e) - Log(" 后端返回事件点ID " .. e) + --Log(" 后端返回事件点ID " .. e) Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 1, optionId) end) elseif jumpType == 5 or jumpType == 7 or jumpType == 8 then --关闭界面,读取,刷新事件点