装备抽卡修改提交

onepiece_demo_arena
wangzhenxing 2023-10-27 20:58:24 +08:00
parent cd9a898c46
commit 9c1823a57b
7 changed files with 62 additions and 37 deletions

View File

@ -795,7 +795,7 @@ function this.GetTableByBackDropDataNew(drop)
itemdata.frame = GetQuantityImageByquality(itemdata.configData.Quantity)
itemdata.icon = GetResourcePath(itemdata.configData.ResourceID)
itemdata.num = drop.itemlist[i].itemNum
table.insert(itemDataList, itemdata)
table.insert(itemDataList, itemdata)
end
end
if drop.equipId ~= nil and #drop.equipId > 0 then
@ -927,42 +927,43 @@ function this.GetTableByBackDropData(drop)
CheckRedPointStatus(RedPointType.TaoistTrailHelp)
end
CheckRedPointStatus(RedPointType.Huaxutan_CompoundHero)
-- if drop.especialEquipId ~= nil and #drop.especialEquipId > 0 then
-- Log("drop.especialEquipId " .. #drop.especialEquipId)
-- for i = 1, #drop.especialEquipId do
-- local itemdata = {}
-- itemdata.itemType = 4--法宝
-- itemdata.sId = drop.especialEquipId[i].equipId
-- itemdata.backData = drop.especialEquipId[i]
-- itemdata.configData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana, "TalismanaId", drop.especialEquipId[i].equipId, "Level", drop.especialEquipId[i].rebuildLevel)
-- itemdata.name = itemdata.configData.Name
-- local itemConfig = itemConfig[drop.especialEquipId[i].equipId]
-- itemdata.frame = GetHeroQuantityImageByquality(itemConfig.Quantity)
-- itemdata.icon = GetResourcePath(itemConfig.ResourceID)
-- itemdata.num = 1
-- table.insert(itemDataList, itemdata)
-- TalismanManager.InitUpdateSingleTalismanData(itemdata.backData)
-- end
-- end
-- LogBlue("drop.soulEquip:"..#drop.soulEquip)
LogError("drop.soulEquip:"..#drop.soulEquip)
if drop.soulEquip ~= nil and #drop.soulEquip > 0 then
for i = 1, #drop.soulEquip do
local itemdata = {}
itemdata.itemType = 5
--魂印
itemdata.sId = drop.soulEquip[i].equipId
itemdata.backData = drop.soulEquip[i]
SoulPrintManager.UpSoulPrintLevel(drop.soulEquip[i].equipId, drop.soulEquip[i].exp)
itemdata.level = SoulPrintManager.soulPrintLevel[drop.soulEquip[i].equipId]
itemdata.configData = ConfigManager.GetConfigData(ConfigName.EquipSign, drop.soulEquip[i].id)
LogError("drop.soulEquip[i].equipId==============="..drop.soulEquip[i].equipId)
local equipSign=ConfigManager.TryGetConfigData(ConfigName.EquipSign, drop.soulEquip[i].id)
if equipSign then
itemdata.configData = equipSign
else
itemdata.configData = itemConfig[drop.soulEquip[i].equipId]
end
itemdata.name = GetLanguageStrById(itemdata.configData.Name)
local itemConfig = itemConfig[drop.soulEquip[i].id]
local itemConfig = itemConfig[drop.soulEquip[i].equipId]
itemdata.frame = GetHeroQuantityImageByquality(itemConfig.Quantity)
itemdata.icon = GetResourcePath(itemConfig.ResourceID)
itemdata.num = 1
if equipSign==nil then
itemdata.itemType = ItemType.Talisman
LogError(" ----------------------------------- 添加法灵")
FaLingManager.AddEquipToList(drop.soulEquip[i])
else
itemdata.itemType = 5
itemdata.level = SoulPrintManager.soulPrintLevel[drop.soulEquip[i].equipId]
SoulPrintManager.UpSoulPrintLevel(drop.soulEquip[i].equipId, drop.soulEquip[i].exp)
EquipTreasureManager.InitAllEquipTreasure(drop.soulEquip)
end
table.insert(itemDataList, itemdata)
--SoulPrintManager.InitServerData(drop.soulEquip)
EquipTreasureManager.InitAllEquipTreasure(drop.soulEquip)
--TalismanManager.InitUpdateSingleTalismanData(itemdata.backData)
end
end

View File

@ -162,14 +162,14 @@ function this:SetUpHero()
end
function this:SetHeroList(isTop,isAni)
local heroList = RecruitManager.GetCurHeroTalismanaList(0)
local heroList =RecruitManager.allTailsMans --RecruitManager.GetCurHeroTalismanaList(0)
self.scrollView:SetData(heroList, function (index, item)
this:ShowSingleHero(item, heroList[index],index)
end,not isTop,not isAni)
end
function this:ShowSingleHero(go,data,index)
local equipId=heroConfig[data].EquipTalismana[2]
local equipId=data
local heroData = itemConfig[equipId]
self.itemList[self.curSelect][index] = go
Util.GetGameObject(go, "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.Quantity))
@ -177,7 +177,7 @@ function this:ShowSingleHero(go,data,index)
--Util.GetGameObject(go, "proIcon"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName))
Util.GetGameObject(go, "proIcon"):SetActive(false)
Util.GetGameObject(go, "name"):GetComponent("Text").text = heroData.Name
Util.GetGameObject(go, "heroName"):GetComponent("Text").text=heroConfig[data].ReadingName
Util.GetGameObject(go, "heroName"):GetComponent("Text").text= itemConfig[data].Name
local starGrid = Util.GetGameObject(go, "star")
-- SetHeroStars(self.spLoader,starGrid, heroData.Star)
self.maskList[self.curSelect][index] = Util.GetGameObject(go, "choosed")
@ -185,6 +185,7 @@ function this:ShowSingleHero(go,data,index)
Util.SetGray(self.itemList[self.curSelect][index],false)
local value = RecruitManager.CheckCurTalismanaState(equipId)
LogError("value==========================================="..value)
if value == 0 then--上方存在相同阵营
Util.SetGray(self.itemList[self.curSelect][index],true)
Util.AddOnceClick(go,function ()

View File

@ -5836,11 +5836,17 @@ function NetManager.ChoiceWishHeroRequest(_type,func)
table.insert(list,wishData)
if _type==1 then
RecruitManager.GetWishCardData(list)
RecruitManager.newWishList = msg.newList--新增的心愿神将list
elseif _type==4 then
LogError("設置心願裝備----------------------------")
RecruitManager.SetWishTalismanData(list)
RecruitManager.allTailsMans=msg.newList
LogError("1111111111111111111111111111111111111111111")
for i=1, #msg.newList do
LogError(" newlist [i]================"..msg.newList[i])
end
end
RecruitManager.newWishList = msg.newList--新增的心愿神将list
--RecruitManager.openTime = msg.serverOpenTime--开服时间戳或是0用于判断心愿神将是否加入卡池
if func then
func(msg)
@ -5854,12 +5860,12 @@ function NetManager.DesireDrawCardRequest(_type,_id,func)
local data = PlayerInfoProto_pb.DesireDrawCardRequest()
data.type=_type
data.tempId=_id
--LogError("_type==============".._type.." _id==".._id)
LogError("_type==============".._type.." _id==".._id)
local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.DESIRE_DRAW_CARD_REQUEST, MessageTypeProto_pb.DESIRE_DRAW_CARD_RESPONSE, msg, function(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.DesireDrawCardResponse()
--LogError("设置心愿抽卡神将成功----------")
LogError("设置心愿抽卡神将成功----------")
msg:ParseFromString(data)
-- RecruitManager.GetWishCardData(msg.infoList)
-- RecruitManager.newWishList = msg.heroList--新增的心愿神将list

View File

@ -256,7 +256,7 @@ function RecruitEquipPanelNew:UpdataWishPanel()
self.wishText.text = string.format("%s/%s",0,data)
self.wishTipIma.text = "宝箱等级"..data.."级后开启心愿功能,\n将有更高概率获得心愿法宝~"
end
self:CheckNewWishHero()
--self:CheckNewWishHero()
end)
self.tenTip.gameObject:SetActive(true)
-- if RecruitManager.isTenRecruit == 0 then

View File

@ -156,7 +156,14 @@ function WishEquipBuyOnePanel:OnOpen(...)
Util.ClearChild(Util.GetTransform(this.content, "itemContent1"))
this.itemDataList={}
this.itemDataList=BagManager.GetTableByBackDropData(this.drop)
local list=BagManager.GetTableByBackDropData(this.drop)
for k, v in pairs(list) do
if v.sId~=94 then
table.insert(this.itemDataList,v)
end
end
LogError("this.itemDataList==================="..#this.itemDataList)
this.view = SubUIManager.Open(SubUIConfig.ItemView,Util.GetTransform(this.content, "itemContent1"))
this.view:OnOpen(true,this.itemDataList[1],1.4,true,false,false,self.sortingOrder)

View File

@ -147,7 +147,13 @@ function WishEquipBuyTenPanel:OnOpen(...)
this.itemIcon3.sprite=this.spLoader:LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name)
local itemDataList={}
itemDataList=BagManager.GetTableByBackDropData(this.drop)
local list=BagManager.GetTableByBackDropData(this.drop)
for k, v in pairs(list) do
if v.sId~=94 then
table.insert(itemDataList,v)
end
end
LogError("itemDataList len==============="..#itemDataList)
this.openTenAgainButton:GetComponent("Button").enabled=false
this.btnBack:GetComponent("Button").enabled=false
callList:Clear()

View File

@ -166,7 +166,7 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
-- 卸载头像框特效
self:UnLoadFrameEffect()
-- LogGreen("itemType:"..tostring(_itemData.itemType).." Name:"..tostring(_itemData.configData.Name).." 数量:"..tostring(_itemData.num))
LogGreen("itemType:"..tostring(_itemData.itemType).." Name:"..tostring(_itemData.configData.Name).." 数量:"..tostring(_itemData.num))
if _itemData.itemType == 1 or _itemData.itemType == 0 then--物品
--item
if effectLayer > 0 and _itemData.configData.Quantity1 then
@ -459,6 +459,11 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardRideShowPopup, _itemData.backData.itemId,nil)
end)
elseif _itemData.itemType == ItemType.Talisman then--
Util.AddOnceClick(self.frameBtn, function()
--UIManager.OpenPanel(UIName.RewardRideShowPopup, _,nil)
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.equipId,nil,self.isRewardItemPop,true)
end)
elseif _itemData.ItemType == ItemType.Gem then
if _itemData.isReplace then
self.upImg:SetActive(true)
@ -738,8 +743,7 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
--TalismanManager.AllTalismanStartStar[itemSId]
SetHeroStars(self.spLoader, self.starGrid, 0,1,Vector2.New(32.5,32.5),-15)
Util.AddOnceClick(self.frameBtn, function()
--UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup,2,"",itemSId,0,0,0)
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,itemSId,nil,self.isRewardItemPop,true)
LogError("?????????????????????????????????????????????")
end)
elseif itemDataConFig.ItemType == ItemType.talismanSoulChip then
self.num:SetActive(true)