【优化】修改公会图腾功能
parent
853b541fb5
commit
c66fdcf0ed
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue