神兵详情界面修改

dev_chengFeng
yuanshuai 2023-04-03 11:18:04 +08:00
parent 6c5acdab26
commit feaeb268f5
4 changed files with 17 additions and 6 deletions

View File

@ -54,6 +54,8 @@ end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function this:OnOpen(_data) function this:OnOpen(_data)
this.unloadBtn.gameObject:SetActive(true)
this.changeBtn.gameObject:SetActive(true)
this.UpdateWin(_data) this.UpdateWin(_data)
end end

View File

@ -43,7 +43,7 @@ function this:OnShow(_parent,_curUpZhenPokemonData,_upZhenIndex)
curUpZhenPokemonData = _curUpZhenPokemonData curUpZhenPokemonData = _curUpZhenPokemonData
upZhenIndex = _upZhenIndex upZhenIndex = _upZhenIndex
if curUpZhenPokemonData then if curUpZhenPokemonData then
polemonList = GodWeaponManager.GetCanUpZhenWeapons() polemonList = GodWeaponManager.GetCanUpZhenWeapons(curUpZhenPokemonData)
else else
polemonList = GodWeaponManager.GetCanUpZhenWeapons() polemonList = GodWeaponManager.GetCanUpZhenWeapons()
end end

View File

@ -108,13 +108,20 @@ end
--获取当前可上阵的所有灵兽数据 curUpZhenPokemonData 如果不为空就时替换上阵操作 --获取当前可上阵的所有灵兽数据 curUpZhenPokemonData 如果不为空就时替换上阵操作
function this.GetCanUpZhenWeapons() function this.GetCanUpZhenWeapons(_curUpZhenGodWeapon)
local upZhenSidList = this.GetAllTeamWeaponId() local upZhenSidList = this.GetAllTeamWeaponId()
local curAllPokemonList = {} local curAllPokemonList = {}
for key, value in pairs(allGodWeapons) do for key, value in pairs(allGodWeapons) do
if not CheckListIsContainValue1(upZhenSidList,value.staticId) then if _curUpZhenGodWeapon then
table.insert(curAllPokemonList,value) 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
end end
return curAllPokemonList return curAllPokemonList
end end
@ -156,8 +163,8 @@ end
--设置神兵上阵下阵 --设置神兵上阵下阵
function this.SetWeaponUpZhen(id,pos) function this.SetWeaponUpZhen(id,pos)
if allGodWeapons[id] then if allGodWeapons[id] then
local point1=allGodWeapons[id].point
if pos~=0 then if pos~=0 then
local point1=allGodWeapons[id].point
if point1~=0 then if point1~=0 then
godWeaponTeamInfo[point1]=nil godWeaponTeamInfo[point1]=nil
end end
@ -165,7 +172,7 @@ function this.SetWeaponUpZhen(id,pos)
godWeaponTeamInfo[pos]=allGodWeapons[id] godWeaponTeamInfo[pos]=allGodWeapons[id]
else else
allGodWeapons[id].point=pos allGodWeapons[id].point=pos
godWeaponTeamInfo[pos]=nil godWeaponTeamInfo[point1]=nil
end end
end end
end end

View File

@ -66,6 +66,8 @@ function this:BindEvent()
NetManager.RequestMagicSoldierStrong(godWeaponData.Did,2,0,costList,function(msg) NetManager.RequestMagicSoldierStrong(godWeaponData.Did,2,0,costList,function(msg)
this.UpdateWinInfo() this.UpdateWinInfo()
end) end)
else
PopupTipPanel.ShowTip("道具不足")
end end
end) end)
Util.AddClick(this.upLvBtn, function() Util.AddClick(this.upLvBtn, function()