Merge branch 'Branch_oumei' of http://192.168.1.21:3000/root/sk-client into Branch_oumei
commit
3fb92e5e7f
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2d8975318ef427d4a8608e18dc787442
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -225,10 +225,6 @@ TESTBUYGIFTGOODSREQUEST = protobuf.Descriptor();
|
|||
TESTBUYGIFTGOODSREQUEST_GOODSID_FIELD = protobuf.FieldDescriptor();
|
||||
TESTBUYGIFTGOODSREQUEST_CHANNEL_FIELD = protobuf.FieldDescriptor();
|
||||
TESTBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD = protobuf.FieldDescriptor();
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST = protobuf.Descriptor();
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD = protobuf.FieldDescriptor();
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD = protobuf.FieldDescriptor();
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD = protobuf.FieldDescriptor();
|
||||
BUYGIFTGOODSONLYZEROPRICEREQUEST = protobuf.Descriptor();
|
||||
BUYGIFTGOODSONLYZEROPRICEREQUEST_GOODSID_FIELD = protobuf.FieldDescriptor();
|
||||
BUYGOODSDROPINDICATION = protobuf.Descriptor();
|
||||
|
|
@ -2789,43 +2785,6 @@ TESTBUYGIFTGOODSREQUEST.enum_types = {}
|
|||
TESTBUYGIFTGOODSREQUEST.fields = {TESTBUYGIFTGOODSREQUEST_GOODSID_FIELD, TESTBUYGIFTGOODSREQUEST_CHANNEL_FIELD, TESTBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD}
|
||||
TESTBUYGIFTGOODSREQUEST.is_extendable = false
|
||||
TESTBUYGIFTGOODSREQUEST.extensions = {}
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.name = "goodsId"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.full_name = ".com.ljsd.jieling.protocols.VoucherPriceBuyGiftGoodsRequest.goodsId"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.number = 1
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.index = 0
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.label = 1
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.has_default_value = false
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.default_value = 0
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.type = 5
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD.cpp_type = 1
|
||||
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.name = "channel"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.full_name = ".com.ljsd.jieling.protocols.VoucherPriceBuyGiftGoodsRequest.channel"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.number = 2
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.index = 1
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.label = 1
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.has_default_value = false
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.default_value = ""
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.type = 9
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD.cpp_type = 9
|
||||
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.name = "devaluateId"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.full_name = ".com.ljsd.jieling.protocols.VoucherPriceBuyGiftGoodsRequest.devaluateId"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.number = 3
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.index = 2
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.label = 1
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.has_default_value = false
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.default_value = 0
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.type = 5
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD.cpp_type = 1
|
||||
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST.name = "VoucherPriceBuyGiftGoodsRequest"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST.full_name = ".com.ljsd.jieling.protocols.VoucherPriceBuyGiftGoodsRequest"
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST.nested_types = {}
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST.enum_types = {}
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST.fields = {VOUCHERPRICEBUYGIFTGOODSREQUEST_GOODSID_FIELD, VOUCHERPRICEBUYGIFTGOODSREQUEST_CHANNEL_FIELD, VOUCHERPRICEBUYGIFTGOODSREQUEST_DEVALUATEID_FIELD}
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST.is_extendable = false
|
||||
VOUCHERPRICEBUYGIFTGOODSREQUEST.extensions = {}
|
||||
BUYGIFTGOODSONLYZEROPRICEREQUEST_GOODSID_FIELD.name = "goodsId"
|
||||
BUYGIFTGOODSONLYZEROPRICEREQUEST_GOODSID_FIELD.full_name = ".com.ljsd.jieling.protocols.BuyGiftGoodsOnlyZeroPriceRequest.goodsId"
|
||||
BUYGIFTGOODSONLYZEROPRICEREQUEST_GOODSID_FIELD.number = 1
|
||||
|
|
@ -7450,7 +7409,6 @@ VipTakeDilyRequest = protobuf.Message(VIPTAKEDILYREQUEST)
|
|||
VipTakeDilyResponse = protobuf.Message(VIPTAKEDILYRESPONSE)
|
||||
VirtualBattleGetInfoResponse = protobuf.Message(VIRTUALBATTLEGETINFORESPONSE)
|
||||
VirtualEliteBattleGetInfoResponse = protobuf.Message(VIRTUALELITEBATTLEGETINFORESPONSE)
|
||||
VoucherPriceBuyGiftGoodsRequest = protobuf.Message(VOUCHERPRICEBUYGIFTGOODSREQUEST)
|
||||
WeekEndRefreshIndication = protobuf.Message(WEEKENDREFRESHINDICATION)
|
||||
WeekEndRefreshTimeResponse = protobuf.Message(WEEKENDREFRESHTIMERESPONSE)
|
||||
WelfareCurrencyInfo = protobuf.Message(WELFARECURRENCYINFO)
|
||||
|
|
|
|||
|
|
@ -1,43 +1,256 @@
|
|||
require("Base/BasePanel")
|
||||
RewardEquipSingleShowPopup2 = Inherit(BasePanel)
|
||||
local this=RewardEquipSingleShowPopup2
|
||||
local curSuitProGo = {}
|
||||
local RewardEquipSingleShowPopup2 = Inherit(BasePanel)
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||
local passiveSkillConfig = ConfigManager.GetConfig(ConfigName.PassiveSkillConfig)
|
||||
local EquipStrengthen = ConfigManager.GetConfig(ConfigName.EquipStrengthen)
|
||||
local EquipRankUp = ConfigManager.GetConfig(ConfigName.EquipRankUp)
|
||||
local suitConFig = ConfigManager.GetConfig(ConfigName.EquipSuiteConfig)
|
||||
local _BaseProList = {}--基础属性对象
|
||||
local _homeProList = {}--摘星阁属性对象
|
||||
local _suitProList = {}--套装属性对象
|
||||
local _superProList = {}--白金属性对象
|
||||
local equipConfigData
|
||||
local typeToUpdate = {
|
||||
[2] = 2,--已穿戴->卸载单件
|
||||
[3] = 1,--未穿戴->穿单件
|
||||
[4] = 3,--未穿戴->替换单件
|
||||
}
|
||||
--初始化组件(用于子类重写)
|
||||
function RewardEquipSingleShowPopup2:InitComponent()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
self.mask = Util.GetGameObject(self.transform, "mask")
|
||||
self.content = Util.GetGameObject(self.transform, "Content")
|
||||
--装备详情--topBar
|
||||
self.topBar = Util.GetGameObject(self.transform, "Content/topBar")
|
||||
self.eqiopName = Util.GetGameObject(self.topBar, "name"):GetComponent("Text")
|
||||
self.UI_effect_WuCai_Kuang = Util.GetGameObject(self.topBar, "UI_effect_WuCai_Kuang")
|
||||
self.c_ui_qinyan_duan = Util.GetGameObject(self.topBar, "c_ui_qinyan_duan")
|
||||
self.icon = Util.GetGameObject(self.topBar, "icon"):GetComponent("Image")
|
||||
self.frame = Util.GetGameObject(self.topBar, "frame"):GetComponent("Image")
|
||||
self.equipType=Util.GetGameObject(self.topBar, "equipType"):GetComponent("Text")
|
||||
self.equipQuaText=Util.GetGameObject(self.topBar, "equipQuaText"):GetComponent("Text")
|
||||
self.equipInfoText=Util.GetGameObject(self.topBar, "equipInfoText"):GetComponent("Text")
|
||||
self.powerNum=Util.GetGameObject(self.topBar, "powerNum"):GetComponent("Text")
|
||||
self.star=Util.GetGameObject(self.topBar, "star")
|
||||
self.powerNumUpDown = Util.GetGameObject(self.topBar, "powerUPorDown"):GetComponent("Image")
|
||||
self.effectbaijin = Util.GetGameObject(self.topBar, "fx_zhuangbeijiemian")
|
||||
self.hLv = Util.GetGameObject(self.topBar, "hLv"):GetComponent("Text")--家园摘星阁强化
|
||||
self.hProLv = Util.GetGameObject(self.topBar, "hProLv"):GetComponent("Text")--家园摘星阁突破
|
||||
--装备属性--midBar
|
||||
--basePro
|
||||
self.midBar = Util.GetGameObject(self.transform, "Content/midBar")
|
||||
self.basePro = Util.GetGameObject(self.midBar, "basePro")
|
||||
self.baseProName = Util.GetGameObject(self.basePro, "PropertyName"):GetComponent("Text")
|
||||
self.baseProGrid = Util.GetGameObject(self.basePro, "grid")
|
||||
self.baseProPre = Util.GetGameObject(self.basePro, "grid/curProName")
|
||||
self.baseProPre:SetActive(false)
|
||||
--homePro
|
||||
self.homePro = Util.GetGameObject(self.midBar, "homePro")
|
||||
self.homeProName = Util.GetGameObject(self.homePro, "PropertyName"):GetComponent("Text")
|
||||
self.homeProGrid = Util.GetGameObject(self.homePro, "grid")
|
||||
self.homeProPre = Util.GetGameObject(self.homePro, "grid/curProName")
|
||||
self.homeProPre:SetActive(false)
|
||||
self.btnJumpHome = Util.GetGameObject(self.homePro, "btnJump")
|
||||
--suitPro
|
||||
self.suitPro = Util.GetGameObject(self.midBar, "suitPro")
|
||||
self.suitProName = Util.GetGameObject(self.suitPro, "PropertyName"):GetComponent("Text")
|
||||
self.suitProGrid = Util.GetGameObject(self.suitPro, "proGrid")
|
||||
self.suitProPre = Util.GetGameObject(self.suitPro, "proGrid/proPre")
|
||||
self.suitProPre:SetActive(false)
|
||||
--superPro
|
||||
self.superPro = Util.GetGameObject(self.midBar, "superPro")
|
||||
self.superProGrid = Util.GetGameObject(self.superPro, "proGrid")
|
||||
self.superProPre = Util.GetGameObject(self.superPro, "proGrid/Desc")
|
||||
self.superProPre:SetActive(false)
|
||||
|
||||
this.BtnBack = Util.GetGameObject(self.transform, "btnBack")
|
||||
--装备详情
|
||||
this.equipName = Util.GetGameObject(self.transform, "Content/bg/equipInfo/name/text"):GetComponent("Text")
|
||||
this.icon = Util.GetGameObject(self.transform, "Content/bg/equipInfo/icon"):GetComponent("Image")
|
||||
this.frame = Util.GetGameObject(self.transform, "Content/bg/equipInfo/frame"):GetComponent("Image")
|
||||
this.equipType=Util.GetGameObject(self.transform, "Content/bg/equipInfo/proGrid/equipTypeText"):GetComponent("Text")
|
||||
this.star=Util.GetGameObject(self.transform, "Content/bg/armorInfo/star")
|
||||
-- this.equipPos=Util.GetGameObject(self.transform, "Content/bg/equipInfo/proGrid/equipPosText"):GetComponent("Text")--装备关闭职业限定
|
||||
this.equipRebuildLv=Util.GetGameObject(self.transform, "Content/bg/equipInfo/proGrid/equipLvText")
|
||||
this.equipRebuildLv:SetActive(false)
|
||||
this.equipQuaText=Util.GetGameObject(self.transform, "Content/bg/equipInfo/qualityText"):GetComponent("Text")
|
||||
this.equipInfoText=Util.GetGameObject(self.transform, "Content/bg/equipInfo/equipInfoText"):GetComponent("Text")
|
||||
--装备属性
|
||||
this.mainPro=Util.GetGameObject(self.transform, "Content/bg/mainPro")
|
||||
this.mainProName=Util.GetGameObject(self.transform, "Content/bg/mainPro/bg/curProName"):GetComponent("Text")
|
||||
this.mainProVale=Util.GetGameObject(self.transform, "Content/bg/mainPro/bg/curProName/curProVale"):GetComponent("Text")
|
||||
|
||||
this.equipOtherProPre = Util.GetGameObject(self.transform, "Content/bg/proPre")
|
||||
this.equipProGrid = Util.GetGameObject(self.transform, "Content/bg/proRect/proGrid")
|
||||
--装备被动技能
|
||||
this.skillObject=Util.GetGameObject(self.transform, "Content/bg/castInfoObject")
|
||||
this.skillInfo=Util.GetGameObject(self.transform, "Content/bg/castInfoObject/castInfo"):GetComponent("Text")
|
||||
this.skillObject:SetActive(false)
|
||||
--分解按钮--btmBar
|
||||
self.btmBar = Util.GetGameObject(self.transform, "Content/btmBar")
|
||||
self.howGet = Util.GetGameObject(self.btmBar, "howGet")
|
||||
self.btnGrid = Util.GetGameObject(self.btmBar, "btnGrid")
|
||||
self.btnSure = Util.GetGameObject(self.btnGrid, "btnSure")
|
||||
self.btnJump = Util.GetGameObject(self.btnGrid, "btnJump")
|
||||
self.btnWear = Util.GetGameObject(self.btnGrid, "btnWear")
|
||||
self.btnDown = Util.GetGameObject(self.btnGrid, "btnDown")
|
||||
self.btnSwitch = Util.GetGameObject(self.btnGrid, "btnSwitch")
|
||||
--装备获取途径--btmBar
|
||||
self.canGetPre = Util.GetGameObject(self.btmBar, "scroll/canGetPre")
|
||||
self.canGetGrid = Util.GetGameObject(self.btmBar, "scroll")
|
||||
self.canGetScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.canGetGrid.transform,self.canGetPre, nil,
|
||||
Vector2.New(self.canGetGrid.transform.rect.width, self.canGetGrid.transform.rect.height), 1, 1, Vector2.New(0, 0))
|
||||
self.canGetScrollView.moveTween.MomentumAmount = 1
|
||||
self.canGetScrollView.moveTween.Strength = 2
|
||||
self.canGetScrollView.elastic = false
|
||||
self.jumpViewList = {}
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function RewardEquipSingleShowPopup2:BindEvent()
|
||||
|
||||
Util.AddClick(this.BtnBack, function()
|
||||
Util.AddClick(self.mask, function()
|
||||
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
|
||||
self:ClosePanel()
|
||||
end)
|
||||
--跳转
|
||||
Util.AddClick(self.btnJump, function()
|
||||
if self.equipData.itemConfig then
|
||||
JumpManager.GoJump(self.equipData.itemConfig.UseJump)
|
||||
end
|
||||
end)
|
||||
--分解
|
||||
Util.AddClick(self.btnSure, function()
|
||||
--数量大于1 ,弹选择框
|
||||
if BagManager.GetItemCountById(self.equipData.id) > 1 then
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.EquipSingleSell,self.equipData)
|
||||
self:ClosePanel()
|
||||
elseif BagManager.GetItemCountById(self.equipData.id) == 1 then
|
||||
--只有一个,分解品质大于4, 弹框
|
||||
if self.equipData.itemConfig.Quantity>=4 then
|
||||
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel,2,self.equipData.itemConfig.ItemBaseType,self.equipData)
|
||||
else
|
||||
local curResolveAllItemList={}
|
||||
local equip = {}
|
||||
equip.itemId = self.equipData.id
|
||||
equip.itemNum = 1
|
||||
table.insert(curResolveAllItemList,equip)
|
||||
local type = 1
|
||||
NetManager.UseAndPriceItemRequest(type,curResolveAllItemList,function (drop)
|
||||
self:SendBackResolveReCallBack(drop)
|
||||
end)
|
||||
end
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[11506])
|
||||
end
|
||||
end)
|
||||
--穿戴
|
||||
Util.AddOnceClick(self.btnWear, function()
|
||||
|
||||
if equipConfigData.Position==7 or equipConfigData.Position==8 then
|
||||
local idList={}
|
||||
table.insert(idList,self.equipData.id)
|
||||
local heroId=""
|
||||
if self.curHeroData then
|
||||
heroId=self.curHeroData.dynamicId
|
||||
local list=GiftManager.GetHeroGifts(heroId)
|
||||
if #list >= 12 then
|
||||
PopupTipPanel.ShowTip("礼物数量已达上限!")
|
||||
return
|
||||
end
|
||||
|
||||
else
|
||||
heroId="0"
|
||||
local list=GiftManager.GetPlayerGifts()
|
||||
if #list >= 12 then
|
||||
PopupTipPanel.ShowTip("礼物数量已达上限!")
|
||||
return
|
||||
end
|
||||
end
|
||||
NetManager.GiftEquipWearRequest(1,heroId,idList,function()
|
||||
self:ClosePanel()
|
||||
if heroId=="0" then
|
||||
GiftManager.SetPlayerGift(idList)
|
||||
HeroManager.ChangeAllHeroGiftLV()
|
||||
else
|
||||
GiftManager.SetHeroGift(self.curHeroData.dynamicId,idList,1)
|
||||
end
|
||||
self.parent.RefreshWindowData()
|
||||
end)
|
||||
else
|
||||
local equipIdList={}
|
||||
local equipDataList={}
|
||||
table.insert(equipIdList,tostring(self.equipData.id))
|
||||
table.insert(equipDataList,self.equipData)
|
||||
NetManager.EquipWearRequest(self.curHeroData.dynamicId,equipIdList,1,function ()
|
||||
self:ClosePanel()
|
||||
self.parent.UpdateEquipPosHeroData(1,typeToUpdate[self.openType],equipDataList,0,self.position)
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
end)
|
||||
--卸下
|
||||
Util.AddOnceClick(self.btnDown, function()
|
||||
|
||||
if equipConfigData.Position==7 or equipConfigData.Position==8 then
|
||||
local idList={}
|
||||
local heroId=""
|
||||
if self.curHeroData then
|
||||
heroId=self.curHeroData.dynamicId
|
||||
else
|
||||
heroId="0"
|
||||
end
|
||||
LogError("2222222222222222222222"..heroId)
|
||||
LogError("self.equipData.id==="..self.equipData.id)
|
||||
|
||||
table.insert(idList,self.equipData.id)
|
||||
--table.insert(idList,5200020)
|
||||
NetManager.GiftEquipWearRequest(2,heroId,idList,function()
|
||||
self:ClosePanel()
|
||||
if heroId=="0" then
|
||||
GiftManager.RemovePlayerGift(idList)
|
||||
HeroManager.ChangeAllHeroGiftLV()
|
||||
else
|
||||
GiftManager.SetHeroGift(self.curHeroData.dynamicId,idList,2)
|
||||
end
|
||||
self.parent.RefreshWindowData()
|
||||
end)
|
||||
else
|
||||
local equipIdList={}
|
||||
local equipDataList={}
|
||||
table.insert(equipIdList,tostring(self.equipData.id))
|
||||
table.insert(equipDataList,self.equipData)
|
||||
NetManager.EquipUnLoadOptRequest(self.curHeroData.dynamicId,equipIdList ,1, function ()
|
||||
self:ClosePanel()
|
||||
self.parent.UpdateEquipPosHeroData(1,typeToUpdate[self.openType],equipDataList)
|
||||
end)
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
--替换
|
||||
Util.AddClick(self.btnSwitch, function()
|
||||
local equipIdList={}
|
||||
local equipDataList={}
|
||||
table.insert(equipIdList,tostring(self.equipData.id))
|
||||
table.insert(equipDataList,self.equipData)
|
||||
NetManager.EquipWearRequest(self.curHeroData.dynamicId,equipIdList ,1, function ()
|
||||
self:ClosePanel()
|
||||
self.parent.UpdateEquipPosHeroData(1,typeToUpdate[self.openType],equipDataList,self.nextEquip,self.position)
|
||||
end)
|
||||
end)
|
||||
|
||||
--跳转摘星阁
|
||||
Util.AddClick(self.btnJumpHome, function()
|
||||
HomeLandManager.curEquip = self.equipData.position
|
||||
JumpManager.GoJump(40059,function ()
|
||||
Timer.New(function ()
|
||||
UIManager.OpenPanel(UIName.HomeLandEquipPopup)
|
||||
end,0.5):Start()
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
--道具 和 装备分解 发送请求后 回调
|
||||
function RewardEquipSingleShowPopup2:SendBackResolveReCallBack(drop)
|
||||
local isShowReward=false
|
||||
if drop.itemlist~=nil and #drop.itemlist>0 then
|
||||
for i = 1, #drop.itemlist do
|
||||
if drop.itemlist[i].itemNum>0 then
|
||||
isShowReward=true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if isShowReward then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function ()
|
||||
BagManager.OnShowTipDropNumZero(drop)
|
||||
end)
|
||||
else
|
||||
BagManager.OnShowTipDropNumZero(drop)
|
||||
end
|
||||
if self.func then
|
||||
self.func()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
|
@ -50,58 +263,433 @@ function RewardEquipSingleShowPopup2:RemoveListener()
|
|||
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function RewardEquipSingleShowPopup2:OnOpen(equipSId)
|
||||
function RewardEquipSingleShowPopup2:OnSortingOrderChange()
|
||||
Util.SetParticleSortLayer(self.effectbaijin,self.sortingOrder + 1)
|
||||
SetParticleSortLayer(self.c_ui_qinyan_duan,self.sortingOrder + 1)
|
||||
SetParticleSortLayer(self.UI_effect_WuCai_Kuang,self.sortingOrder + 1)
|
||||
end
|
||||
|
||||
--装备基础信息
|
||||
local itemConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig, equipSId)
|
||||
local equipConfigData=ConfigManager.GetConfigData(ConfigName.EquipConfig, equipSId)
|
||||
this.equipQuaText.text=GetStringByEquipQua(equipConfigData.Quality,GetQuaStringByEquipQua(equipConfigData.Quality))
|
||||
this.equipName.text=GetStringByEquipQua(equipConfigData.Quality,equipConfigData.Name)
|
||||
this.frame.sprite = Util.LoadSprite(GetQuantityImageByquality(equipConfigData.Quality))
|
||||
this.icon.sprite = Util.LoadSprite(GetResourcePath(itemConfigData.ResourceID))
|
||||
this.equipInfoText.text=itemConfigData.ItemDescribe
|
||||
EquipManager.SetEquipStarShow(this.star,equipConfigData.Id)
|
||||
this.equipType.text=GetLanguageStrById(11093)..GetEquipPosStrByEquipPosNum(equipConfigData.Position)
|
||||
--装备属性
|
||||
this.mainProName.text=ConfigManager.GetConfigData(ConfigName.PropertyConfig, equipConfigData.PropertyMin[1]).Info
|
||||
this.mainProVale.text="【"..equipConfigData.PropertyMin[2].."-"..equipConfigData.PropertyMax[2].."】"
|
||||
--套装属性
|
||||
if equipConfigData.SuiteID and equipConfigData.SuiteID > 0 then
|
||||
Util.GetGameObject(self.transform, "Content/bg/proRect"):SetActive(true)
|
||||
local curSuitConFig = ConfigManager.GetConfigData(ConfigName.EquipSuiteConfig,equipConfigData.SuiteID)
|
||||
if curSuitConFig then
|
||||
for i = 1, math.max(#curSuitConFig.SuiteValue, #curSuitProGo) do
|
||||
local go = curSuitProGo[i]
|
||||
if not go then
|
||||
go = newObject(this.equipOtherProPre)
|
||||
go.transform:SetParent(this.equipProGrid.transform)
|
||||
go.transform.localScale = Vector3.one
|
||||
go.transform.localPosition = Vector3.zero
|
||||
curSuitProGo[i] = go
|
||||
--界面打开时调用(用于子类重写)
|
||||
function RewardEquipSingleShowPopup2:OnOpen(_parent,_equipData,_openType,_isShowGet,_isShowGo,_curHeroData,_position,_targetEquipData,_func)
|
||||
if not _equipData then
|
||||
return
|
||||
end
|
||||
self.parent = _parent --父界面
|
||||
self.equipData = _equipData --当前装备数据
|
||||
self.openType = _openType --0不显示按钮、1背包、2已穿戴(显示卸下)、3未穿戴(显示穿戴)、4未穿戴(显示替换)、5自己或其他人穿戴(非装备界面但需要显示套装属性)
|
||||
self.howGet:SetActive(_isShowGet and true or false)--是否显示获取途径
|
||||
self.btnGrid:SetActive(self.openType ~= 0)
|
||||
self.curHeroData = _curHeroData --装备了该装备的英雄数据
|
||||
self.position = _position --装备的位置
|
||||
self.nextEquip = _targetEquipData--要替换的目标装备
|
||||
if _targetEquipData then
|
||||
LogGreen("Id:"..tostring(_equipData.id).." Id2:"..tostring(_targetEquipData.id))
|
||||
end
|
||||
self.isShowGo = _isShowGo and _isShowGo or false--是否显示跳转按钮
|
||||
self.func = _func
|
||||
end
|
||||
|
||||
function RewardEquipSingleShowPopup2:SetBtns()
|
||||
local itemConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig, tonumber(self.equipData.id))
|
||||
self.btnSure:SetActive(itemConfigData.IfResolve==1 and BagManager.isBagPanel)
|
||||
self.btnJump:SetActive(itemConfigData.UseJump and itemConfigData.UseJump > 0 and BagManager.isBagPanel)
|
||||
self.btnWear:SetActive(self.openType == 3)
|
||||
self.btnDown:SetActive(self.openType == 2)
|
||||
self.btnSwitch:SetActive(self.openType == 4)
|
||||
end
|
||||
|
||||
function RewardEquipSingleShowPopup2:OnShow()
|
||||
--上部装备基础信息
|
||||
Log("装备id:"..tostring(self.equipData.id).." openType:"..tostring(self.openType))
|
||||
self:SetBtns()
|
||||
equipConfigData=ConfigManager.GetConfigData(ConfigName.EquipConfig, tonumber(self.equipData.id))
|
||||
local itemConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig, tonumber(self.equipData.id))
|
||||
local aaa=equipConfigData.Quality
|
||||
if equipConfigData.Quality==8 then
|
||||
aaa=7
|
||||
end
|
||||
Util.GetGameObject(self.topBar, "bg2"):GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_di_"..aaa)
|
||||
self.equipQuaText.text=GetStringByEquipQua(equipConfigData.Quality,GetQuaStringByEquipQua(equipConfigData.Quality))
|
||||
self.eqiopName.text=GetLanguageStrById(equipConfigData.Name)-- GetStringByEquipQua(equipConfigData.Quality,GetLanguageStrById(equipConfigData.Name))
|
||||
self.c_ui_qinyan_duan:SetActive(equipConfigData.Quality==8)
|
||||
self.UI_effect_WuCai_Kuang:SetActive(equipConfigData.Quality==7)
|
||||
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(equipConfigData.Quality))
|
||||
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfigData.ResourceID))
|
||||
self.equipInfoText.text=GetLanguageStrById(itemConfigData.ItemDescribe)
|
||||
if equipConfigData.ExhibitionScore and equipConfigData.ExhibitionScore>0 then
|
||||
self.powerNum.text=equipConfigData.ExhibitionScore
|
||||
else
|
||||
self.powerNum.text=EquipManager.CalculateWarForce(self.equipData.id)
|
||||
end
|
||||
if equipConfigData.Position==7 or equipConfigData.Position==8 then
|
||||
SetHeroStars(self.spLoader,self.star,equipConfigData.Star,1,nil,-15)
|
||||
else
|
||||
EquipManager.SetEquipStarShow(self.spLoader, self.star,equipConfigData.Id)
|
||||
end
|
||||
|
||||
self.equipType.text=Language[11089]..GetEquipPosStrByEquipPosNum(equipConfigData.Position)
|
||||
|
||||
--摘星阁加持
|
||||
self.hLv.text = ""
|
||||
self.hProLv.text = ""
|
||||
if self.equipData.homeEquipLv and self.equipData.homeEquipLv[1] > 0 then
|
||||
self.hLv.text = self.equipData.homeEquipLv[1] > 0 and self.equipData.homeEquipLv[1] or ""
|
||||
self.hProLv.text = self.equipData.homeEquipLv[2] > 0 and self.equipData.homeEquipLv[2] or ""
|
||||
end
|
||||
--下部按钮信息
|
||||
self.effectbaijin:SetActive(equipConfigData.Quality==7)
|
||||
Util.SetParticleSortLayer(self.effectbaijin,self.sortingOrder + 1)
|
||||
if self.openType == 4 then
|
||||
self.powerNumUpDown.gameObject:SetActive(true)
|
||||
local Power = EquipManager.CalculateWarForce(self.equipData.id)
|
||||
local Power2 = EquipManager.CalculateWarForce(self.nextEquip.id)
|
||||
-- LogGreen("Id:"..tostring(self.equipData.id).." Power:"..tostring(Power).." Id2:"..tostring(self.equipData.id).." Power2:"..tostring(Power2))
|
||||
if(Power > Power2) then
|
||||
self.powerNumUpDown.sprite = self.spLoader:LoadSprite(PowerChangeIconDef[1])
|
||||
elseif(Power < Power2)then
|
||||
self.powerNumUpDown.sprite = self.spLoader:LoadSprite(PowerChangeIconDef[2])
|
||||
else
|
||||
self.powerNumUpDown.gameObject:SetActive(false)
|
||||
end
|
||||
else
|
||||
self.powerNumUpDown.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
--basePro基础属性
|
||||
if equipConfigData.Property then
|
||||
self.basePro:SetActive(true)
|
||||
for _, pro in ipairs(_BaseProList) do
|
||||
pro:SetActive(false)
|
||||
end
|
||||
local num = 0
|
||||
for i=1,#equipConfigData.Property do
|
||||
local prop = equipConfigData.Property[i]
|
||||
if tonumber(prop[1])~=nil then
|
||||
local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1])
|
||||
if proConfigData then
|
||||
num = num + 1
|
||||
--基础属性
|
||||
if not _BaseProList[num] then
|
||||
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||
end
|
||||
_BaseProList[num]:SetActive(true)
|
||||
if equipConfigData.Position==7 then
|
||||
_BaseProList[num]:GetComponent("Text").text ="全体英雄"..GetLanguageStrById(proConfigData.Info)
|
||||
else
|
||||
_BaseProList[num]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info)
|
||||
end
|
||||
|
||||
local vText = Util.GetGameObject(_BaseProList[num], "curProVale"):GetComponent("Text")
|
||||
-- Util.GetGameObject(vText.gameObject, "homeValue"):GetComponent("Text").text = ""--摘星阁加持文字显示位置
|
||||
local str=""
|
||||
if prop[2] > 0 then
|
||||
if equipConfigData.Position==8 and self.curHeroData then
|
||||
LogError("GiftManager.GetPlayerGiftAdd()============="..GiftManager.GetPlayerGiftAdd().." prop[2]==========="..prop[2].." HeroManager.ReturnGiftAtt()=="..HeroManager.ReturnGiftAtt())
|
||||
local proValue =math.floor(prop[2]*(1+GiftManager.GetPlayerGiftAdd()/100)+0.5)
|
||||
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])--..
|
||||
--string.format(" 命格加成+%s (%s%%)",math.floor(proValue*GiftManager.GetPlayerGiftAdd()/100),GiftManager.GetPlayerGiftAdd())
|
||||
--..string.format(" 特训加成+%s (%s%%)",math.floor(proValue*HeroManager.ReturnGiftAtt()),HeroManager.ReturnGiftAtt())
|
||||
elseif equipConfigData.Position<=4 and self.curHeroData then
|
||||
-- for k, v in pairs(self.curHeroData.potential) do
|
||||
-- LogError("v======================"..v.." k==="..k)
|
||||
-- end
|
||||
local potencyAdd=HeroManager.GetHeroPotencyAddByTypeAndPotencyData(self.curHeroData.potential,equipConfigData.Position)
|
||||
LogError("potencyAdd============"..potencyAdd)
|
||||
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])..string.format(" <color=#8C6210>潜能 +%s(%s%%)</color>",math.floor(prop[2]*potencyAdd+0.5),potencyAdd*100)
|
||||
else
|
||||
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])
|
||||
end
|
||||
|
||||
else
|
||||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop[2])
|
||||
end
|
||||
end
|
||||
go.gameObject:SetActive(false)
|
||||
end
|
||||
for i = 1, #curSuitConFig.SuiteValue do
|
||||
local go = curSuitProGo[i]
|
||||
go.gameObject:SetActive(true)
|
||||
Util.GetGameObject(go.transform, "proName"):GetComponent("Text").text = "<color=#B9AC97>" .. GetLanguageStrById(propertyConfig[curSuitConFig.SuiteValue[i][2]].Info) .."+ "..GetPropertyFormatStr(propertyConfig[curSuitConFig.SuiteValue[i][2]].Style,curSuitConFig.SuiteValue[i][3]) .. "</color>"
|
||||
Util.GetGameObject(go.transform, "proVale"):GetComponent("Text").text = "<color=#B9AC97>(" .. curSuitConFig.SuiteValue[i][1] .. GetLanguageStrById(11095)
|
||||
|
||||
end
|
||||
|
||||
for i=1,#equipConfigData.PlayerProperty do
|
||||
local prop=equipConfigData.PlayerProperty[i]
|
||||
if tonumber(prop[1])~=nil then
|
||||
local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1])
|
||||
if proConfigData then
|
||||
num = num + 1
|
||||
--基础属性
|
||||
if not _BaseProList[num] then
|
||||
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||
end
|
||||
_BaseProList[num]:SetActive(true)
|
||||
_BaseProList[num]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info)
|
||||
local vText = Util.GetGameObject(_BaseProList[num], "curProVale"):GetComponent("Text")
|
||||
-- Util.GetGameObject(vText.gameObject, "homeValue"):GetComponent("Text").text = ""--摘星阁加持文字显示位置
|
||||
if prop[2] > 0 then
|
||||
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])
|
||||
else
|
||||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop[2])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
--礼物显示添加潜能等级
|
||||
if equipConfigData.Position==7 or equipConfigData.Position==8 then
|
||||
if equipConfigData.PotentialNew and #equipConfigData.PotentialNew>0 and type(equipConfigData.PotentialNew[1])~="userdata" then
|
||||
num=num+1
|
||||
if not _BaseProList[num] then
|
||||
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||
end
|
||||
_BaseProList[num]:SetActive(true)
|
||||
Util.GetGameObject(_BaseProList[num], "curProVale").gameObject:SetActive(false)
|
||||
if equipConfigData.Position==7 then
|
||||
_BaseProList[num]:GetComponent("Text").text ="全体英雄潜能等级+"..equipConfigData.PotentialNew[2]
|
||||
elseif equipConfigData.Position==8 then
|
||||
_BaseProList[num]:GetComponent("Text").text = "英雄潜能等级+"..equipConfigData.PotentialNew[2]
|
||||
end
|
||||
end
|
||||
if equipConfigData.HeroGitUp>0 then
|
||||
num=num+1
|
||||
if not _BaseProList[num] then
|
||||
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||
end
|
||||
_BaseProList[num]:SetActive(true)
|
||||
Util.GetGameObject(_BaseProList[num], "curProVale").gameObject:SetActive(false)
|
||||
if equipConfigData.Position==7 then
|
||||
_BaseProList[num]:GetComponent("Text").text =string.format("全体英雄礼物属性+%s%%",equipConfigData.HeroGitUp/100)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- for index, prop in ipairs(equipConfigData.PlayerProperty) do
|
||||
-- LogError("prop[1]=========="..prop[1])
|
||||
-- if tonumber(prop[1]~=nil) then
|
||||
-- local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1])
|
||||
-- if proConfigData then
|
||||
-- num = num + 1
|
||||
-- --基础属性
|
||||
-- if not _BaseProList[num] then
|
||||
-- _BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||
-- end
|
||||
-- _BaseProList[num]:SetActive(true)
|
||||
-- _BaseProList[num]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info)
|
||||
-- local vText = Util.GetGameObject(_BaseProList[num], "curProVale"):GetComponent("Text")
|
||||
-- -- Util.GetGameObject(vText.gameObject, "homeValue"):GetComponent("Text").text = ""--摘星阁加持文字显示位置
|
||||
-- if prop[2] > 0 then
|
||||
-- vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])
|
||||
-- else
|
||||
-- vText.text = GetPropertyFormatStr(proConfigData.Style, prop[2])
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- end
|
||||
if equipConfigData.Quality == 6 then
|
||||
local prop = equipConfigData.PropertyMin
|
||||
local proConfigData = ConfigManager.TryGetConfigData(ConfigName.PropertyConfig, prop[1])
|
||||
if proConfigData then
|
||||
num = num + 1
|
||||
--基础属性
|
||||
if not _BaseProList[num] then
|
||||
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||
end
|
||||
_BaseProList[num]:SetActive(true)
|
||||
_BaseProList[num]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info)
|
||||
local vText = Util.GetGameObject(_BaseProList[num], "curProVale"):GetComponent("Text")
|
||||
-- Util.GetGameObject(vText.gameObject, "homeValue"):GetComponent("Text").text = ""--摘星阁加持文字显示位置
|
||||
if prop[2] > 0 then
|
||||
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2]).."<color=#00ff00>(提升至白金装备解锁)</color>"
|
||||
else
|
||||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop[2]).."<color=#00ff00>(提升至白金装备解锁)</color"
|
||||
end
|
||||
|
||||
if num==2 then
|
||||
_BaseProList[num]:SetActive(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
Util.GetGameObject(self.transform, "Content/bg/proRect"):SetActive(false)
|
||||
self.basePro:SetActive(false)
|
||||
end
|
||||
|
||||
--homePro基础属性
|
||||
if self.equipData.homeEquipLv and self.equipData.homeEquipLv[1] > 0 and self.curHeroData then
|
||||
self.homePro:SetActive(true)
|
||||
for _, pro in ipairs(_homeProList) do
|
||||
pro:SetActive(false)
|
||||
end
|
||||
if equipConfigData.Property then
|
||||
for index, prop in ipairs(equipConfigData.Property) do
|
||||
local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1])
|
||||
if proConfigData and proConfigData.Style == 1 then
|
||||
local num = HomeLandManager.LevelToValue(self.equipData.homeEquipLv,self.equipData.position)
|
||||
local power = math.ceil(prop[2]*(num/10000))
|
||||
if not _homeProList[index] then
|
||||
_homeProList[index] = newObjToParent(self.homeProPre, self.homeProGrid)
|
||||
end
|
||||
_homeProList[index]:SetActive(true)
|
||||
_homeProList[index]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info)
|
||||
local sText = Util.GetGameObject(_homeProList[index], "curProVale"):GetComponent("Text")
|
||||
sText.text = "+"..GetPropertyFormatStr(proConfigData.Style, power)
|
||||
Util.GetGameObject(sText.gameObject, "homeValue"):GetComponent("Text").text = string.format("(%s",num/100).."%)"--摘星阁加持文字显示位置
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
self.homePro:SetActive(false)
|
||||
end
|
||||
|
||||
--suitPro套装属性
|
||||
--获取装备套装属性
|
||||
local equipSuite = {}
|
||||
if self.curHeroData and (self.openType == 2 or self.openType == 5) then
|
||||
equipSuite = HeroManager.GetCurHeroEquipSuitPros(self.curHeroData.equipIdList)
|
||||
end
|
||||
--LogError("equipConfigData.Id======"..equipConfigData.Id)
|
||||
local curProSuitConFig = suitConFig[equipConfigData.Star]
|
||||
if suitConFig[equipConfigData.Star] then
|
||||
|
||||
local suiteValue = curProSuitConFig.SuiteValue
|
||||
if curProSuitConFig and #suiteValue>0 and tonumber(suiteValue[1][1])~=nil then
|
||||
self.suitPro:SetActive(true)
|
||||
for i = 1, math.max(#suiteValue, #_suitProList) do
|
||||
if not _suitProList[i] then
|
||||
_suitProList[i] = newObjToParent(self.suitProPre, self.suitProGrid)
|
||||
end
|
||||
_suitProList[i].gameObject:SetActive(true)
|
||||
end
|
||||
--LogError("suiteValue======================="..#suiteValue)
|
||||
--PrintTable(suiteValue)
|
||||
for i = 1, #suiteValue do
|
||||
_suitProList[i].gameObject:SetActive(true)
|
||||
local name = Util.GetGameObject(_suitProList[i].transform, "proName"):GetComponent("Text")
|
||||
local value = Util.GetGameObject(_suitProList[i].transform, "proVale"):GetComponent("Text")
|
||||
if equipSuite[i] then
|
||||
name.text = string.format("<color=#108C24>%s+ %s</color>",GetLanguageStrById(propertyConfig[equipSuite[i][2][2]].Info),GetPropertyFormatStr(propertyConfig[equipSuite[i][2][2]].Style,equipSuite[i][2][3]))
|
||||
value.text = string.format("<color=#108C24>(%s)</color>",GetEquipSuitStr2(equipSuite[i][1],equipSuite[i][2][1]))
|
||||
else
|
||||
--LogError("[suiteValue[i][2]==="..suiteValue[i][2])
|
||||
--LogError("suiteValue[i][3]=================="..suiteValue[i][3])
|
||||
if suiteValue[i][2] and suiteValue[i][3] then
|
||||
name.text = string.format("<color=#8C6210>%s+ %s</color>",GetLanguageStrById(propertyConfig[suiteValue[i][2]].Info),GetPropertyFormatStr(propertyConfig[suiteValue[i][2]].Style,suiteValue[i][3]))
|
||||
value.text = string.format("<color=#8C6210>(%s)</color>",GetEquipSuitStr2(equipConfigData.Star,suiteValue[i][1]))
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
else
|
||||
self.suitPro:SetActive(false)
|
||||
end
|
||||
else
|
||||
self.suitPro:SetActive(false)
|
||||
end
|
||||
|
||||
--super白金套装属性
|
||||
--获取装备白金套装属性
|
||||
local equipGoldSuite = {}
|
||||
if self.curHeroData and (self.openType == 2 or self.openType == 5) then
|
||||
equipGoldSuite = HeroManager.GetCurHeroBaiJinEquipSuitPros(self.curHeroData.equipIdList)
|
||||
end
|
||||
local curGoldSuitConFig = suitConFig[equipConfigData.Star]
|
||||
for k,v in ipairs(_superProList) do
|
||||
v.gameObject:SetActive(false)
|
||||
end
|
||||
local num = 0
|
||||
if equipConfigData.Quality == 6 then
|
||||
self.superPro:SetActive(false)
|
||||
-- curGoldSuitConFig = suitConFig[18]
|
||||
num = num + 1
|
||||
if not _superProList[num] then
|
||||
_superProList[num] = newObjToParent(self.superProPre, self.superProGrid)
|
||||
end
|
||||
if num==1 then
|
||||
_superProList[num].gameObject:SetActive(false)
|
||||
else
|
||||
_superProList[num].gameObject:SetActive(true)
|
||||
end
|
||||
|
||||
local name = Util.GetGameObject( _superProList[num], "Name"):GetComponent("Text")
|
||||
local value = Util.GetGameObject( _superProList[num], "Name/vale"):GetComponent("Text")
|
||||
name.text = "<color=#00ff00>不朽天赋:(提升至白金装备解锁)</color>"
|
||||
value.text = ""
|
||||
_superProList[num]:GetComponent("Text").enabled = false
|
||||
end
|
||||
if curGoldSuitConFig and curGoldSuitConFig.SuiteSkill~=nil and tonumber(curGoldSuitConFig.SuiteSkill[1][1])~=nil then
|
||||
self.superPro:SetActive(true)
|
||||
if curGoldSuitConFig then
|
||||
local goldSuiteSkill = curGoldSuitConFig.SuiteSkill
|
||||
for i = 1, #goldSuiteSkill do
|
||||
num = num + 1
|
||||
if not _superProList[num] then
|
||||
_superProList[num] = newObjToParent(self.superProPre, self.superProGrid)
|
||||
end
|
||||
_superProList[num].gameObject:SetActive(true)
|
||||
local go = _superProList[num]
|
||||
go.gameObject:SetActive(true)
|
||||
local name = Util.GetGameObject(go.transform, "Name"):GetComponent("Text")
|
||||
local value = Util.GetGameObject(go.transform, "Name/vale"):GetComponent("Text")
|
||||
name.text = string.format("不朽天赋%s:",i)
|
||||
if equipGoldSuite[i] then
|
||||
value.text = string.format("<color=#108C24>(%s)</color>",GetEquipSuitStr(equipGoldSuite[i][1],equipGoldSuite[i][2][1]))
|
||||
go:GetComponent("Text").text = string.format("<color=#108C24>%s</color>",GetLanguageStrById(passiveSkillConfig[equipGoldSuite[i][2][2]].Desc))
|
||||
else
|
||||
value.text = string.format("<color=#8C6210>(%s)</color>",GetEquipSuitStr(curGoldSuitConFig.Id,goldSuiteSkill[i][1]))
|
||||
LogError("goldSuiteSkill[i][2]=="..goldSuiteSkill[i][2])
|
||||
if goldSuiteSkill[i][2] then
|
||||
go:GetComponent("Text").text = string.format("<color=#8C6210>%s</color>",GetLanguageStrById(passiveSkillConfig[goldSuiteSkill[i][2]].Desc))
|
||||
end
|
||||
end
|
||||
go:GetComponent("Text").enabled = true
|
||||
end
|
||||
end
|
||||
else
|
||||
self.superPro:SetActive(false)
|
||||
end
|
||||
|
||||
--获取途径
|
||||
if self.jumpViewList and #self.jumpViewList > 0 then
|
||||
for i = 1,#self.jumpViewList do
|
||||
SubUIManager.Close(self.jumpViewList[i])
|
||||
end
|
||||
end
|
||||
local curitemData = itemConfig[tonumber(self.equipData.id)]
|
||||
if curitemData and curitemData.Jump then
|
||||
if curitemData.Jump and #curitemData.Jump>0 then
|
||||
self.canGetScrollView:SetData(curitemData.Jump,function (index, item)
|
||||
local tempView = nil
|
||||
if self.isShowGo then
|
||||
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, curitemData.Jump[index],true)
|
||||
else
|
||||
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, curitemData.Jump[index],false)
|
||||
end
|
||||
table.insert(self.jumpViewList,tempView)
|
||||
end,true,true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--(此处需要三遍才能完全打开)
|
||||
ForceRebuildLayout(self.midBar.transform)
|
||||
ForceRebuildLayout(self.midBar.transform)
|
||||
ForceRebuildLayout(self.midBar.transform)
|
||||
|
||||
if self.func then
|
||||
self.func()
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function RewardEquipSingleShowPopup2:OnClose()
|
||||
|
||||
for i = 1, #self.jumpViewList do
|
||||
destroy(self.jumpViewList[i].gameObject)
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function RewardEquipSingleShowPopup2:OnDestroy()
|
||||
curSuitProGo = {}
|
||||
self.spLoader:Destroy()
|
||||
_BaseProList = {}
|
||||
_homeProList = {}
|
||||
_suitProList = {}
|
||||
_superProList = {}
|
||||
self.jumpViewList = {}
|
||||
end
|
||||
|
||||
return RewardEquipSingleShowPopup2
|
||||
|
|
@ -27,7 +27,7 @@ function RoleGiftPanel:InitComponent()
|
|||
--this.spLoader = SpriteLoader.New()
|
||||
this.bg2 = Util.GetGameObject(self.transform, "bg2")
|
||||
screenAdapte(this.bg2)
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, {showType = UpViewOpenType.ShowLeft})
|
||||
--this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, {showType = UpViewOpenType.ShowLeft})
|
||||
this.btnBack = Util.GetGameObject(self.transform, "btnBack/btnBack")
|
||||
|
||||
for i = 1, 2 do
|
||||
|
|
|
|||
Loading…
Reference in New Issue