From c66fdcf0ed30144460824923a7749dc4b12aee01 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Mon, 4 Jan 2021 10:49:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=85=AC=E4=BC=9A=E5=9B=BE=E8=85=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Guild/GuildChangePopup.lua | 46 +++++++++++-------- .../~Lua/Modules/Guild/GuildInfoPopup.lua | 10 +++- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/GuildChangePopup.lua b/Assets/ManagedResources/~Lua/Modules/Guild/GuildChangePopup.lua index c23c90428a..338f7b67c9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/GuildChangePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/GuildChangePopup.lua @@ -254,10 +254,10 @@ function this.RefreshLogoShow() -- 刷新 this.RefreshLogoImage() -- 创建消耗 - local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost - local costName = ConfigManager.GetConfigData(ConfigName.ItemConfig, cost[1]).Name - this.costTip.text = string.format(Language[10846], cost[2], costName) - this.costTip.gameObject:SetActive(true) + -- local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost + -- local costName = ConfigManager.GetConfigData(ConfigName.ItemConfig, cost[1]).Name + --this.costTip.text = string.format(Language[10846], cost[2], costName) + this.costTip.gameObject:SetActive(false) end -- 刷新图腾显示 @@ -273,25 +273,35 @@ function this.RefreshLogoImage(logoId) end function this.SaveLogo() - -- 判断物品数量 - local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost - local haveNum = BagManager.GetItemCountById(cost[1]) - if haveNum < cost[2] then - PopupTipPanel.ShowTip(Language[10847]) - return - end + -- -- 判断物品数量 + -- local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost + -- local haveNum = BagManager.GetItemCountById(cost[1]) + -- if haveNum < cost[2] then + -- PopupTipPanel.ShowTip(Language[10847]) + -- return + -- end + + -- local guildData = MyGuildManager.GetMyGuildInfo() + -- if this.logoId == guildData.icon then + -- this:ClosePanel() + -- return + -- end + + -- CostConfirmPopup.Show(cost[1], cost[2], Language[10848], nil, function() + -- MyGuildManager.RequestChangeLogo(this.logoId, function() + -- this:ClosePanel() + -- PopupTipPanel.ShowTip(Language[10849]) + -- end) + -- end) local guildData = MyGuildManager.GetMyGuildInfo() if this.logoId == guildData.icon then this:ClosePanel() return - end - - CostConfirmPopup.Show(cost[1], cost[2], Language[10848], nil, function() - MyGuildManager.RequestChangeLogo(this.logoId, function() - this:ClosePanel() - PopupTipPanel.ShowTip(Language[10849]) - end) + end + MyGuildManager.RequestChangeLogo(this.logoId, function() + this:ClosePanel() + PopupTipPanel.ShowTip(Language[10849]) end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua index 75a1d98916..3b43687984 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/GuildInfoPopup.lua @@ -101,7 +101,13 @@ function GuildInfoPopup:BindEvent() end) -- 公会图腾 Util.AddClick(this.btnLogo, function() - UIManager.OpenPanel(UIName.GuildLogoPopup) + --UIManager.OpenPanel(UIName.GuildLogoPopup) + local pos = MyGuildManager.GetMyPositionInGuild() + if pos ~= GUILD_GRANT.MASTER and pos ~= GUILD_GRANT.ADMIN then + PopupTipPanel.ShowTip(Language[10923]) + return + end + UIManager.OpenPanel(UIName.GuildChangePopup, GUILD_CHANGE_TYPE.LOGO) end) -- 基础操作 @@ -337,7 +343,7 @@ function this.RefreshBaseInfoShow() local pos = MyGuildManager.GetMyPositionInGuild() this.guildCharge:SetActive(pos ~= GUILD_GRANT.MEMBER) this.btnDismiss:SetActive(pos == GUILD_GRANT.MASTER) - + this.btnLogo:SetActive(pos == GUILD_GRANT.MASTER) this.dismissStr.text = Language[10918] this.dismissTime.gameObject:SetActive(false) if pos == GUILD_GRANT.MASTER then