diff --git a/AssetBundles/version.txt b/AssetBundles/version.txt index d5eeae50df..80db9fabb3 100644 --- a/AssetBundles/version.txt +++ b/AssetBundles/version.txt @@ -1 +1 @@ -{"buglyId":"b67b061643", "channel":"pc", "resUrl":"http://60.1.1.12/jieling_dl/dev/assetBundles/subChannal094-test/", "packageVersion":"0.2", "subChannel":"1", "version":"0.15.1", "serverUrl":"http://60.1.1.23:8080/"} \ No newline at end of file +{"subChannel":"1", "buglyId":"b67b061643", "channel":"pc", "resUrl":"http://60.1.1.12/jieling_dl/dev/assetBundles/subChannal094-test/", "packageVersion":"0.2", "version":"0.15.1", "serverUrl":"http://60.1.1.23:8080/"} \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 1d6a1ef4f8..fc290a4720 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -659,6 +659,7 @@ JumpType = { FiveStarActivity = 10008, --五星成长礼 Setting = 10009, --设置界面 FindFairy = 10010, --东海寻仙 + GuildAid = 10011, --公会援助 } YaoHunFrame = { --[6] = "r_tongyong_yaohunkuang002", @@ -1176,7 +1177,8 @@ NumToSimplenessFont = { GLOBAL_CHAT_TYPE = { COMMON = 0, GUILD_INVITE = 1, - GUILD_REDPACKET=2 + GUILD_REDPACKET=2, + GUILD_AID=3, } -- 公共聊天记录最大保存数量 PUBLIC_CHAT_MAX_NUM = 50 diff --git a/Assets/ManagedResources/~Lua/Modules/Chat/ChatManager.lua b/Assets/ManagedResources/~Lua/Modules/Chat/ChatManager.lua index 38fe0e769f..bbd0e8b0f6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Chat/ChatManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Chat/ChatManager.lua @@ -397,7 +397,7 @@ function this.RequestSendGuildAid(itemId1,itemId2,func) local content = "" if itemId2 then content = string.format( - ConfigManager.GetConfigData(ConfigName.ErrorCodeHint,120).Desc, + ConfigManager.GetConfigData(ConfigName.ErrorCodeHint,121).Desc, PlayerManager.nickName, ConfigManager.GetConfigData(ConfigName.ItemConfig,itemId1).Name, tostring(ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).RecourseTime[2]), @@ -405,14 +405,19 @@ function this.RequestSendGuildAid(itemId1,itemId2,func) tostring(ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).RecourseTime[2]) ) else + content = string.format( - ConfigManager.GetConfigData(ConfigName.ErrorCodeHint,121).Desc, + ConfigManager.GetConfigData(ConfigName.ErrorCodeHint,120).Desc, PlayerManager.nickName, ConfigManager.GetConfigData(ConfigName.ItemConfig,itemId1).Name, tostring(ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).RecourseTime[2]) ) end - LogError("content "..content) + content = string.format( + "%d#%s", + GLOBAL_CHAT_TYPE.GUILD_AID, + content + ) -- 发送消息 NetManager.RequestSendChatMsg(channel, content, 0, function() local msgId = this.GetMsgIdFlag(channel) @@ -470,6 +475,8 @@ function this.AnalysisGlobalChat(msg) chat.nickName=headList[2] chat.redpackName=headList[3] chat.content = string.format("%s 发送了%s,请迅速前往抢夺红包!",chat.nickName,chat.redpackName) + elseif chat.type==GLOBAL_CHAT_TYPE.GUILD_AID then + chat.content = headList[2] end return chat end diff --git a/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua b/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua index dc541b933f..9fce4556a9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua @@ -442,6 +442,10 @@ function this.ChatItemAdapter(node, data, isShowTime) Util.AddOnceClick(content.gameObject, function() end) elseif chat.type == GLOBAL_CHAT_TYPE.GUILD_REDPACKET then contentStr=chat.content + elseif chat.type == GLOBAL_CHAT_TYPE.GUILD_AID then + Util.AddOnceClick(content.gameObject, function() + JumpManager.GoJump(72001) + end) end else contentStr = data.msg diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_GuildAid.lua b/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_GuildAid.lua index 790186045d..3bf53f4969 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_GuildAid.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_GuildAid.lua @@ -55,7 +55,7 @@ function this.SingleHelpAidDataShow(go,data) Util.GetGameObject(go, "heroPro/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(itemConfig[data.type].Quantity)) --Util.GetGameObject(go, "heroPro/frame/icon"):GetComponent("Image").sprite = Util.LoadSprite(GetResourcePath(itemConfig[data.type].ResourceID)) Util.GetGameObject(go, "heroPro/frame/chipImage"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroChipQuantityImageByquality(itemConfig[data.type].Quantity)) - LogError("data.name "..data.name) + --LogError("data.name "..data.name) Util.GetGameObject(go, "okAid/chipInfo"):GetComponent("Text").text = data.name Util.GetGameObject(go, "okAid/getAidText"):GetComponent("Text").text = itemConfig[data.type].Name Util.GetGameObject(go, "okAid/getAidText/getAidNumText"):GetComponent("Text").text = "("..data.num.."/"..guildHelpConfig[1].RecourseTime[2]..")" diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_MyAid.lua b/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_MyAid.lua index db44ad98e8..8f2a24a3c7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_MyAid.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/Aid/GuildAid_MyAid.lua @@ -48,9 +48,11 @@ function this:BindEvent() if msg.sendMessage then ChatManager.RequestSendGuildAid(itemId1,itemId2,function() PopupTipPanel.ShowTip("求助发送成功!") + MyGuildManager._GuildAidTimeStamp = GetTimeStamp() end) else - PopupTipPanel.ShowTip("不可发送援助信息!") + MyGuildManager.ShowGuildAidCdTime() + --PopupTipPanel.ShowTip("不可发送援助信息!") end end) end) diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/MyGuildManager.lua b/Assets/ManagedResources/~Lua/Modules/Guild/MyGuildManager.lua index 98c7970a3b..2a41652f45 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/MyGuildManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/MyGuildManager.lua @@ -794,4 +794,15 @@ function MyGuildManager.RefreshAidRedPot() CheckRedPointStatus(RedPointType.Guild_AidGuild) CheckRedPointStatus(RedPointType.Guild_AidMy) end +this._GuildAidTimeStamp = 0 +function MyGuildManager.ShowGuildAidCdTime() + -- 判断是否在冷却 + local _CurTimeStamp = GetTimeStamp() + local stampTime = ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).RecourseCD + if this._GuildAidTimeStamp and _CurTimeStamp - this._GuildAidTimeStamp < stampTime then + local cd = math.floor(stampTime - (_CurTimeStamp - this._GuildAidTimeStamp)) + PopupTipPanel.ShowTip("操作需间隔"..GetLeftTimeStrByDeltaTime(cd).."钟") + return + end +end return this diff --git a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua index 45ca9bfa9b..2760a25b79 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua @@ -390,6 +390,14 @@ local jumpDic = { PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.EXPEDITION)) end end, + [JumpType.GuildAid] = function(data)--公会援助 + if UIManager.IsOpen(UIName.GuildMainCityPanel) then + UIManager.OpenPanel(UIName.GuildAidMainPopup,data[1]) + else + UIManager.OpenPanel(UIName.GuildMainCityPanel) + UIManager.OpenPanel(UIName.GuildAidMainPopup,data[1]) + end + end, } function this.CheckJump(_jumpId) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_GuildAid.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_GuildAid.lua index c17e975e35..ecc5cb9162 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_GuildAid.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_GuildAid.lua @@ -56,9 +56,11 @@ function this:BindEvent() if msg.sendMessage then ChatManager.RequestSendGuildAid(itemId1,itemId2,function() PopupTipPanel.ShowTip("求助发送成功!") + MyGuildManager._GuildAidTimeStamp = GetTimeStamp() end) else - PopupTipPanel.ShowTip("不可发送援助信息!") + --PopupTipPanel.ShowTip("不可发送援助信息!") + MyGuildManager.ShowGuildAidCdTime() end if fun then fun()