特训灵兽相关BUG修复
parent
b28882aa56
commit
401f3d8b25
|
@ -7703,7 +7703,7 @@ function NetManager.TrainingUpLvRequest(_heroid,_func)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
-- 英雄特训技能解锁请求
|
-- 英雄特训技能解锁请求
|
||||||
function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pockemensId,TrainingUnlockSkillHeroItem,item,_func)
|
function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pockemensId,magicSoldierIds,TrainingUnlockSkillHeroItem,item,_func)
|
||||||
local data=HeroInfoProto_pb.TrainingUnlockSkillRequest()
|
local data=HeroInfoProto_pb.TrainingUnlockSkillRequest()
|
||||||
data.heroId= _heroid
|
data.heroId= _heroid
|
||||||
data.unlockId= _unlockId
|
data.unlockId= _unlockId
|
||||||
|
@ -7717,9 +7717,17 @@ function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pockemensId,Tra
|
||||||
info.num = TrainingUnlockSkillHeroItem[i].num
|
info.num = TrainingUnlockSkillHeroItem[i].num
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if pockemensId then
|
||||||
|
|
||||||
|
for i = 1, #pockemensId do
|
||||||
|
data.pokemonIds:append(tostring(pockemensId[i]))
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
--data.incarnationCards= incarnationCards
|
--data.incarnationCards= incarnationCards
|
||||||
|
if item then
|
||||||
if item.itemtype==56 then
|
if item.itemtype==56 then
|
||||||
data.playerGifts.itemId = item.id
|
data.playerGifts.itemId = item.id
|
||||||
data.playerGifts.itemNum = item.itemNum
|
data.playerGifts.itemNum = item.itemNum
|
||||||
|
@ -7728,6 +7736,7 @@ function NetManager.TrainingUnlockSkillRequest(_heroid,_unlockId,pockemensId,Tra
|
||||||
data.incarnationCards.itemId = item.id
|
data.incarnationCards.itemId = item.id
|
||||||
data.incarnationCards.itemNum = item.itemNum
|
data.incarnationCards.itemNum = item.itemNum
|
||||||
end
|
end
|
||||||
|
end
|
||||||
local msg = data:SerializeToString()
|
local msg = data:SerializeToString()
|
||||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.TrainingUnlockSkillRequest,MessageTypeProto_pb.TrainingUnlockSkillResponse,msg,function(buffer)
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.TrainingUnlockSkillRequest,MessageTypeProto_pb.TrainingUnlockSkillResponse,msg,function(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
|
|
|
@ -288,14 +288,26 @@ function SpecailTrainingInfoPopup:SetSingleData(index,_go,_data)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if tData.Level<=curLevel then
|
if tData.Level<=curLevel then
|
||||||
|
|
||||||
if #selectSkillUnlockItems1==0 or #selectSkillUnlockItems2==0 then
|
if #selectSkillUnlockItems1==0 or #selectSkillUnlockItems2==0 then
|
||||||
PopupTipPanel.ShowTip(Language[10054])
|
PopupTipPanel.ShowTip(Language[10054])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local item={}
|
local item={}
|
||||||
|
local pokemenons={}
|
||||||
|
|
||||||
|
if selectSkillUnlockItems1[1].type==3 then
|
||||||
|
for i=1,#selectSkillUnlockItems1 do
|
||||||
|
local t=selectSkillUnlockItems1[i]
|
||||||
|
local pockemen={}
|
||||||
|
pokemenons[i]=selectSkillUnlockItems1[i].dynamicId
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
item.id=selectSkillUnlockItems1[1].itemData.id
|
item.id=selectSkillUnlockItems1[1].itemData.id
|
||||||
item.itemNum=1
|
item.itemNum=1
|
||||||
item.itemtype=selectSkillUnlockItems1[1].itemData.itemType
|
item.itemtype=selectSkillUnlockItems1[1].itemData.itemType
|
||||||
|
end
|
||||||
local TrainingUnlockSkillHeroItem={}
|
local TrainingUnlockSkillHeroItem={}
|
||||||
for i=1,#selectSkillUnlockItems2 do
|
for i=1,#selectSkillUnlockItems2 do
|
||||||
local t=selectSkillUnlockItems2[i]
|
local t=selectSkillUnlockItems2[i]
|
||||||
|
@ -309,11 +321,10 @@ function SpecailTrainingInfoPopup:SetSingleData(index,_go,_data)
|
||||||
Heroitem.num=1
|
Heroitem.num=1
|
||||||
TrainingUnlockSkillHeroItem[i]=Heroitem
|
TrainingUnlockSkillHeroItem[i]=Heroitem
|
||||||
end
|
end
|
||||||
local pokemenons={}
|
|
||||||
pokemenons[1]=""
|
|
||||||
local magicSoldierIds={}
|
local magicSoldierIds={}
|
||||||
magicSoldierIds[1]=""
|
magicSoldierIds[1]=""
|
||||||
NetManager.TrainingUnlockSkillRequest( self._curHerodata.dynamicId,tData.Id,nil,TrainingUnlockSkillHeroItem,item,function (msg)
|
NetManager.TrainingUnlockSkillRequest( self._curHerodata.dynamicId,tData.Id,pokemenons,nil,TrainingUnlockSkillHeroItem,item,function (msg)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1)
|
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -348,6 +359,9 @@ function SpecailTrainingInfoPopup:SetSingleData(index,_go,_data)
|
||||||
tmpData[i]={}
|
tmpData[i]={}
|
||||||
tmpData[i].data=tData.NeedItem1[i]
|
tmpData[i].data=tData.NeedItem1[i]
|
||||||
tmpData[i].type=1---Item 栏位
|
tmpData[i].type=1---Item 栏位
|
||||||
|
if tData.NeedItem1[i][1]== 21 then
|
||||||
|
tmpData[i].type=3
|
||||||
|
end
|
||||||
if tData.NeedItem1[i][1]== 56 then
|
if tData.NeedItem1[i][1]== 56 then
|
||||||
tmpData[i].Name= ItemBaseTypeName[tData.NeedItem1[i][2]]
|
tmpData[i].Name= ItemBaseTypeName[tData.NeedItem1[i][2]]
|
||||||
else
|
else
|
||||||
|
@ -378,18 +392,24 @@ function SpecailTrainingInfoPopup:SetSingleData(index,_go,_data)
|
||||||
if curData.type==1 then
|
if curData.type==1 then
|
||||||
Util.GetGameObject(singleSkillList[i],"Name"):GetComponent("Text").text=GetQuantityStrByquality(curData.data[3])..curData.Name
|
Util.GetGameObject(singleSkillList[i],"Name"):GetComponent("Text").text=GetQuantityStrByquality(curData.data[3])..curData.Name
|
||||||
itemIcon.sprite=self.spLoader:LoadSprite("UI_hz_beibao_duigoudi")
|
itemIcon.sprite=self.spLoader:LoadSprite("UI_hz_beibao_duigoudi")
|
||||||
else
|
elseif curData.type==2 then
|
||||||
Util.GetGameObject(singleSkillList[i],"Name"):GetComponent("Text").text=NumToChinese[curData.heroGroupData[1]].."星"..curData.Name
|
Util.GetGameObject(singleSkillList[i],"Name"):GetComponent("Text").text=NumToChinese[curData.heroGroupData[1]].."星"..curData.Name
|
||||||
itemIcon.sprite=self.spLoader:LoadSprite("UI_hz_zhonghe05_70")
|
itemIcon.sprite=self.spLoader:LoadSprite("UI_hz_zhonghe05_70")
|
||||||
|
else
|
||||||
|
Util.GetGameObject(singleSkillList[i],"Name"):GetComponent("Text").text=GetQuantityStrByquality(curData.data[3])..curData.Name
|
||||||
|
itemIcon.sprite=self.spLoader:LoadSprite("UI_hz_beibao_duigoudi")
|
||||||
end
|
end
|
||||||
local needNum= Util.GetGameObject(singleSkillList[i],"hero/lvbg/CountText"):GetComponent("Text")
|
local needNum= Util.GetGameObject(singleSkillList[i],"hero/lvbg/CountText"):GetComponent("Text")
|
||||||
local neednum=1
|
local neednum=1
|
||||||
if curData.type==1 then
|
if curData.type==1 then
|
||||||
needNum.text="0".."/"..curData.data[4]
|
needNum.text="0".."/"..curData.data[4]
|
||||||
neednum=curData.data[4]
|
neednum=curData.data[4]
|
||||||
else
|
elseif curData.type==2 then
|
||||||
needNum.text="0".."/"..curData.heroGroupData[2]
|
needNum.text="0".."/"..curData.heroGroupData[2]
|
||||||
neednum=curData.heroGroupData[2]
|
neednum=curData.heroGroupData[2]
|
||||||
|
else
|
||||||
|
needNum.text="0".."/"..curData.data[4]
|
||||||
|
neednum=curData.data[4]
|
||||||
end
|
end
|
||||||
|
|
||||||
local add=Util.GetGameObject(singleSkillList[i],"hero/icon/add")
|
local add=Util.GetGameObject(singleSkillList[i],"hero/icon/add")
|
||||||
|
@ -441,7 +461,29 @@ function SpecailTrainingInfoPopup:SetSingleData(index,_go,_data)
|
||||||
add:SetActive(true)
|
add:SetActive(true)
|
||||||
needNum.text="0".."/"..neednum
|
needNum.text="0".."/"..neednum
|
||||||
end
|
end
|
||||||
|
elseif curData.type==3 then
|
||||||
|
selectSkillUnlockItems1={}
|
||||||
|
if #selectItems>0 then
|
||||||
|
|
||||||
|
if selectItems[1].type==1 or selectItems[1].type==3 then
|
||||||
|
itemIcon.sprite=self.spLoader:LoadSprite(selectItems[1].icon)
|
||||||
|
|
||||||
|
else
|
||||||
|
local itemConfig = ConfigManager.TryGetConfigData(ConfigName.ItemConfig,selectItems[1].id)
|
||||||
|
if not itemConfig then return end
|
||||||
|
-- icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig.ResourceID))
|
||||||
|
itemIcon.sprite=self.spLoader:LoadSprite(GetResourcePath(itemConfig.ResourceID))
|
||||||
|
needNum.text=#selectItems.."/"..neednum
|
||||||
|
end
|
||||||
|
for i=1 ,#selectItems do
|
||||||
|
selectSkillUnlockItems1[i]=selectItems[i]
|
||||||
|
end
|
||||||
|
add:SetActive(false)
|
||||||
|
else
|
||||||
|
itemIcon.sprite=self.spLoader:LoadSprite("UI_hz_zhonghe05_70")
|
||||||
|
add:SetActive(true)
|
||||||
|
needNum.text="0".."/"..neednum
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -96,6 +96,7 @@ function TrainingItemListPanel:OnOpen(_curData,_func,NeedNum,selectItems1,select
|
||||||
curData = _curData
|
curData = _curData
|
||||||
-- heroDataList = heroData
|
-- heroDataList = heroData
|
||||||
if _curData.type==1 then
|
if _curData.type==1 then
|
||||||
|
|
||||||
local itemDatas = BagManager.GetBagItemDataByItemTypeV3(_curData.data[2],_curData.data[1],_curData.data[3])
|
local itemDatas = BagManager.GetBagItemDataByItemTypeV3(_curData.data[2],_curData.data[1],_curData.data[3])
|
||||||
local index =0
|
local index =0
|
||||||
for i=1,#itemDatas do
|
for i=1,#itemDatas do
|
||||||
|
@ -112,7 +113,35 @@ function TrainingItemListPanel:OnOpen(_curData,_func,NeedNum,selectItems1,select
|
||||||
end
|
end
|
||||||
index=haveNum
|
index=haveNum
|
||||||
-- heroOrItemDataList[i]=itemDatas[i]
|
-- heroOrItemDataList[i]=itemDatas[i]
|
||||||
|
|
||||||
end
|
end
|
||||||
|
elseif _curData.type==3 then
|
||||||
|
|
||||||
|
local pokemonList = PokemonManager.GetPokemonDatas()
|
||||||
|
local index=0
|
||||||
|
for i=1,#pokemonList do
|
||||||
|
local v={}
|
||||||
|
v.dynamicId=pokemonList[i].dynamicId
|
||||||
|
v.pokemonData=pokemonList[i]
|
||||||
|
v.type=3
|
||||||
|
v.index = i--用于祭品选择界面 查看是否选中
|
||||||
|
v.star=v.star
|
||||||
|
v.lv=v.lv
|
||||||
|
local config=pokemonList[i].config
|
||||||
|
v.ischip=0
|
||||||
|
v.icon= GetResourcePath(config.Icon)
|
||||||
|
v.id=v.id
|
||||||
|
v.quality=config.Quality
|
||||||
|
v.name=config.Name
|
||||||
|
v.returnCoin=config.CoinReturn
|
||||||
|
v.frame=GetHeroQuantityImageByquality(config.Quality)
|
||||||
|
v.num=1
|
||||||
|
table.insert(heroOrItemDataList,v)
|
||||||
|
|
||||||
|
|
||||||
|
-- heroOrItemDataList[i]=itemDatas[i]
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
local titemDatas={}
|
local titemDatas={}
|
||||||
if _curData.NeedHeroOther ~=0 then
|
if _curData.NeedHeroOther ~=0 then
|
||||||
|
@ -169,7 +198,7 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
|
||||||
-- local starGrid = Util.GetGameObject(go.transform, "star")
|
-- local starGrid = Util.GetGameObject(go.transform, "star")
|
||||||
local cardBtn = Util.GetGameObject(go.transform, "icon")
|
local cardBtn = Util.GetGameObject(go.transform, "icon")
|
||||||
|
|
||||||
if curData.type~=1 then
|
if curData.type==2 then
|
||||||
-- icon.sprite = this.spLoader:LoadSprite(heroData.icon)
|
-- icon.sprite = this.spLoader:LoadSprite(heroData.icon)
|
||||||
local choosed = Util.GetGameObject(go.transform, "choosed")
|
local choosed = Util.GetGameObject(go.transform, "choosed")
|
||||||
choosed:SetActive(false)
|
choosed:SetActive(false)
|
||||||
|
@ -355,66 +384,122 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
|
||||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, heroData.id)
|
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, heroData.id)
|
||||||
end, 0.5)
|
end, 0.5)
|
||||||
end
|
end
|
||||||
-- if curData.type~=1 then
|
|
||||||
-- local itemConfig=heroData.heroConfig
|
|
||||||
-- -- frame.sprite = this.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.quality,heroData.star))
|
|
||||||
-- if heroData.lv>0 then
|
|
||||||
-- lvGo.gameObject:SetActive(true)
|
|
||||||
-- lvGo.text=heroData.lv
|
|
||||||
-- else
|
|
||||||
-- lvGo.gameObject:SetActive(false)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- formationMask:SetActive(false)
|
elseif curData.type==3 then
|
||||||
-- formationImage:SetActive(false)
|
local choosed = Util.GetGameObject(go.transform, "choosed")
|
||||||
-- lockImage:SetActive(false)
|
choosed:SetActive(false)
|
||||||
-- name.text = SubString2(GetLanguageStrById(itemConfig.Name),8)
|
-- if curSelectHeroList[heroData.dynamicId] then
|
||||||
-- -- local talismana=ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",heroData.staticId,"Level",heroData.lv)
|
-- curSelectHeroList[heroData.dynamicId]=heroData
|
||||||
-- local star=heroData.star
|
|
||||||
-- if star>0 then
|
|
||||||
-- starGrid:SetActive(true)
|
|
||||||
-- local starType=1
|
|
||||||
-- local starSize=nil
|
|
||||||
-- starType=3
|
|
||||||
-- star=star+11
|
|
||||||
-- starSize = Vector2.New(0.8,-20)
|
|
||||||
-- local starScale = -20
|
|
||||||
-- SetHeroStars(this.spLoader,starGrid, star,starType,starSize,starScale)
|
|
||||||
-- Util.SetParticleSortLayer(starGrid, this.sortingOrder + 3)
|
|
||||||
-- else
|
|
||||||
-- starGrid:SetActive(false)
|
|
||||||
-- end
|
|
||||||
-- -- local isSelect = CheckListIsContainValue1(curSelectItemOrHeroList,heroData.did)
|
|
||||||
-- -- choosed:SetActive(isSelect)
|
|
||||||
-- Util.AddOnceClick(cardBtn, function()
|
|
||||||
-- -- if isSelect then
|
|
||||||
-- -- choosed:SetActive(false)
|
|
||||||
-- -- table.removebyvalue(curSelectItemOrHeroList,heroData.did)
|
|
||||||
-- -- isSelect=false
|
|
||||||
-- -- return
|
|
||||||
-- -- end
|
|
||||||
-- -- if LengthOfTable(curSelectItemOrHeroList)>=curNeedRoleNum then
|
|
||||||
-- -- PopupTipPanel.ShowTip(Language[10403])
|
|
||||||
-- -- return
|
|
||||||
-- -- end
|
|
||||||
-- -- table.insert(curSelectItemOrHeroList,heroData.did)
|
|
||||||
-- -- isSelect=true
|
|
||||||
-- -- choosed:SetActive(true)
|
|
||||||
-- if currentSelectItem and currentSelectItem.Did == heroData .Did then
|
|
||||||
-- return
|
|
||||||
-- else
|
|
||||||
-- currentSelectItem = heroData
|
|
||||||
-- choosed:SetActive(true)
|
|
||||||
-- if curSelectGO then
|
|
||||||
-- Util.GetGameObject(curSelectGO.transform, "choosed"):SetActive(false)
|
|
||||||
-- curSelectGO = go
|
|
||||||
-- else
|
|
||||||
-- curSelectGO = go
|
|
||||||
-- end
|
|
||||||
-- choosed:SetActive(true)
|
-- choosed:SetActive(true)
|
||||||
-- end
|
-- end
|
||||||
|
for i = 1, #currentSelectItems do
|
||||||
|
|
||||||
-- end)
|
if currentSelectItems[i].dynamicId == heroData.dynamicId then
|
||||||
|
choosed:SetActive(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
Util.GetGameObject(go.transform, "posIcon"):SetActive(false)
|
||||||
|
local frame = Util.GetGameObject(go.transform, "frame"):GetComponent("Image")
|
||||||
|
local lvGo = Util.GetGameObject(go.transform, "lv")
|
||||||
|
local icon = Util.GetGameObject(go.transform, "icon"):GetComponent("Image")
|
||||||
|
local proIcon = Util.GetGameObject(go.transform, "proIcon")
|
||||||
|
local name = Util.GetGameObject(go.transform, "name"):GetComponent("Text")
|
||||||
|
local formationMask = Util.GetGameObject(go.transform, "formationMask")
|
||||||
|
local formationImage = Util.GetGameObject(formationMask.transform, "formationImage")
|
||||||
|
local lockImage = Util.GetGameObject(formationMask.transform, "lockImage")
|
||||||
|
local noumenon = Util.GetGameObject(go, "noumenon")
|
||||||
|
local starGrid = Util.GetGameObject(go.transform, "star")
|
||||||
|
local cardBtn = Util.GetGameObject(go.transform, "icon")
|
||||||
|
local GongMingMask = Util.GetGameObject(go.transform, "GongMingMask")
|
||||||
|
frame.sprite = this.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.pokemonData.config.Quality,heroData.star))
|
||||||
|
lvGo:SetActive(true)
|
||||||
|
lvGo:GetComponent("Text").text = heroData.lv
|
||||||
|
icon.sprite = this.spLoader:LoadSprite(heroData.icon)
|
||||||
|
proIcon:GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.changeProId))
|
||||||
|
formationMask:SetActive((heroData.isFormation ~=nil and heroData.isFormation ~= "" and heroData.isFormation ~= Language[10410]) or heroData.lockState == 1)
|
||||||
|
formationImage:SetActive(heroData.isFormation ~=nil and heroData.isFormation ~= "" )
|
||||||
|
lockImage:SetActive( heroData.lockState == 1)
|
||||||
|
--noumenon:SetActive( heroData.id == curHeroData.id )
|
||||||
|
name.text = SubString2(GetLanguageStrById(heroData.name),8)
|
||||||
|
local star = heroData.pokemonData.star
|
||||||
|
local starSize=Vector2.New(32.5,32.5)
|
||||||
|
if star>5 then
|
||||||
|
star=star+6
|
||||||
|
starSize = Vector2.New(1,-13)
|
||||||
|
end
|
||||||
|
SetHeroStars(this.spLoader, starGrid, star,1,starSize,-15)
|
||||||
|
LogError("hero star=="..star)
|
||||||
|
-- local effect=SetHeroFlyEffect(go,this.spLoader,heroData.star,this.sortingOrder+1,1)
|
||||||
|
-- if effect then
|
||||||
|
-- local particles=effect:GetComponentsInChildren(typeof(UnityEngine.ParticleSystem))
|
||||||
|
-- for key, value in pairs(particles:ToTable()) do
|
||||||
|
-- local mat=value:GetComponent(typeof(UnityEngine.Renderer))
|
||||||
|
-- if mat.material.shader.name=="YXZ/Effect/Mix Masking(Without Moving)_alphablend" then
|
||||||
|
-- mat.material.shader=poolManager:LoadAsset("YXZ_MixMaskingWithoutMoving_alphablend_1",poolManager.AssetType.Other)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
Util.SetParticleSortLayer(starGrid,this.sortingOrder + 1)
|
||||||
|
GongMingMask:SetActive(false)--最后检测是否共鸣
|
||||||
|
if heroData.lockState == 1 or (heroData.isFormation ~= "" and heroData.isFormation ~= Language[10410]) then
|
||||||
|
else
|
||||||
|
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
|
||||||
|
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||||
|
GongMingMask:SetActive(true)
|
||||||
|
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv) then
|
||||||
|
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).heroTid == 0 then
|
||||||
|
-- body
|
||||||
|
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||||
|
GongMingMask:SetActive(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Util.AddOnceClick(GongMingMask, function()
|
||||||
|
PopupTipPanel.ShowTip(Language[12184])
|
||||||
|
end)
|
||||||
|
Util.AddOnceClick(cardBtn, function()
|
||||||
|
local isSelect = false
|
||||||
|
local selectIndex = 0
|
||||||
|
for i = 1, #currentSelectItems do
|
||||||
|
|
||||||
|
if currentSelectItems[i].dynamicId == heroData.dynamicId then
|
||||||
|
isSelect = true
|
||||||
|
selectIndex = i
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
if isSelect then
|
||||||
|
choosed:SetActive(false)
|
||||||
|
-- curSelectHeroList[heroData.dynamicId]=nil
|
||||||
|
table.remove(currentSelectItems,selectIndex)
|
||||||
|
-- this.numText.text=string.format("%s/%s",LengthOfTable(curSelectItemOrHeroList),curNeedRoleNum)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if LengthOfTable(currentSelectItems)>=curNeedRoleNum then
|
||||||
|
PopupTipPanel.ShowTip(Language[10403])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- curSelectHeroList[heroData.dynamicId]=heroData
|
||||||
|
table.insert(currentSelectItems,heroData)
|
||||||
|
choosed:SetActive(true)
|
||||||
|
-- this.numText.text=string.format("%s/%s",LengthOfTable(currentSelectItems),curNeedRoleNum)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Util.AddOnceClick(formationMask, function()
|
||||||
|
if heroData.isFormation ~= "" then
|
||||||
|
PopupTipPanel.ShowTip( heroData.isFormation)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if heroData.lockState == 1 then
|
||||||
|
PopupTipPanel.ShowTip(Language[10413])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
Util.AddLongPressClick(cardBtn, function()
|
||||||
|
UIManager.OpenPanel(UIName.RoleInfoPopup,heroData)
|
||||||
|
end, 0.5)
|
||||||
else
|
else
|
||||||
for i = 1, #currentSelectItems do
|
for i = 1, #currentSelectItems do
|
||||||
if currentSelectItems[i].itemData.id == heroData.itemData.id and currentSelectItems[i].index == heroData.index then
|
if currentSelectItems[i].itemData.id == heroData.itemData.id and currentSelectItems[i].index == heroData.index then
|
||||||
|
|
Loading…
Reference in New Issue