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