【优化】修改公会图腾功能
parent
853b541fb5
commit
c66fdcf0ed
|
@ -254,10 +254,10 @@ function this.RefreshLogoShow()
|
||||||
-- 刷新
|
-- 刷新
|
||||||
this.RefreshLogoImage()
|
this.RefreshLogoImage()
|
||||||
-- 创建消耗
|
-- 创建消耗
|
||||||
local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost
|
-- local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost
|
||||||
local costName = ConfigManager.GetConfigData(ConfigName.ItemConfig, cost[1]).Name
|
-- local costName = ConfigManager.GetConfigData(ConfigName.ItemConfig, cost[1]).Name
|
||||||
this.costTip.text = string.format(Language[10846], cost[2], costName)
|
--this.costTip.text = string.format(Language[10846], cost[2], costName)
|
||||||
this.costTip.gameObject:SetActive(true)
|
this.costTip.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 刷新图腾显示
|
-- 刷新图腾显示
|
||||||
|
@ -273,25 +273,35 @@ function this.RefreshLogoImage(logoId)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.SaveLogo()
|
function this.SaveLogo()
|
||||||
-- 判断物品数量
|
-- -- 判断物品数量
|
||||||
local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost
|
-- local cost = ConfigManager.GetConfigData(ConfigName.GuildSetting, 1).TotemCost
|
||||||
local haveNum = BagManager.GetItemCountById(cost[1])
|
-- local haveNum = BagManager.GetItemCountById(cost[1])
|
||||||
if haveNum < cost[2] then
|
-- if haveNum < cost[2] then
|
||||||
PopupTipPanel.ShowTip(Language[10847])
|
-- PopupTipPanel.ShowTip(Language[10847])
|
||||||
return
|
-- return
|
||||||
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)
|
||||||
|
|
||||||
local guildData = MyGuildManager.GetMyGuildInfo()
|
local guildData = MyGuildManager.GetMyGuildInfo()
|
||||||
if this.logoId == guildData.icon then
|
if this.logoId == guildData.icon then
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
MyGuildManager.RequestChangeLogo(this.logoId, function()
|
||||||
CostConfirmPopup.Show(cost[1], cost[2], Language[10848], nil, function()
|
this:ClosePanel()
|
||||||
MyGuildManager.RequestChangeLogo(this.logoId, function()
|
PopupTipPanel.ShowTip(Language[10849])
|
||||||
this:ClosePanel()
|
|
||||||
PopupTipPanel.ShowTip(Language[10849])
|
|
||||||
end)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -101,7 +101,13 @@ function GuildInfoPopup:BindEvent()
|
||||||
end)
|
end)
|
||||||
-- 公会图腾
|
-- 公会图腾
|
||||||
Util.AddClick(this.btnLogo, function()
|
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)
|
end)
|
||||||
|
|
||||||
-- 基础操作
|
-- 基础操作
|
||||||
|
@ -337,7 +343,7 @@ function this.RefreshBaseInfoShow()
|
||||||
local pos = MyGuildManager.GetMyPositionInGuild()
|
local pos = MyGuildManager.GetMyPositionInGuild()
|
||||||
this.guildCharge:SetActive(pos ~= GUILD_GRANT.MEMBER)
|
this.guildCharge:SetActive(pos ~= GUILD_GRANT.MEMBER)
|
||||||
this.btnDismiss:SetActive(pos == GUILD_GRANT.MASTER)
|
this.btnDismiss:SetActive(pos == GUILD_GRANT.MASTER)
|
||||||
|
this.btnLogo:SetActive(pos == GUILD_GRANT.MASTER)
|
||||||
this.dismissStr.text = Language[10918]
|
this.dismissStr.text = Language[10918]
|
||||||
this.dismissTime.gameObject:SetActive(false)
|
this.dismissTime.gameObject:SetActive(false)
|
||||||
if pos == GUILD_GRANT.MASTER then
|
if pos == GUILD_GRANT.MASTER then
|
||||||
|
|
Loading…
Reference in New Issue