Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
5150fd2edf
File diff suppressed because it is too large
Load Diff
|
@ -2069,6 +2069,7 @@ GENERAL_POPUP_TYPE={
|
|||
YiJingBaoKuConfirm = 31,--易经宝库奖励确认
|
||||
LingShouBaoGe = 33,--灵兽宝阁选择神兽
|
||||
YunYouMan = 34,--云游商人选择装备
|
||||
NewAddWishHero = 45, --新增的心愿神将提示框
|
||||
--大号通用弹窗
|
||||
YiJingBaoKu = 30,--易经宝库
|
||||
YiJingBaoKuRewardPreview = 32,--易经宝库奖励预览
|
||||
|
|
|
@ -222,6 +222,8 @@ CHOICEWISHHEROREQUEST = protobuf.Descriptor();
|
|||
CHOICEWISHHEROREQUEST_INFOLIST_FIELD = protobuf.FieldDescriptor();
|
||||
CHOICEWISHHERORESPONSE = protobuf.Descriptor();
|
||||
CHOICEWISHHERORESPONSE_INFOLIST_FIELD = protobuf.FieldDescriptor();
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD = protobuf.FieldDescriptor();
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD = protobuf.FieldDescriptor();
|
||||
BEAUTYBAGCARDINDICATION = protobuf.Descriptor();
|
||||
BEAUTYBAGCARDINDICATION_INFOLIST_FIELD = protobuf.FieldDescriptor();
|
||||
BEAUTYBAGWISHEQUIPREQUEST = protobuf.Descriptor();
|
||||
|
@ -2198,11 +2200,31 @@ CHOICEWISHHERORESPONSE_INFOLIST_FIELD.message_type = CommonProto_pb.WISHDRAWCARD
|
|||
CHOICEWISHHERORESPONSE_INFOLIST_FIELD.type = 11
|
||||
CHOICEWISHHERORESPONSE_INFOLIST_FIELD.cpp_type = 10
|
||||
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.name = "serverOpenTime"
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.full_name = ".rpc.protocols.choiceWishHeroResponse.serverOpenTime"
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.number = 2
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.index = 1
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.label = 1
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.has_default_value = false
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.default_value = 0
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.type = 5
|
||||
CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD.cpp_type = 1
|
||||
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.name = "heroList"
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.full_name = ".rpc.protocols.choiceWishHeroResponse.heroList"
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.number = 3
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.index = 2
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.label = 3
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.has_default_value = false
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.default_value = {}
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.type = 5
|
||||
CHOICEWISHHERORESPONSE_HEROLIST_FIELD.cpp_type = 1
|
||||
|
||||
CHOICEWISHHERORESPONSE.name = "choiceWishHeroResponse"
|
||||
CHOICEWISHHERORESPONSE.full_name = ".rpc.protocols.choiceWishHeroResponse"
|
||||
CHOICEWISHHERORESPONSE.nested_types = {}
|
||||
CHOICEWISHHERORESPONSE.enum_types = {}
|
||||
CHOICEWISHHERORESPONSE.fields = {CHOICEWISHHERORESPONSE_INFOLIST_FIELD}
|
||||
CHOICEWISHHERORESPONSE.fields = {CHOICEWISHHERORESPONSE_INFOLIST_FIELD, CHOICEWISHHERORESPONSE_SERVEROPENTIME_FIELD, CHOICEWISHHERORESPONSE_HEROLIST_FIELD}
|
||||
CHOICEWISHHERORESPONSE.is_extendable = false
|
||||
CHOICEWISHHERORESPONSE.extensions = {}
|
||||
BEAUTYBAGCARDINDICATION_INFOLIST_FIELD.name = "infoList"
|
||||
|
|
|
@ -5277,12 +5277,14 @@ function NetManager.ChoiceWishHeroRequest(_data,func)
|
|||
end
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.choiceWishHeroRequest, MessageTypeProto_pb.choiceWishHeroResponse, msg, function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = HeroInfoProto_pb.choiceWishHeroResponse()
|
||||
msg:ParseFromString(data)
|
||||
RecruitManager.GetWishCardData(msg.infoList)
|
||||
if func then
|
||||
func(msg)
|
||||
local data = buffer:DataByte()
|
||||
local msg = HeroInfoProto_pb.choiceWishHeroResponse()
|
||||
msg:ParseFromString(data)
|
||||
RecruitManager.GetWishCardData(msg.infoList)
|
||||
RecruitManager.newWishList = msg.heroList--新增的心愿神将list
|
||||
RecruitManager.openTime = msg.serverOpenTime--开服时间戳或是0(用于判断心愿神将是否加入卡池)
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -73,6 +73,8 @@ local contentScripts = {
|
|||
[35] = {view = require("Modules/Popup/View/GeneralPopup_EndlessPanel"), panelName = "GeneralPopup_EndlessPanel",type=GENERAL_POPUP_TYPE.WuJinSetting},
|
||||
--up魂印
|
||||
[36] = {view = require("Modules/Popup/View/GeneralPopup_ChooseUpSoul"), panelName = "GeneralPopup_ChooseUpSoul",type=GENERAL_POPUP_TYPE.ChooseUpSoul},
|
||||
--新增的心愿神将提示框
|
||||
[37] = {view = require("Modules/Popup/View/GeneralPopup_NewAddWishHero"), panelName = "GeneralPopup_NewAddWishHero",type=GENERAL_POPUP_TYPE.NewAddWishHero},
|
||||
|
||||
}
|
||||
--子模块预设
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
----- 送神弹窗 -----
|
||||
local this = {}
|
||||
--传入父脚本模块
|
||||
local parent
|
||||
--传入特效层级
|
||||
local sortingOrder=0
|
||||
local args=nil
|
||||
local currHeroId=0
|
||||
local heroConfig=ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||
function this:InitComponent(gameObject)
|
||||
this.spLoader = SpriteLoader.New()
|
||||
this.confirmBtn=Util.GetGameObject(gameObject,"ConfirmBtn")
|
||||
this.prefab=Util.GetGameObject(gameObject,"item")
|
||||
--滚动条根节点
|
||||
this.root = Util.GetGameObject(gameObject, "Root")
|
||||
this.preList={}
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(this.confirmBtn,function()
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
end
|
||||
|
||||
function this:OnShow(_parent)
|
||||
parent=_parent
|
||||
sortingOrder =_parent.sortingOrder
|
||||
local heroDatas = RecruitManager.newWishList
|
||||
for i = 1, math.max(#this.preList,#heroDatas) do
|
||||
local item=this.preList[i]
|
||||
if not item then
|
||||
item=newObject(this.prefab)
|
||||
item.transform:SetParent(this.root.transform)
|
||||
item.transform.localScale=Vector3.one
|
||||
item.transform.localPosition=Vector3.zero
|
||||
this.preList[i]=item
|
||||
end
|
||||
item.gameObject:SetActive(false)
|
||||
LogRed("heroDatas[i]:"..tostring(heroDatas[i]))
|
||||
this.SingleHeroDataShow(item,heroConfig[heroDatas[i]])
|
||||
end
|
||||
end
|
||||
|
||||
--英雄单个数据展示
|
||||
function this.SingleHeroDataShow(go,_heroData)
|
||||
local heroData = _heroData
|
||||
local _go = go
|
||||
_go.gameObject:SetActive(true)
|
||||
Util.GetGameObject(_go.transform, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.Quality,heroData.Star))
|
||||
Util.GetGameObject(_go.transform, "Text"):GetComponent("Text").text = SubString2(GetLanguageStrById(heroData.ReadingName),8)
|
||||
Util.GetGameObject(_go.transform, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(artResourcesConfig[_heroData.Icon].Name)
|
||||
Util.GetGameObject(_go.transform, "posIcon"):SetActive(false)
|
||||
Util.GetGameObject(_go.transform, "proIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName))
|
||||
local starGrid = Util.GetGameObject(_go.transform, "star")
|
||||
if _heroData.Id==currHeroId then
|
||||
this.selectObj.transform:SetParent(_go.transform)
|
||||
this.selectObj.transform.localScale=Vector3.one
|
||||
this.selectObj.transform.localPosition=Vector3.New(0,30,0)
|
||||
end
|
||||
SetHeroStars(this.spLoader, starGrid, heroData.Star,1,nil,-15)
|
||||
local cardclickBtn = Util.GetGameObject(_go.transform, "icon")
|
||||
Util.AddOnceClick(cardclickBtn, function()
|
||||
this.selectObj.transform:SetParent(_go.transform)
|
||||
this.selectObj.transform.localScale=Vector3.one
|
||||
this.selectObj.transform.localPosition=Vector3.New(0,30,0)
|
||||
currHeroId=_heroData.Id
|
||||
end)
|
||||
Util.AddLongPressClick(cardclickBtn, function()
|
||||
UIManager.OpenPanel(UIName.RoleGetInfoPopup, false, heroData.Id, heroData.Star)
|
||||
end, 0.5)
|
||||
end
|
||||
|
||||
|
||||
function this:OnClose()
|
||||
currHeroId=0
|
||||
args=nil
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
end
|
||||
|
||||
return this
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4a0225cb7f8d89c48aa4a4c022d21c45
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -36,6 +36,8 @@ function this.Initialize()
|
|||
this.isFirstEnterElementScroll=true
|
||||
this.isFirstEnterHeroScroll=true
|
||||
this.InitPreData()
|
||||
this.newWishList = {}--心愿抽新增的神将
|
||||
this.openTime = 0--开服时间戳或是0(用于判断心愿神将是否加入卡池)
|
||||
end
|
||||
--请求抽卡 1抽卡类型 2回调 3特权id
|
||||
function this.RecruitRequest(recruitType, func, privilegeId,_itemId,_itemNum)
|
||||
|
@ -496,8 +498,9 @@ end
|
|||
|
||||
function this.GetCurHeroList(curIndex)
|
||||
local heroList = {}
|
||||
local time = (GetTimeStamp() - RecruitManager.openTime)/(60*60*24)--开服时间戳或是0(用于判断心愿神将是否加入卡池)
|
||||
for index, v in ipairs(RecruitManager.GetRewardPreviewData(PRE_REWARD_POOL_TYPE.RECRUIT)) do
|
||||
if heroConfig[v.Reward[1]].Star == 5 and heroConfig[v.Reward[1]].PropertyName == curIndex and heroConfig[v.Reward[1]].Weight > 0 then
|
||||
if heroConfig[v.Reward[1]].Star == 5 and heroConfig[v.Reward[1]].PropertyName == curIndex and heroConfig[v.Reward[1]].Weight > 0 and time > heroConfig[v.Reward[1]].JoinWishDay then
|
||||
table.insert(heroList,v)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -186,17 +186,17 @@ function RecruitPanelNew:UpdataWishPanel()
|
|||
self.wish.gameObject:SetActive(true)
|
||||
--如果没有达到150抽按钮置灰
|
||||
local data = tonumber(specialConfig[119].Value)
|
||||
if RecruitManager.drawTimes[1] then
|
||||
if RecruitManager.drawTimes[1] < data then
|
||||
self.wishNoOpen.gameObject:SetActive(true)
|
||||
self.wishOpen.gameObject:SetActive(false)
|
||||
Util.SetGray(self.wishBtn,true)
|
||||
self.wishText.text = string.format("%s/%s",RecruitManager.drawTimes[1],data)
|
||||
self.wishTipIma.text = "开启心愿功能,将有更高概率获得心愿神将~"
|
||||
else
|
||||
self.wishNoOpen.gameObject:SetActive(false)
|
||||
self.wishOpen.gameObject:SetActive(true)
|
||||
NetManager.ChoiceWishHeroRequest(nil,function ()
|
||||
NetManager.ChoiceWishHeroRequest(nil,function ()
|
||||
if RecruitManager.drawTimes[1] then
|
||||
if RecruitManager.drawTimes[1] < data then
|
||||
self.wishNoOpen.gameObject:SetActive(true)
|
||||
self.wishOpen.gameObject:SetActive(false)
|
||||
Util.SetGray(self.wishBtn,true)
|
||||
self.wishText.text = string.format("%s/%s",RecruitManager.drawTimes[1],data)
|
||||
self.wishTipIma.text = "开启心愿功能,将有更高概率获得心愿神将~"
|
||||
else
|
||||
self.wishNoOpen.gameObject:SetActive(false)
|
||||
self.wishOpen.gameObject:SetActive(true)
|
||||
for i = 1,3 do
|
||||
local data = RecruitManager.WishCardData[i]
|
||||
local id = data.heroTid
|
||||
|
@ -224,16 +224,17 @@ function RecruitPanelNew:UpdataWishPanel()
|
|||
PopupTipPanel.ShowTip(string.format("%s次神将召唤后,开启心愿抽卡!",tempdata))
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
else
|
||||
self.wishNoOpen.gameObject:SetActive(true)
|
||||
self.wishOpen.gameObject:SetActive(false)
|
||||
Util.SetGray(self.wishBtn,true)
|
||||
self.wishText.text = string.format("%s/%s",0,data)
|
||||
self.wishTipIma.text = "开启心愿功能,将有更高概率获得心愿神将~"
|
||||
end
|
||||
else
|
||||
self.wishNoOpen.gameObject:SetActive(true)
|
||||
self.wishOpen.gameObject:SetActive(false)
|
||||
Util.SetGray(self.wishBtn,true)
|
||||
self.wishText.text = string.format("%s/%s",0,data)
|
||||
self.wishTipIma.text = "开启心愿功能,将有更高概率获得心愿神将~"
|
||||
end
|
||||
self:CheckNewWishHero()
|
||||
end)
|
||||
|
||||
self.tenTip:SetActive(true)
|
||||
if RecruitManager.isTenRecruit == 0 then
|
||||
|
@ -376,4 +377,12 @@ function RecruitPanelNew:TimeCountDown()
|
|||
end, 1, -1, true)
|
||||
self.timer:Start()
|
||||
end
|
||||
|
||||
--检查是否有新开放的心愿英雄
|
||||
function RecruitPanelNew:CheckNewWishHero()
|
||||
if #RecruitManager.newWishList > 0 then
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.NewAddWishHero)
|
||||
end
|
||||
end
|
||||
|
||||
return RecruitPanelNew
|
Loading…
Reference in New Issue