主角技能添加屏蔽

dev_chengFeng
wangzhenxing 2021-10-22 10:21:07 +08:00
parent ae47df29bb
commit c494145ff8
3 changed files with 9 additions and 15 deletions

View File

@ -1559,6 +1559,7 @@ FUNCTION_OPEN_TYPE = {
JumpServer_YuXu = 111, -- 玉虚论道
QIJIESHILIAN = 112,--七界试炼
FOURQUADRANT=113,--四象心法
PLAYER_SKILL = 115, --主角技能
}
TaskGetBtnIconDef = {

View File

@ -4,6 +4,7 @@ local XiuXianConfig = ConfigManager.GetConfig(ConfigName.XiuXianConfig)
local PropertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local XiuXianSkillConfig = ConfigManager.GetConfig(ConfigName.XiuXianSkillConfig)
local SkillBaseConfig= ConfigManager.GetConfig(ConfigName.PlayerSkillBasicTable)
local skillSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.PLAYER_SKILL)
function this.Initialize()
this.PracticeLevel = 1--小境界id
this.PracticeBigLevel = 1--大境界数
@ -19,8 +20,6 @@ function this.Initialize()
this.playerSkillList={} --主角技能列表
this.CultivationLevel = 0
for key, value in ConfigPairs(SkillBaseConfig) do
--table.insert(this.playerSkillList,{id=value.Id,lv=0})
LogError("vlaue id=="..value.Id)
this.playerSkillList[value.Id]=0
end
end
@ -32,23 +31,15 @@ end
--更新角色技能
function this.UpdataPlayerSkill(msg)
for i = 1, #msg do
LogError("msg id=="..msg[i].skillId.." vlaue =="..msg[i].skillLv)
if this.playerSkillList[msg[i].skillId] then
this.playerSkillList[msg[i].skillId]=msg[i].skillLv
end
end
-- for key, value in pairs(msg) do
-- LogError("**********"..value.skillId.." lv=="..value.skillLv)
-- if this.playerSkillList[value.skillId] then
-- this.playerSkillList[value.skillId]=value.skillLv
-- LogError("////////////")
-- end
-- end
end
--设置角色技能等级
function this.SetPlayerSkill(id,lv)
LogError("set== id="..id.." value=="..lv)
if this.playerSkillList[id] then
this.playerSkillList[id]=lv
@ -68,6 +59,9 @@ function this.AddPlayerSkill(lv)
end
--检测主角技能红点
function this.CheckPlayerSkillRed(redType)
if skillSystemConfig.IsOpen==0 then
return false
end
local id=redType-5000
local lv=this.playerSkillList[id]
local openId=PlayerPrefs.GetInt(PlayerManager.uid.."playerSkillRed")
@ -84,14 +78,11 @@ function this.CheckPlayerSkillRed(redType)
isShow=false
end
end
LogError(" "..tostring(isShow))
return isShow
else
LogError(" 111111111111111111111111")
return false
end
end
LogError(" 222222222")
return false
end

View File

@ -6,6 +6,7 @@ local oldPower = 0
local newPower = 0
local oldBigLevel = 0
local globalSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.FOURQUADRANT)
local skillSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.PLAYER_SKILL)
local SkillBaseConfig= ConfigManager.GetConfig(ConfigName.PlayerSkillBasicTable)
function Practice:InitComponent()
self.spLoader = SpriteLoader.New()
@ -218,7 +219,8 @@ function Practice:OnOpen()
self.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.XiuXing })
self.BtView:OnOpen(self,{ sortOrder = self.sortingOrder, panelType = PanelTypeView.Practice })
self.mask:SetActive(false)
self.skillObj:SetActive(true)
self.skillObj:SetActive(skillSystemConfig.IsOpen==1)
Practice:SetSkillInfo()
end