Merge branch '0功能/1月6_版本优化' of http://60.1.1.230/gaoxin/JL_Client into 0功能/1月6_版本优化
commit
f7804d531a
|
@ -2,8 +2,8 @@
|
|||
GuildSkillUpLvPopup = Inherit(BasePanel)
|
||||
local this = GuildSkillUpLvPopup
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = GuildSkillType[1] },
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = GuildSkillType[2] },
|
||||
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = GuildSkillType[2] },
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = GuildSkillType[1] },
|
||||
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = GuildSkillType[3] },
|
||||
[4] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = GuildSkillType[4]},
|
||||
}
|
||||
|
@ -13,6 +13,13 @@ local skills = {}
|
|||
local pros = {}
|
||||
local materals = {}
|
||||
local curIndex = 1
|
||||
--界面肉盾 和 输出 交换位置
|
||||
local curIndexChangeFun = {
|
||||
[1] = 2,
|
||||
[2] = 1,
|
||||
[3] = 3,
|
||||
[4] = 4,
|
||||
}
|
||||
local curSeletSkill = {}
|
||||
local allSkillData = {}
|
||||
local materialNoId = 0
|
||||
|
@ -64,9 +71,9 @@ function GuildSkillUpLvPopup:BindEvent()
|
|||
PopupTipPanel.ShowTip(ConfigManager.GetConfigData(ConfigName.ItemConfig,materialNoId).Name..Language[11085])
|
||||
return
|
||||
end
|
||||
NetManager.SinGleGuildSkillUpLv(curIndex,function(msg)
|
||||
NetManager.SinGleGuildSkillUpLv(curIndexChangeFun[curIndex],function(msg)
|
||||
PopupTipPanel.ShowTip(Language[11086])
|
||||
GuildSkillManager.SetSkillDataLv(curIndex,curSeletSkill.id,curSeletSkill.level + 1)
|
||||
GuildSkillManager.SetSkillDataLv(curIndexChangeFun[curIndex],curSeletSkill.id,curSeletSkill.level + 1)
|
||||
this.OnClickTabBtn(curIndex,true)
|
||||
this.RefreshTabRedPoint(curIndex)
|
||||
newWarPowerValue = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
|
@ -85,10 +92,10 @@ function GuildSkillUpLvPopup:BindEvent()
|
|||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.GuildSkill,
|
||||
GuildSkillManager.GetResetGetDrop(curIndex),curIndex,function()
|
||||
GuildSkillManager.GetResetGetDrop(curIndexChangeFun[curIndex]),curIndexChangeFun[curIndex],function()
|
||||
-- CheckRedPointStatus(RedPointType.Guild_Skill)
|
||||
GuildSkillManager.ResetGuildSkillData(curIndex)
|
||||
this.OnClickTabBtn(curIndex,true)
|
||||
GuildSkillManager.ResetGuildSkillData(curIndexChangeFun[curIndex])
|
||||
this.OnClickTabBtn(curIndexChangeFun[curIndex],true)
|
||||
this.RefreshTabRedPoint()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
end)
|
||||
|
@ -123,7 +130,7 @@ function this.TabAdapter(tab, index, status)
|
|||
tabImage:GetComponent("Image").sprite = Util.LoadSprite(_TabData[index][status])
|
||||
tabLab:GetComponent("Text").text = _TabData[index].name
|
||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||
Util.GetGameObject(tab, "Redpot"):SetActive(GuildSkillManager.GuildSkillRedPoint(index))
|
||||
Util.GetGameObject(tab, "Redpot"):SetActive(GuildSkillManager.GuildSkillRedPoint(curIndexChangeFun[index]))
|
||||
if #tabRedPotList < 4 then
|
||||
table.insert(tabRedPotList,Util.GetGameObject(tab, "Redpot"))
|
||||
end
|
||||
|
@ -135,10 +142,10 @@ end
|
|||
function this.OnClickTabBtn(index,isNoLoadSprite)
|
||||
--数据组拼
|
||||
curIndex = index
|
||||
GuildSkillManager.SetGuildSkillRedPlayers(curIndex,1)
|
||||
GuildSkillManager.SetGuildSkillRedPlayers(curIndexChangeFun[curIndex],1)
|
||||
CheckRedPointStatus(RedPointType.Guild_Skill)
|
||||
isMaxLv = true
|
||||
allSkillData = GuildSkillManager.GetSkillDataByType(curIndex)
|
||||
allSkillData = GuildSkillManager.GetSkillDataByType(curIndexChangeFun[curIndex])
|
||||
curSeletSkill = allSkillData[1]
|
||||
for i = 1, #allSkillData do
|
||||
if curSeletSkill.level > allSkillData[i].level then
|
||||
|
@ -146,7 +153,7 @@ function this.OnClickTabBtn(index,isNoLoadSprite)
|
|||
isMaxLv = false
|
||||
end
|
||||
end
|
||||
local allCurSkillConfig = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.GuildTechnology,"Profession",curIndex,"TechId",curSeletSkill.id)
|
||||
local allCurSkillConfig = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.GuildTechnology,"Profession",curIndexChangeFun[curIndex],"TechId",curSeletSkill.id)
|
||||
if isMaxLv and curSeletSkill.level ~= #allCurSkillConfig - 1 then
|
||||
isMaxLv = false
|
||||
end
|
||||
|
@ -155,9 +162,9 @@ function this.OnClickTabBtn(index,isNoLoadSprite)
|
|||
end
|
||||
--展示技能
|
||||
function this.ShowSkillsAndPros(isNoLoadSprite)
|
||||
this.titleText.text = Language[11088].._TabData[curIndex].name
|
||||
this.titleText.text = Language[11088].._TabData[curIndexChangeFun[curIndex]].name
|
||||
local isEqualityLv,maxLv
|
||||
endLv,isEqualityLv,maxLv = GuildSkillManager.GetAllGuildSkillLv(curIndex)
|
||||
endLv,isEqualityLv,maxLv = GuildSkillManager.GetAllGuildSkillLv(curIndexChangeFun[curIndex])
|
||||
Util.SetGray(this.btnRest, endLv <= 0)
|
||||
this.materialGrid:SetActive(not isMaxLv)
|
||||
this.selectImage:SetActive(not isMaxLv)
|
||||
|
@ -196,7 +203,7 @@ function this.ShowSkillsAndPros(isNoLoadSprite)
|
|||
proInfoStr = proInfo[propertyConfig.PropertyId]
|
||||
end
|
||||
if curSeletSkill.id == allSkillData[i].id then
|
||||
local config = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.GuildTechnology,"Profession",curIndex,"TechId",curSeletSkill.id,"Level",curSeletSkill.level + 1)
|
||||
local config = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.GuildTechnology,"Profession",curIndexChangeFun[curIndex],"TechId",curSeletSkill.id,"Level",curSeletSkill.level + 1)
|
||||
local addValue = ""
|
||||
if config then
|
||||
addValue = "<color=#529864>+"..GetPropertyFormatStrOne(propertyConfig.Style, config.Values[2] - allSkillData[i].config.Values[2]).."</color>"
|
||||
|
@ -242,7 +249,7 @@ function this.RefreshTabRedPoint(index)
|
|||
tabRedPotList[index]:SetActive(false)
|
||||
else
|
||||
for i = 1, #tabRedPotList do
|
||||
tabRedPotList[i]:SetActive(GuildSkillManager.GuildSkillRedPoint(i))
|
||||
tabRedPotList[curIndexChangeFun[i]]:SetActive(GuildSkillManager.GuildSkillRedPoint(curIndexChangeFun[i]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue