Branch_DNA
parent
a8f8a12afe
commit
45b3c365e1
|
|
@ -109,7 +109,6 @@ function ChatPanel:BindEvent()
|
|||
return
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
ChatManager.RequestSendChatMsg(this.curChannel, content, function()
|
||||
-- 清空聊天显示
|
||||
|
|
@ -119,10 +118,12 @@ function ChatPanel:BindEvent()
|
|||
this.freeCount:SetActive(PrivilegeManager.GetPrivilegeRemainValue(91001) > 0)
|
||||
this.buyCount:SetActive(PrivilegeManager.GetPrivilegeRemainValue(91001) <= 0)
|
||||
if PrivilegeManager.GetPrivilegeRemainValue(91001) > 0 then
|
||||
this.freeCount:GetComponent("Text").text = string.format(GetLanguageStrById(10647),PrivilegeManager.GetPrivilegeRemainValue(91001))
|
||||
this.freeCount:GetComponent("Text").text = string.format(GetLanguageStrById(10647),
|
||||
PrivilegeManager.GetPrivilegeRemainValue(91001))
|
||||
else
|
||||
local costItem = string.split(G_SpecialConfig[155].Value, "#")
|
||||
this.buyCount:GetComponent("Image").sprite = Util.LoadSprite(GetResourcePath(G_ItemConfig[tonumber(costItem[1])].ResourceID))
|
||||
this.buyCount:GetComponent("Image").sprite = Util.LoadSprite(GetResourcePath(G_ItemConfig
|
||||
[tonumber(costItem[1])].ResourceID))
|
||||
this.buyCountText:GetComponent("Text").text = "x" .. costItem[2]
|
||||
end
|
||||
end
|
||||
|
|
@ -169,7 +170,6 @@ function ChatPanel:OnOpen(...)
|
|||
this.jumpType = args[2] or 1
|
||||
this.curTabIndex = args[1] or 4
|
||||
this.curChannel = _TabData[this.curTabIndex].channel
|
||||
|
||||
end
|
||||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
|
|
@ -280,6 +280,7 @@ function this.TabIsLockCheck(index)
|
|||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- 节点状态改变回调事件
|
||||
function this.OnTabChange(index, lastIndex)
|
||||
-- 关闭上个界面
|
||||
|
|
@ -307,6 +308,13 @@ function this.OnTabChange(index, lastIndex)
|
|||
end
|
||||
if this.curChannel == 1 or this.curChannel == 2 or this.curChannel == 16 then
|
||||
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.CHAT) then
|
||||
if this.curChannel == 1 and VipManager.GetChargedNum() < 30 then
|
||||
this.chatImgBtn:SetActive(false)
|
||||
this.chatImgBtn:SetActive(false)
|
||||
this.input:SetActive(false)
|
||||
this.noInputTip:SetActive(true)
|
||||
this.noInputTip:GetComponent("Text").text = "充值30元可解锁发言!"
|
||||
else
|
||||
this.input:SetActive(true)
|
||||
this.chatImgBtn:SetActive(true)
|
||||
this.noInputTip:SetActive(false)
|
||||
|
|
@ -315,15 +323,18 @@ function this.OnTabChange(index, lastIndex)
|
|||
this.freeCount:SetActive(PrivilegeManager.GetPrivilegeRemainValue(91001) > 0)
|
||||
this.buyCount:SetActive(PrivilegeManager.GetPrivilegeRemainValue(91001) <= 0)
|
||||
if PrivilegeManager.GetPrivilegeRemainValue(91001) > 0 then
|
||||
this.freeCount:GetComponent("Text").text = string.format(GetLanguageStrById(10647),PrivilegeManager.GetPrivilegeRemainValue(91001))
|
||||
this.freeCount:GetComponent("Text").text = string.format(GetLanguageStrById(10647),
|
||||
PrivilegeManager.GetPrivilegeRemainValue(91001))
|
||||
else
|
||||
local costItem = string.split(G_SpecialConfig[155].Value, "#")
|
||||
this.buyCount:GetComponent("Image").sprite = Util.LoadSprite(GetResourcePath(G_ItemConfig[tonumber(costItem[1])].ResourceID))
|
||||
this.buyCount:GetComponent("Image").sprite = Util.LoadSprite(GetResourcePath(G_ItemConfig
|
||||
[tonumber(costItem[1])].ResourceID))
|
||||
this.buyCountText:GetComponent("Text").text = "x" .. costItem[2]
|
||||
end
|
||||
else
|
||||
this.btncount:SetActive(false)
|
||||
end
|
||||
end
|
||||
else
|
||||
this.chatImgBtn:SetActive(false)
|
||||
this.chatImgBtn:SetActive(false)
|
||||
|
|
@ -356,7 +367,6 @@ function ChatPanel:SetScrollItem(go, data, index)
|
|||
Util.AddOnceClick(go.gameObject, function()
|
||||
this.inputText.text = this.inputText.text .. data.Esc
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
-- 数据变化回调
|
||||
|
|
@ -448,7 +458,6 @@ function this.GetScrollView(index)
|
|||
this.FriendScrollView = sv
|
||||
end
|
||||
return this.FriendScrollView
|
||||
|
||||
elseif index == 2 then
|
||||
if not this.GongHuiScrollView then
|
||||
local rootHight = this.scrollRoot.transform.rect.height
|
||||
|
|
@ -524,7 +533,8 @@ function this.SystemItemAdapter(node, data, isShowTime)
|
|||
local itemDataConFig = itemConfig[data.itemId]
|
||||
if not itemDataConFig then return end
|
||||
if itemDataConFig.ItemType == ItemType.Hero then
|
||||
local heroConfigData = ConfigManager.GetConfigData(ConfigName.HeroConfig, itemConfig[data.itemId].HeroStar[1])
|
||||
local heroConfigData = ConfigManager.GetConfigData(ConfigName.HeroConfig, itemConfig[data.itemId].HeroStar
|
||||
[1])
|
||||
UIManager.OpenPanel(UIName.RoleGetInfoPopup, false, heroConfigData.Id, itemConfig[data.itemId].HeroStar[2])
|
||||
elseif itemDataConFig.ItemType == ItemType.Equip then
|
||||
UIManager.OpenPanel(UIName.HandBookEquipInfoPanel, data.itemId)
|
||||
|
|
@ -608,14 +618,12 @@ function this.ChatItemAdapter(node, data, isShowTime, isShowServerName, isFriend
|
|||
GuildManager.RequestApplyManyGuilds({ chat.gId }, function()
|
||||
PopupTipPanel.ShowTipByLanguageId(10412)
|
||||
end)
|
||||
|
||||
elseif chat.joinType == GUILD_JOIN_TYPE.FORBID then
|
||||
PopupTipPanel.ShowTipByLanguageId(10413)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
elseif this.curChannel == CHAT_CHANNEL.FAMILY then
|
||||
local chat = ChatManager.AnalysisGlobalChat(data.msg)
|
||||
contentStr = chat.content
|
||||
|
|
@ -662,7 +670,8 @@ function this.ChatItemAdapter(node, data, isShowTime, isShowServerName, isFriend
|
|||
if data.senderId == PlayerManager.uid then
|
||||
-- lv.text = "Lv." .. PlayerManager.level
|
||||
if isShowServerName then
|
||||
name.text = PlayerManager.nickName .. "[Lv." .. PlayerManager.level .. "]" .. "<color='#9fff88'> [" .. data.serverName .. "]</color>"
|
||||
name.text = PlayerManager.nickName ..
|
||||
"[Lv." .. PlayerManager.level .. "]" .. "<color='#9fff88'> [" .. data.serverName .. "]</color>"
|
||||
else
|
||||
name.text = PlayerManager.nickName .. "[Lv." .. PlayerManager.level .. "]"
|
||||
end
|
||||
|
|
@ -692,7 +701,8 @@ function this.ChatItemAdapter(node, data, isShowTime, isShowServerName, isFriend
|
|||
else
|
||||
-- lv.text = "Lv." .. data.senderlevel
|
||||
if isShowServerName then
|
||||
name.text = data.senderName .. "[Lv." .. data.senderlevel .. "]" .. "<color='#9fff88'> [" .. data.serverName .. "]</color>"
|
||||
name.text = data.senderName ..
|
||||
"[Lv." .. data.senderlevel .. "]" .. "<color='#9fff88'> [" .. data.serverName .. "]</color>"
|
||||
else
|
||||
name.text = data.senderName .. "[Lv." .. data.senderlevel .. "]"
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue