From 666f77c3dbb358ea673a2b0c62165f84282db6de Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 27 May 2021 17:34:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=B0=BD=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EndLessTreasurePanel.prefab | 77 ++++++++++++++++++- .../Modules/Carbon/EndLessCarbonPanel.lua | 4 +- .../Formation/View/CarbonFormation.lua | 8 +- .../~Lua/Modules/Map/EndLessMapManager.lua | 2 +- .../~Lua/Modules/Map/Logic/TileMapView.lua | 5 ++ .../~Lua/Modules/Map/MapManager.lua | 7 +- .../~Lua/Modules/Map/MapPanel.lua | 12 ++- .../~Lua/Modules/Map/View/EndLessMapView.lua | 1 + .../~Lua/Modules/Map/View/MapControllView.lua | 1 + .../~Lua/Modules/Net/IndicationManager.lua | 11 ++- .../~Lua/Modules/Net/NetManager.lua | 3 +- 11 files changed, 116 insertions(+), 15 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/TreasureOfHeaven/EndLessTreasurePanel.prefab b/Assets/ManagedResources/Prefabs/UI/TreasureOfHeaven/EndLessTreasurePanel.prefab index 52a69da3ff..cc42449b73 100644 --- a/Assets/ManagedResources/Prefabs/UI/TreasureOfHeaven/EndLessTreasurePanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/TreasureOfHeaven/EndLessTreasurePanel.prefab @@ -167,6 +167,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: + - {fileID: 392200360282455416} - {fileID: 417611533} m_Father: {fileID: 0} m_RootOrder: 0 @@ -575,7 +576,7 @@ RectTransform: - {fileID: 662672666} - {fileID: 701306888} m_Father: {fileID: 242517190} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -2597,6 +2598,80 @@ MonoBehaviour: m_ChildForceExpandHeight: 0 m_ChildControlWidth: 0 m_ChildControlHeight: 0 +--- !u!1 &5189724795882588538 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 392200360282455416} + - component: {fileID: 4022435860038932995} + - component: {fileID: 6275749967492990847} + m_Layer: 5 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &392200360282455416 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5189724795882588538} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 242517190} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4022435860038932995 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5189724795882588538} + m_CullTransparentMesh: 0 +--- !u!114 &6275749967492990847 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5189724795882588538} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 --- !u!1 &6215952172496680248 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua index 24a90ef8c5..7c2ac7066d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/EndLessCarbonPanel.lua @@ -144,6 +144,7 @@ end function this.EnterMap() CarbonManager.difficulty = CARBON_TYPE.ENDLESS + CarbonManager.carbonType = CARBON_TYPE.ENDLESS --UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId) local serData = ActTimeCtrlManager.GetSerDataByTypeId(FUNCTION_OPEN_TYPE.ENDLESS) if not PlayerPrefs.HasKey("WuJin"..PlayerManager.uid) then @@ -151,11 +152,12 @@ function this.EnterMap() end local note = PlayerPrefs.GetInt("WuJin"..PlayerManager.uid) LogGreen("note:"..note.." serData.endTime:"..serData.endTime) + MapManager.curMapId = EndLessMapManager.openMapId if serData.endTime ~= note then PlayerPrefs.SetInt("WuJin"..PlayerManager.uid,serData.endTime) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId) else - MapManager.curMapId = EndLessMapManager.openMapId + LogGreen("EndLessMapManager.openMapId:"..EndLessMapManager.openMapId.." MapManager.curMapId:"..MapManager.curMapId) MapManager.curCarbonType = CarBonTypeId.ENDLESS NetManager.MapInfoRequest(MapManager.curCarbonType, function() MapManager.isReloadEnter = false diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua index 1b1cfec60c..cf98cd8907 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua @@ -15,7 +15,7 @@ this.IsNeedChangeFormation = true --- 逻辑初始化 function this.Init(root, curMapId) this.root = root - this.curMapId = EndLessMapManager.openMapId + this.curMapId = curMapId this.InitView() end local index = 0 @@ -174,8 +174,10 @@ end -- 根据不同的副本类型进入地图 function this.EnterMapbyType(type)--, itemId) - if type == CARBON_TYPE.NORMAL or type == CARBON_TYPE.HERO or type == CARBON_TYPE.ENDLESS then - MapManager.curMapId = this.curMapId + if type == CARBON_TYPE.NORMAL or type == CARBON_TYPE.HERO then + MapManager.curMapId = this.curMapId + elseif type == CARBON_TYPE.ENDLESS then + MapManager.curMapId = EndLessMapManager.openMapId end local index = CarbonManager.difficulty == CARBON_TYPE.ENDLESS and FormationTypeDef.FORMATION_ENDLESS_MAP or FormationManager.curFormationIndex diff --git a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua index a0150e0beb..797a4ee793 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua @@ -93,7 +93,7 @@ end -- 登录初始化地图数据 function this.InitMapInfoData(mapId) -- --LogGreen("mapId:"..mapId) - this.openMapId = mapId > 1 and mapId or 4002-- 开放的地图ID + this.openMapId = mapId > 1 and mapId or 4001-- 开放的地图ID end -- ================================== 妖灵师状态刷新 ======================================== diff --git a/Assets/ManagedResources/~Lua/Modules/Map/Logic/TileMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/Logic/TileMapView.lua index 395be89508..cfd3f62f75 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/Logic/TileMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/Logic/TileMapView.lua @@ -118,6 +118,11 @@ function this.AwakeInit(go, mapId, wakeCells, tileV2) this.RefreshBuffSize() --加载地图图块数据 + LogGreen("_mapId:".._mapId.." ") + if not _mapConfig[_mapId] then + LogError("表里面没有地图id:".._mapId) + _mapId = 4001 + end local maxU, maxV = _mapConfig[_mapId].Size[1], _mapConfig[_mapId].Size[2] _mapData = TileMapData.New(maxU, maxV) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua index 49617766a9..ab7d4c78ac 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua @@ -652,14 +652,17 @@ function this.AddContionType(AddCondtionID, eventId, option, panel, func) if isPass then OptionBehaviourManager.JumpEventPoint(eventId, option, panel) else - MsgPanel.ShowOne(GetLanguageStrById(OptionAddConfig[AddCondtionID].Info) .. Language[11230] .. Language[11231] .. PropConfig[propId]) + LogGreen("AddCondtionID:"..AddCondtionID) + PopupTipPanel.ShowTip("你不该来到这儿,请离开") + --MsgPanel.ShowOne(GetLanguageStrById(OptionAddConfig[AddCondtionID].Info) .. Language[11230] .. Language[11231] .. PropConfig[propId]) end elseif conditiontype == 4 then --完成某个任务的第几步 local isPass = this.IsAddContionPass(AddCondtionID, 4) if isPass then OptionBehaviourManager.JumpEventPoint(eventId, option, panel) else - MsgPanel.ShowOne(Language[11232] .. GetLanguageStrById(missionConfig[missionId].MainTitle) ..Language[11233] .. stepNeed) + PopupTipPanel.ShowTip("你不该来到这儿,请离开") + --MsgPanel.ShowOne(Language[11232] .. GetLanguageStrById(missionConfig[missionId].MainTitle) ..Language[11233] .. stepNeed) end elseif conditiontype == 5 then -- 判断物品数量小于指定数量 local isPass = this.IsAddContionPass(AddCondtionID, 5) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua index b7f45cd6fe..6cde41ab12 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua @@ -187,7 +187,7 @@ function this:AddListener() Game.GlobalEvent:AddEvent(GameEvent.Map.StopWalk, this.StopWalking) Game.GlobalEvent:AddEvent(GameEvent.FoodBuff.OnFoodBuffStateChanged, this.RefreshBuffShow) -- Game.GlobalEvent:AddEvent(GameEvent.Map.MaskState, this.MaskState) - + Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.InitFuncShow) --missionView.AddListener() playerView.AddListener() ctrlView.AddListener() @@ -206,6 +206,7 @@ function this:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.Map.MapDataChange, this.OnMapDataChange) Game.GlobalEvent:RemoveEvent(GameEvent.Map.StopWalk, this.StopWalking) Game.GlobalEvent:RemoveEvent(GameEvent.FoodBuff.OnFoodBuffStateChanged, this.RefreshBuffShow) + Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.InitFuncShow) -- Game.GlobalEvent:RemoveEvent(GameEvent.Map.MaskState, this.MaskState) --missionView.RemoveListener() @@ -217,6 +218,13 @@ function this:RemoveListener() pointHandleView.RemoveListener() end +function this.InitFuncShow(funcType) + LogGreen("funcType:"..funcType.." "..tostring(funcType == FUNCTION_OPEN_TYPE.ENDLESS).." CarbonManager.carbonType:"..CarbonManager.carbonType) + if funcType == FUNCTION_OPEN_TYPE.ENDLESS and CarbonManager.carbonType == CARBON_TYPE.ENDLESS then + this.SetEndlessShow() + end +end + function this:OnShow() UIManager.camera.clearFlags = CameraClearFlags.Depth local mapId = MapManager.curMapId @@ -301,7 +309,7 @@ end ---==================== 地图初始化处理部分 ================================== function this.SetMapFog() - local mapId = MapManager.curMapId + local mapId = MapManager.curMapId > 0 and MapManager.curMapId or 4001 local fogVal = ChallengeMapConfig[mapId].isShowFog if fogVal and fogVal == 0 then TileMapView.isShowFog = false diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua index 0ae6fe7e47..7ddc30f3c1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua @@ -300,6 +300,7 @@ end function EndLessMapView:OnOpen() + LogError("EndLessMapView:OnOpen") -- 初始化组件显示 this:InitCompShow(CarbonManager.difficulty) if not this:IsEndLessMap() then return end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/MapControllView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/MapControllView.lua index 94588c5938..e38809ce9b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/MapControllView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/MapControllView.lua @@ -43,6 +43,7 @@ function this.Init() TileMapView.OnInit = this.OnInit TileMapView.fogSize = MapManager.fogSize + LogGreen("MapManager.curMapId:"..MapManager.curMapId) TileMapView.AwakeInit(this.Ctrl, MapManager.curMapId, MapManager.wakeCells) TileMapController.IsShieldDrag = function() diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index dad7dd2768..33337f3e50 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -11,6 +11,8 @@ function this.RegisterMessage(network) return end local socket = network.socket + -- 无尽换期刷新地图信息 + socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_MAP_CHANGE_INDICATION, this.RefreshMapData) -- 监听服务器跨天状态N socket:RegistNetMessage(MessageTypeProto_pb.FIVE_PLAYER_REFLUSH_INDICATION, this.RefreshUpdateIndication) socket:RegistNetMessage(MessageTypeProto_pb.ZeroPlayerUpdateIndication, this.ZeroRefreshUpdateIndication) @@ -77,8 +79,6 @@ function this.RegisterMessage(network) socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_MAP_SET_TEAM_INDICATION, this.EndLessTeamChange) --道具直购 socket:RegistNetMessage(MessageTypeProto_pb.DIRECT_BUY_GOODS_INDICATION, this.DirectBuyGoods) - -- 无尽换期刷新地图信息 - socket:RegistNetMessage(MessageTypeProto_pb.ENDLESS_MAP_CHANGE_INDICATION, this.RefreshMapData) -- 任务重置刷新 socket:RegistNetMessage(MessageTypeProto_pb.TREASURE_REFRESH_INDICATION, this.RestTreasureTaskData) -- 戒灵秘宝等级推送 @@ -698,8 +698,11 @@ function this.MapNewAMonster(buffer) for i = 1, #msg.cell do local pos = msg.cell[i].cellId local mapPointId = msg.cell[i].pointId + local config = ConfigManager.GetConfigData(ConfigName.MapPointConfig, mapPointId) + if config.Style == 5 and config.icon == 10 and CarbonManager.carbonType == CARBON_TYPE.ENDLESS then + PopupTipPanel.ShowTip("遗迹中央传来一股令人不安的气息~") + end MapManager.pointAtkPower[msg.cell[i].cellId] = msg.cell[i].monsterForce - Log("无尽副本服务器推送数据,在空地上生成小怪!") MapManager.PanelCloseCallBack(UIName.BattleEndPanel, function() CallBackOnPanelOpen(UIName.MapPanel, function () @@ -741,7 +744,7 @@ function this.RefreshMapData(buffer) local msg = MapInfoProto_pb.EndlessMapChange() msg:ParseFromString(data) LogGreen("推送的世界ID " .. msg.mapId) - EndLessMapManager.openMapId = msg.mapId + EndLessMapManager.openMapId = msg.mapId end function this.RestTreasureTaskData(buffer) diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index 605c2fde3b..5b8eac1da5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -366,7 +366,8 @@ function this.MapInfoRequest(mapModeId,func) local data = buffer:DataByte() local msg = MapInfoProto_pb.MapEnterResponse() msg:ParseFromString(data) - MapManager.curMapId = msg.mapId + LogGreen("msg.mapId:"..msg.mapId) + MapManager.curMapId = msg.mapId > 0 and msg.mapId or 4001 --森罗幻境 英雄 local heros = msg.infos if heros then