法宝聚灵修改提交
parent
2ca32992da
commit
ed63b42413
File diff suppressed because it is too large
Load Diff
|
|
@ -1080,6 +1080,9 @@ RedPointType = {
|
|||
tailsmanSoul_gold = 43602,--
|
||||
tailsmanSoul_red = 43603,--
|
||||
tailsmanSoul_whiteGold = 43604,--
|
||||
tailsmanSoul_blue = 43605,
|
||||
tailsmanSoul_whiteBlue = 43606,
|
||||
|
||||
incarnation = 43801,
|
||||
incarnation_people = 43802,
|
||||
incarnation_buddish = 43803,
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ function this.UpDataBagItemIdNumber(_itemData)
|
|||
CheckRedPointStatus(RedPointType.tailsmanSoul_gold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_red)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_blue)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteBlue)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation)
|
||||
end
|
||||
|
||||
|
|
@ -124,6 +126,8 @@ function this.BackDataRefreshEnerny(msgItemInfo)
|
|||
CheckRedPointStatus(RedPointType.tailsmanSoul_gold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_red)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_blue)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteBlue)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation)
|
||||
end
|
||||
end
|
||||
|
|
@ -710,6 +714,8 @@ function this.GoIntoBackData(drop)
|
|||
CheckRedPointStatus(RedPointType.tailsmanSoul_gold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_red)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_blue)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteBlue)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation)
|
||||
end
|
||||
if (#drop.equipId > 0) then
|
||||
|
|
@ -888,6 +894,8 @@ function this.GetTableByBackDropData(drop)
|
|||
CheckRedPointStatus(RedPointType.tailsmanSoul_gold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_red)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_blue)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteBlue)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation)
|
||||
end
|
||||
if drop.equipId ~= nil and #drop.equipId > 0 then
|
||||
|
|
@ -1405,6 +1413,8 @@ function this.BagIndicationRefresh(msg)
|
|||
CheckRedPointStatus(RedPointType.tailsmanSoul_gold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_red)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_blue)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteBlue)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation)
|
||||
-- 超出最大数量限制提示
|
||||
if msg.isMax and msg.isMax == 1 then
|
||||
|
|
|
|||
|
|
@ -6421,6 +6421,8 @@ function NetManager.FaBaoSoulUpLvRequest(id,lv, func)
|
|||
CheckRedPointStatus(RedPointType.tailsmanSoul_gold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_red)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_blue)
|
||||
CheckRedPointStatus(RedPointType.tailsmanSoul_whiteBlue)
|
||||
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.TailsManSou)
|
||||
local herodata = HeroManager.GetAllHeroList()
|
||||
for k,v in pairs(herodata) do
|
||||
|
|
|
|||
|
|
@ -340,7 +340,8 @@ function this.InitRedPointAllRelate()
|
|||
RPData:SetParent(RedPointType.tailsmanSoul_gold,RedPointType.tailsmanSoul)
|
||||
RPData:SetParent(RedPointType.tailsmanSoul_red,RedPointType.tailsmanSoul)
|
||||
RPData:SetParent(RedPointType.tailsmanSoul_whiteGold,RedPointType.tailsmanSoul)
|
||||
|
||||
RPData:SetParent(RedPointType.tailsmanSoul_blue,RedPointType.tailsmanSoul)
|
||||
RPData:SetParent(RedPointType.tailsmanSoul_whiteBlue,RedPointType.tailsmanSoul)
|
||||
--身外化身
|
||||
RPData:SetParent(RedPointType.incarnation_people,RedPointType.incarnation)
|
||||
RPData:SetParent(RedPointType.incarnation_Kong,RedPointType.incarnation)
|
||||
|
|
@ -668,6 +669,8 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.tailsmanSoul_gold,TailsManSoulManager.CheckRedData)
|
||||
RPData:AddCheckFunc(RedPointType.tailsmanSoul_red,TailsManSoulManager.CheckRedData)
|
||||
RPData:AddCheckFunc(RedPointType.tailsmanSoul_whiteGold,TailsManSoulManager.CheckRedData)
|
||||
RPData:AddCheckFunc(RedPointType.tailsmanSoul_blue,TailsManSoulManager.CheckRedData)
|
||||
RPData:AddCheckFunc(RedPointType.tailsmanSoul_whiteBlue,TailsManSoulManager.CheckRedData)
|
||||
|
||||
RPData:AddCheckFunc(RedPointType.incarnation_people,IncarnationManager.CheckRedData)
|
||||
RPData:AddCheckFunc(RedPointType.incarnation_buddish,IncarnationManager.CheckRedData)
|
||||
|
|
|
|||
|
|
@ -3,9 +3,12 @@ TailsManSouPanel = Inherit(BasePanel)
|
|||
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||
local this = TailsManSouPanel
|
||||
local redPointList = {}
|
||||
local tabsRedpoints = {}
|
||||
local tabs={}
|
||||
local tabsImg = {"r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"}
|
||||
-- Tab管理器
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local tabs = {
|
||||
local tabData = {
|
||||
[1] = { --金色
|
||||
default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = "金色",
|
||||
rpType = RedPointType.tailsmanSoul_gold,quality = 5
|
||||
|
|
@ -21,14 +24,15 @@ local tabs = {
|
|||
}
|
||||
local curData = {}
|
||||
local curPage = 1
|
||||
|
||||
local proId = 1
|
||||
--初始化组件(用于子类重写)
|
||||
function TailsManSouPanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
self.itemPreList = {}
|
||||
self.bg = Util.GetGameObject(self.gameObject,"bg"):GetComponent("Image")
|
||||
self.tabbox = Util.GetGameObject(self.gameObject,"bg/tabbox")
|
||||
--self.tabbox = Util.GetGameObject(self.gameObject,"bg/tabbox")
|
||||
self.btnBack = Util.GetGameObject(self.gameObject,"bg/btnBack")
|
||||
self.selectBtn = Util.GetGameObject(self.gameObject,"bg/Tabs/selectBtn")
|
||||
self.fetterItem = Util.GetGameObject(self.gameObject,"fetterItem")
|
||||
local grid = Util.GetGameObject(self.gameObject,"bg/fetterGrid")
|
||||
local v21 = grid.transform.rect
|
||||
|
|
@ -42,10 +46,34 @@ function TailsManSouPanel:InitComponent()
|
|||
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
|
||||
self.effectJin = Util.GetGameObject(self.gameObject,"bg/effect/UI_effect_RecruitPanel_particle_jin")
|
||||
self.effectHong = Util.GetGameObject(self.gameObject,"bg/effect/UI_effect_RecruitPanel_particle_hong")
|
||||
|
||||
for i = 1, 5 do
|
||||
tabs[i] = Util.GetGameObject(self.transform, "bg/Tabs/grid/Btn" .. i)
|
||||
tabsRedpoints[i] = Util.GetGameObject(tabs[i], "redpoint")
|
||||
if tabsImg[i] then
|
||||
Util.GetGameObject(tabs[i], "Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(tabsImg[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function TailsManSouPanel:BindEvent()
|
||||
BindRedPointObject(RedPointType.tailsmanSoul_gold,tabsRedpoints[1].gameObject)
|
||||
BindRedPointObject(RedPointType.tailsmanSoul_red,tabsRedpoints[2].gameObject)
|
||||
BindRedPointObject(RedPointType.tailsmanSoul_whiteGold,tabsRedpoints[3].gameObject)
|
||||
BindRedPointObject(RedPointType.tailsmanSoul_blue,tabsRedpoints[4].gameObject)
|
||||
BindRedPointObject(RedPointType.tailsmanSoul_whiteBlue,tabsRedpoints[5].gameObject)
|
||||
for i = 1,5 do
|
||||
Util.AddClick(tabs[i], function()
|
||||
if i == proId then
|
||||
return
|
||||
end
|
||||
proId = i
|
||||
self:SetSelectBtn()
|
||||
curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(proId)
|
||||
self:RefreshData()
|
||||
end)
|
||||
end
|
||||
Util.AddClick(self.btnBack, function()
|
||||
curPage = 1
|
||||
self:ClosePanel()
|
||||
|
|
@ -126,45 +154,68 @@ function TailsManSouPanel:BindEvent()
|
|||
table.insert(data,singData)
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ShenHunShuXing,data)
|
||||
end)
|
||||
self.tabBox = TabBox.New()
|
||||
self.tabBox:SetTabAdapter(self.SetTabAdapter)
|
||||
self.tabBox:SetTabIsLockCheck(self.TabIsLockCheck)
|
||||
self.tabBox:SetChangeTabCallBack(self.SetChangeTabCallBack)
|
||||
-- self.tabBox = TabBox.New()
|
||||
-- self.tabBox:SetTabAdapter(self.SetTabAdapter)
|
||||
-- self.tabBox:SetTabIsLockCheck(self.TabIsLockCheck)
|
||||
-- self.tabBox:SetChangeTabCallBack(self.SetChangeTabCallBack)
|
||||
end
|
||||
function TailsManSouPanel.SetTabAdapter(newTab, index, status)
|
||||
local img = Util.GetGameObject(newTab.gameObject,"img"):GetComponent("Image")
|
||||
local redpot = Util.GetGameObject(newTab.gameObject,"redpot")
|
||||
local tabName = Util.GetGameObject(newTab.gameObject,"Text"):GetComponent("Text")
|
||||
local lock = Util.GetGameObject(newTab.gameObject,"lock")
|
||||
if tabs[index].rpType > 0 then
|
||||
if redPointList[tabs[index].rpType] then
|
||||
ClearRedPointObject(tabs[index].rpType,redPointList[tabs[index].rpType])
|
||||
end
|
||||
BindRedPointObject(tabs[index].rpType,redpot)
|
||||
redPointList[tabs[index].rpType] = redpot
|
||||
end
|
||||
img.sprite = this.spLoader:LoadSprite(tabs[index][status])
|
||||
tabName.text = tabs[index].tabName
|
||||
if status == "lock" then
|
||||
lock.gameObject:SetActive(true)
|
||||
|
||||
function TailsManSouPanel:RefreshList(istop,isAnim)
|
||||
self.datas = IncarnationManager.GetItemDataListByPro(proId)
|
||||
self.scroll:ForeachItemGO(function(index,go)
|
||||
go.gameObject:SetActive(false)
|
||||
end)
|
||||
if not self.datas or #self.datas < 1 then
|
||||
self.empty.gameObject:SetActive(true)
|
||||
self.scroll.gameObject:SetActive(false)
|
||||
else
|
||||
lock.gameObject:SetActive(false)
|
||||
end
|
||||
newTab.gameObject:SetActive(true)
|
||||
end
|
||||
|
||||
function TailsManSouPanel.TabIsLockCheck(index)
|
||||
return false
|
||||
end
|
||||
|
||||
function TailsManSouPanel.SetChangeTabCallBack(index)
|
||||
if curPage == index then
|
||||
return
|
||||
self.empty.gameObject:SetActive(false)
|
||||
self.scroll.gameObject:SetActive(true)
|
||||
self.scroll:SetData(self.datas,function(index,go)
|
||||
self:SetSingleData(go,self.datas[index],index)
|
||||
end,istop,isAnim)
|
||||
end
|
||||
curPage = index
|
||||
this:OnShow(self)
|
||||
end
|
||||
|
||||
function TailsManSouPanel:SetSelectBtn()
|
||||
self.selectBtn.transform:SetParent(tabs[proId].transform)
|
||||
self.selectBtn:GetComponent("RectTransform").localPosition = Vector3.zero
|
||||
end
|
||||
|
||||
-- function TailsManSouPanel.SetTabAdapter(newTab, index, status)
|
||||
-- local img = Util.GetGameObject(newTab.gameObject,"img"):GetComponent("Image")
|
||||
-- local redpot = Util.GetGameObject(newTab.gameObject,"redpot")
|
||||
-- local tabName = Util.GetGameObject(newTab.gameObject,"Text"):GetComponent("Text")
|
||||
-- local lock = Util.GetGameObject(newTab.gameObject,"lock")
|
||||
-- if tabs[index].rpType > 0 then
|
||||
-- if redPointList[tabs[index].rpType] then
|
||||
-- ClearRedPointObject(tabs[index].rpType,redPointList[tabs[index].rpType])
|
||||
-- end
|
||||
-- BindRedPointObject(tabs[index].rpType,redpot)
|
||||
-- redPointList[tabs[index].rpType] = redpot
|
||||
-- end
|
||||
-- img.sprite = this.spLoader:LoadSprite(tabs[index][status])
|
||||
-- tabName.text = tabs[index].tabName
|
||||
-- if status == "lock" then
|
||||
-- lock.gameObject:SetActive(true)
|
||||
-- else
|
||||
-- lock.gameObject:SetActive(false)
|
||||
-- end
|
||||
-- newTab.gameObject:SetActive(true)
|
||||
-- end
|
||||
|
||||
-- function TailsManSouPanel.TabIsLockCheck(index)
|
||||
-- return false
|
||||
-- end
|
||||
|
||||
-- function TailsManSouPanel.SetChangeTabCallBack(index)
|
||||
-- if curPage == index then
|
||||
-- return
|
||||
-- end
|
||||
-- curPage = index
|
||||
-- this:OnShow(self)
|
||||
-- end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function TailsManSouPanel:AddListener()
|
||||
end
|
||||
|
|
@ -176,24 +227,24 @@ end
|
|||
--界面打开时调用(用于子类重写)
|
||||
function TailsManSouPanel:OnOpen(...)
|
||||
local args = {...}
|
||||
curPage = args[1] or 1
|
||||
curPage = args[1] or 2
|
||||
end
|
||||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function TailsManSouPanel:OnShow()
|
||||
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
|
||||
self.tabBox:Init(self.tabbox.gameObject, tabs, curPage)
|
||||
curData = TailsManSoulManager.GetTailsmanSoulDatas(tabs[curPage].quality)
|
||||
--self.tabBox:Init(self.tabbox.gameObject, tabs, curPage)
|
||||
curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(1)
|
||||
self:RefreshData()
|
||||
self.effectJin.gameObject:SetActive(tabs[curPage].quality == 5)
|
||||
self.effectHong.gameObject:SetActive(tabs[curPage].quality == 6)
|
||||
self.effectJin.gameObject:SetActive(tabData[curPage].quality == 5)
|
||||
self.effectHong.gameObject:SetActive(tabData[curPage].quality == 6)
|
||||
Util.SetParticleSortLayer(self.effectJin.gameObject,self.sortingOrder + 1)
|
||||
Util.SetParticleSortLayer(self.effectHong.gameObject,self.sortingOrder + 1)
|
||||
end
|
||||
|
||||
|
||||
function TailsManSouPanel:RefreshData()
|
||||
self:SortData()
|
||||
self:SetSelectBtn()
|
||||
self.scroll:ForeachItemGO(function(index,go)
|
||||
go.gameObject:SetActive(false)
|
||||
end)
|
||||
|
|
@ -210,9 +261,7 @@ function TailsManSouPanel:RefreshData()
|
|||
end
|
||||
end
|
||||
|
||||
function TailsManSouPanel:SortData()
|
||||
|
||||
end
|
||||
|
||||
|
||||
function TailsManSouPanel:SetSingleData(go,data,index)
|
||||
if not self.itemPreList[go] then
|
||||
|
|
@ -306,6 +355,11 @@ function TailsManSouPanel:OnDestroy()
|
|||
redPointList = {}
|
||||
SubUIManager.Close(self.UpView)
|
||||
curPage = 1
|
||||
ClearRedPointObject(RedPointType.tailsmanSoul_gold,tabsRedpoints[1].gameObject)
|
||||
ClearRedPointObject(RedPointType.tailsmanSoul_red,tabsRedpoints[2].gameObject)
|
||||
ClearRedPointObject(RedPointType.tailsmanSoul_whiteGold,tabsRedpoints[3].gameObject)
|
||||
ClearRedPointObject(RedPointType.tailsmanSoul_blue,tabsRedpoints[4].gameObject)
|
||||
ClearRedPointObject(RedPointType.tailsmanSoul_whiteBlue,tabsRedpoints[5].gameObject)
|
||||
end
|
||||
|
||||
return TailsManSouPanel
|
||||
|
|
@ -19,6 +19,7 @@ function this.GetTailsmanSoulDatas(qua)
|
|||
singBookData.name = v.Name
|
||||
singBookData.icon = v.Icon
|
||||
singBookData.quality = v.Quality
|
||||
singBookData.PropertyName = v.PropertyName
|
||||
singBookData.trumpList,singBookData.maxLv,singBookData.lv,singBookData.skillList = this.GetTailsmanSoulDataById(singBookData.id)
|
||||
singBookData.trumpChipList = v.ItemList
|
||||
singBookData.skillConfig = v.SkillList
|
||||
|
|
@ -28,6 +29,28 @@ function this.GetTailsmanSoulDatas(qua)
|
|||
return datas
|
||||
end
|
||||
|
||||
--根据职业获取法宝之魂界面列表数据
|
||||
function this.GetTailsmanSoulDatasByPro(pro)
|
||||
local datas = {}
|
||||
for k,v in ConfigPairs(trumpBook) do
|
||||
if v.PropertyName==pro then
|
||||
local singBookData = {}
|
||||
singBookData.id = v.Id
|
||||
singBookData.name = v.Name
|
||||
singBookData.icon = v.Icon
|
||||
singBookData.quality = v.Quality
|
||||
singBookData.PropertyName = v.PropertyName
|
||||
singBookData.trumpList,singBookData.maxLv,singBookData.lv,singBookData.skillList = this.GetTailsmanSoulDataById(singBookData.id)
|
||||
singBookData.trumpChipList = v.ItemList
|
||||
singBookData.skillConfig = v.SkillList
|
||||
table.insert(datas,singBookData)
|
||||
end
|
||||
end
|
||||
return datas
|
||||
end
|
||||
|
||||
|
||||
|
||||
--法宝之魂界面列表数据
|
||||
function this.GetTailsmanSoulDatas1(qua)
|
||||
local datas = this.GetTailsmanSoulDatas(qua)
|
||||
|
|
@ -184,13 +207,19 @@ end
|
|||
|
||||
function this.CheckRedData(red)
|
||||
local list = {}
|
||||
local pro=1
|
||||
if red == RedPointType.tailsmanSoul_gold then
|
||||
list = this.GetTailsmanSoulDatas(5)
|
||||
pro=1
|
||||
elseif red == RedPointType.tailsmanSoul_red then
|
||||
list = this.GetTailsmanSoulDatas(6)
|
||||
pro=2
|
||||
elseif red == RedPointType.tailsmanSoul_whiteGold then
|
||||
list = this.GetTailsmanSoulDatas(7)
|
||||
pro=3
|
||||
elseif red == RedPointType.tailsmanSoul_blue then
|
||||
pro=4
|
||||
elseif red == RedPointType.tailsmanSoul_whiteBlue then
|
||||
pro=5
|
||||
end
|
||||
list = this.GetTailsmanSoulDatasByPro(pro)
|
||||
for i = 1,#list do
|
||||
if list[i] and list[i].trumpList then
|
||||
for k,v in pairs(list[i].trumpList) do
|
||||
|
|
|
|||
Loading…
Reference in New Issue