神兵详情界面修改
parent
6c5acdab26
commit
feaeb268f5
|
@ -54,6 +54,8 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function this:OnOpen(_data)
|
||||
this.unloadBtn.gameObject:SetActive(true)
|
||||
this.changeBtn.gameObject:SetActive(true)
|
||||
this.UpdateWin(_data)
|
||||
end
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ function this:OnShow(_parent,_curUpZhenPokemonData,_upZhenIndex)
|
|||
curUpZhenPokemonData = _curUpZhenPokemonData
|
||||
upZhenIndex = _upZhenIndex
|
||||
if curUpZhenPokemonData then
|
||||
polemonList = GodWeaponManager.GetCanUpZhenWeapons()
|
||||
polemonList = GodWeaponManager.GetCanUpZhenWeapons(curUpZhenPokemonData)
|
||||
else
|
||||
polemonList = GodWeaponManager.GetCanUpZhenWeapons()
|
||||
end
|
||||
|
|
|
@ -108,13 +108,20 @@ end
|
|||
|
||||
|
||||
--获取当前可上阵的所有灵兽数据 curUpZhenPokemonData 如果不为空就时替换上阵操作
|
||||
function this.GetCanUpZhenWeapons()
|
||||
function this.GetCanUpZhenWeapons(_curUpZhenGodWeapon)
|
||||
local upZhenSidList = this.GetAllTeamWeaponId()
|
||||
local curAllPokemonList = {}
|
||||
for key, value in pairs(allGodWeapons) do
|
||||
if not CheckListIsContainValue1(upZhenSidList,value.staticId) then
|
||||
table.insert(curAllPokemonList,value)
|
||||
if _curUpZhenGodWeapon then
|
||||
if value.Did~=_curUpZhenGodWeapon.Did then
|
||||
table.insert(curAllPokemonList,value)
|
||||
end
|
||||
else
|
||||
if not CheckListIsContainValue1(upZhenSidList,value.staticId) then
|
||||
table.insert(curAllPokemonList,value)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
return curAllPokemonList
|
||||
end
|
||||
|
@ -156,8 +163,8 @@ end
|
|||
--设置神兵上阵下阵
|
||||
function this.SetWeaponUpZhen(id,pos)
|
||||
if allGodWeapons[id] then
|
||||
local point1=allGodWeapons[id].point
|
||||
if pos~=0 then
|
||||
local point1=allGodWeapons[id].point
|
||||
if point1~=0 then
|
||||
godWeaponTeamInfo[point1]=nil
|
||||
end
|
||||
|
@ -165,7 +172,7 @@ function this.SetWeaponUpZhen(id,pos)
|
|||
godWeaponTeamInfo[pos]=allGodWeapons[id]
|
||||
else
|
||||
allGodWeapons[id].point=pos
|
||||
godWeaponTeamInfo[pos]=nil
|
||||
godWeaponTeamInfo[point1]=nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -66,6 +66,8 @@ function this:BindEvent()
|
|||
NetManager.RequestMagicSoldierStrong(godWeaponData.Did,2,0,costList,function(msg)
|
||||
this.UpdateWinInfo()
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip("道具不足")
|
||||
end
|
||||
end)
|
||||
Util.AddClick(this.upLvBtn, function()
|
||||
|
|
Loading…
Reference in New Issue