Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

dev_chengFeng
zhangqiang 2020-08-22 20:25:28 +08:00
commit fe00d8726a
13 changed files with 81 additions and 77 deletions

View File

@ -120,23 +120,26 @@ function this.PatFaceSpecialMonitor(v,patFaceAllData,type,starUpGiftNum)
end end
elseif v.Type == 5 then--星级成长礼特殊处理 elseif v.Type == 5 then--星级成长礼特殊处理
if starUpGiftNum then if starUpGiftNum then
--Log("星级成长礼特殊处理 starUpGiftNum == v.Star "..starUpGiftNum .." ".. v.Star) Log("星级成长礼特殊处理 starUpGiftNum == v.Star "..starUpGiftNum .." ".. v.Star)
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceHaveGrowGift)--激活一次发一个 --Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceHaveGrowGift)--激活一次发一个
if starUpGiftNum == v.Star then if starUpGiftNum >= v.Star then
local conFigData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, v.ShopId) -- local conFigData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, v.ShopId)
if conFigData == nil then return end -- if conFigData == nil then return end
local shopItemData = OperatingManager.GetGiftGoodsInfo(conFigData.Type,v.ShopId) -- local shopItemData = OperatingManager.GetGiftGoodsInfo(conFigData.Type,v.ShopId)
--shopItemData.startTime 大于零代表第一次开 需要拍脸 下次未购买并在时间内再次获得 shopItemData.startTime为零 -- --shopItemData.startTime 大于零代表第一次开 需要拍脸 下次未购买并在时间内再次获得 shopItemData.startTime为零
--shopItemData.buyTimes <= 0 今天没有购买才会弹 -- --shopItemData.buyTimes <= 0 今天没有购买才会弹
--if shopItemData then -- --if shopItemData then
-- Log(" PatFaceManager startTime buyTimes "..shopItemData.startTime.." "..shopItemData.buyTimes) -- -- Log(" PatFaceManager startTime buyTimes "..shopItemData.startTime.." "..shopItemData.buyTimes)
--else -- --else
-- Log("shopItemData 为nil") -- -- Log("shopItemData 为nil")
--end -- --end
if shopItemData and shopItemData.startTime > 0 and shopItemData.buyTimes <= 0 and type == 2 then -- if shopItemData and shopItemData.startTime > 0 and shopItemData.buyTimes <= 0 and type == 2 then
if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸 -- if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸
table.insert(patFaceAllData,v) -- table.insert(patFaceAllData,v)
end -- end
-- end
if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸
table.insert(patFaceAllData,v)
end end
end end
end end

View File

@ -123,7 +123,7 @@ function PatFacePanel:OnShowPatFaceData()
self.obg2:SetActive(patFaceSingleData.Type == FacePanelType.Tesc) self.obg2:SetActive(patFaceSingleData.Type == FacePanelType.Tesc)
self.obg3:SetActive(patFaceSingleData.Type == FacePanelType.GuildFight or patFaceSingleData.Type == FacePanelType.Championship) self.obg3:SetActive(patFaceSingleData.Type == FacePanelType.GuildFight or patFaceSingleData.Type == FacePanelType.Championship)
self.obg4:SetActive(patFaceSingleData.Type == FacePanelType.SupremeHero) self.obg4:SetActive(patFaceSingleData.Type == FacePanelType.SupremeHero)
self.obg5:SetActive(patFaceSingleData.Type == FacePanelType.GrowGift) self.obg5:SetActive(false)
self.obg6:SetActive(patFaceSingleData.Type == FacePanelType.FindFairy) self.obg6:SetActive(patFaceSingleData.Type == FacePanelType.FindFairy)
self.obg7:SetActive(patFaceSingleData.Type == FacePanelType.UpgradePac) self.obg7:SetActive(patFaceSingleData.Type == FacePanelType.UpgradePac)
if patFaceSingleData.Type == FacePanelType.Sbtj then if patFaceSingleData.Type == FacePanelType.Sbtj then
@ -143,6 +143,8 @@ function PatFacePanel:OnShowPatFaceData()
self:OnShowOb6Data() self:OnShowOb6Data()
elseif patFaceSingleData.Type == FacePanelType.UpgradePac then elseif patFaceSingleData.Type == FacePanelType.UpgradePac then
self:OnShowOb7Data() self:OnShowOb7Data()
elseif patFaceSingleData.Type == FacePanelType.GrowGift then
self:OnShowOb8Data()
end end
end end
end end
@ -311,31 +313,11 @@ end
--第五种显示 五星成长礼 --第五种显示 五星成长礼
local timeOb5 local timeOb5
function PatFacePanel:OnShowOb5Data() function PatFacePanel:OnShowOb5Data()
self.obg5infoText.text = patFaceSingleData.Desc if OperatingManager.IsShowFiveStarPatch then
Util.AddOnceClick(self.obg5goJumpBtn, function() OperatingManager.upGradePackagePanelType = 2
self:JumpBtnClickEvent() UIManager.OpenPanel(UIName.UpGradePackagePanel,function() self:ClosePanel() end)
end) OperatingManager.IsShowFiveStarPatch = false
Util.AddOnceClick(self.obg5cancelBtn, function()
self:ClosePanel()
end)
local timeDownNum = 5
self.obg5cancelBtnText.text = Language[10552]..timeDownNum..")"
if timeOb5 then
timeOb5:Stop()
timeOb5 = nil
end end
timeOb5 = Timer.New(function()
self.obg5cancelBtnText.text = Language[10552]..timeDownNum..")"
if timeDownNum < 0 then
self:ClosePanel()
if timeOb5 then
timeOb5:Stop()
timeOb5 = nil
end
end
timeDownNum = timeDownNum - 1
end, 1, -1, true)
timeOb5:Start()
end end
function PatFacePanel:OnShowOb6Data() function PatFacePanel:OnShowOb6Data()
patFaceFindFairy.OnShow(self,patFaceSingleData) patFaceFindFairy.OnShow(self,patFaceSingleData)
@ -349,6 +331,7 @@ function PatFacePanel:OnShowOb7Data()
OperatingManager.upGradePackagePanelType = 1 OperatingManager.upGradePackagePanelType = 1
UIManager.OpenPanel(UIName.UpGradePackagePanel,function() self:ClosePanel() end) UIManager.OpenPanel(UIName.UpGradePackagePanel,function() self:ClosePanel() end)
end end
function PatFacePanel:JumpBtnClickEvent() function PatFacePanel:JumpBtnClickEvent()
if openPanle then if openPanle then
openPanle.patFaceCallList:Clear() openPanle.patFaceCallList:Clear()

View File

@ -2071,7 +2071,8 @@ function this.GetCurHeroSidAndCurStarAllSkillDatas(sid, star)
end end
function this.DetectionOpenFiveStarActivity(starUpGiftNum) function this.DetectionOpenFiveStarActivity(starUpGiftNum)
Log(" ---- GameEvent.PatFace.PatFaceSend,14 ") Log(" ---- GameEvent.PatFace.PatFaceSend,14 ")
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, starUpGiftNum) PlayerManager.IsGetFiveStarHero = true
end end
-- 判断英雄是否有魂印功能 -- 判断英雄是否有魂印功能

View File

@ -1062,6 +1062,10 @@ function this:OnShow()
-- UIManager.ClosePanel(UIName.RewardItemSingleShowPopup) -- UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
--end --end
CheckRedPointStatus(RedPointType.RankingSort) CheckRedPointStatus(RedPointType.RankingSort)
if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5)
PlayerManager.IsGetFiveStarHero = false
end
end end

View File

@ -63,9 +63,9 @@ function this:AddListener()
end end
function this:RemoveListener() function this:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.BuyQinglongSerectLevelSuccess, this.refresh) Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.BuyQinglongSerectLevelSuccess)
Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess, this.refresh) Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess)
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityOpenOrClose,this.Closefunction) Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityOpenOrClose)
end end
this.Closefunction = function() this.Closefunction = function()
Timer.New(function() Timer.New(function()

View File

@ -181,9 +181,6 @@ function this:SingleTask(go, rewardSingleData)
local text = Util.GetGameObject(lingquButton.gameObject, "Text") :GetComponent("Text") local text = Util.GetGameObject(lingquButton.gameObject, "Text") :GetComponent("Text")
lingquButton:GetComponent("Image").sprite = Util.LoadSprite(type[state].sprite) lingquButton:GetComponent("Image").sprite = Util.LoadSprite(type[state].sprite)
text.text = type[state].text text.text = type[state].text
if state == 1 then
text.text = sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name
end
Util.AddOnceClick(lingquButton, function() Util.AddOnceClick(lingquButton, function()
if state == 1 then if state == 1 then
NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg) NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg)

View File

@ -2,7 +2,7 @@ QinglongSerectTreasureManager = {}
local this = QinglongSerectTreasureManager local this = QinglongSerectTreasureManager
local TreasureSunlongConfig = ConfigManager.GetConfig(ConfigName.TreasureSunlongConfig) local TreasureSunlongConfig = ConfigManager.GetConfig(ConfigName.TreasureSunlongConfig)
local TreasureSunLongTaskConfig = ConfigManager.GetConfig(ConfigName.TreasureSunLongTaskConfig) local TreasureSunLongTaskConfig = ConfigManager.GetConfig(ConfigName.TreasureSunLongTaskConfig)
local rewardData = {}--表内活动任务数据 this.rewardData = {}--表内活动任务数据
local taskData = {} local taskData = {}
this.scoreId = 0 this.scoreId = 0
this.score = 0 this.score = 0
@ -14,19 +14,19 @@ function this.Initialize()
end end
function this.InitializeData() function this.InitializeData()
rewardData = {} this.rewardData = {}
taskData = {} taskData = {}
this.scoreId = TreasureSunlongConfig[1].Integral[1][1] this.scoreId = TreasureSunlongConfig[1].Integral[1][1]
for i, v in ConfigPairs(TreasureSunlongConfig) do for i, v in ConfigPairs(TreasureSunlongConfig) do
rewardData[v.Level] = {} this.rewardData[v.Level] = {}
rewardData[v.Level].level = v.Level this.rewardData[v.Level].level = v.Level
rewardData[v.Level].activityId = v.ActivityId this.rewardData[v.Level].activityId = v.ActivityId
if v.Integral then if v.Integral then
rewardData[v.Level].needScore = v.Integral[1][2] this.rewardData[v.Level].needScore = v.Integral[1][2]
else else
rewardData[v.Level].needScore = 0 this.rewardData[v.Level].needScore = 0
end end
rewardData[v.Level].Reward = {} this.rewardData[v.Level].Reward = {}
local temp = {} local temp = {}
if v.Reward then if v.Reward then
for n,m in ipairs(v.Reward) do for n,m in ipairs(v.Reward) do
@ -38,7 +38,7 @@ function this.InitializeData()
table.insert(temp,{ type = 2,item = { m[1] , m[2] } }) table.insert(temp,{ type = 2,item = { m[1] , m[2] } })
end end
end end
rewardData[v.Level].Reward = temp this.rewardData[v.Level].Reward = temp
end end
for i, v in ConfigPairs(TreasureSunLongTaskConfig) do for i, v in ConfigPairs(TreasureSunLongTaskConfig) do
if not taskData[v.Type] then if not taskData[v.Type] then
@ -56,27 +56,37 @@ end
function this.UpdateTreasureState() function this.UpdateTreasureState()
local level = this.GetLevel() local level = this.GetLevel()
for k,v in pairs(rewardData) do for k,v in pairs(this.rewardData) do
if level > k then if level < k then
v.state = -2 v.state = -2
else
v.state = 0
end end
end end
this.activityId = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.TreasureOfSomeBody) this.activityId = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.TreasureOfSomeBody)
local TreasureRewardState = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.TreasureOfSomeBody) local TreasureRewardState = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.TreasureOfSomeBody)
if TreasureRewardState and TreasureRewardState.mission then if TreasureRewardState and TreasureRewardState.mission then
--state -2 未达成 -1 普通和额外全部领取 0未领取 1激活秘宝可以再次领取 --state -2 未达成 -1 普通和额外全部领取 0未领取 1激活秘宝可以再次领取
for k,v in ipairs(TreasureRewardState.mission) do for k,v in ipairs(TreasureRewardState.mission) do
if v and level >= v.missionId then if v and level >= v.missionId then
rewardData[v.missionId].state = v.state this.rewardData[v.missionId].state = v.state
else else
rewardData[v.missionId].state = -2 this.rewardData[v.missionId].state = -2
end end
end end
end end
end end
function this.UpdateTreasureState2()
local level = this.GetLevel()
for k,v in pairs(this.rewardData) do
if level < k then
v.state = -2
elseif v.state == -2 then
v.state = 0
end
end
end
function this.UpdateTrailWeekTime(msg) function this.UpdateTrailWeekTime(msg)
LogRed("msg.weekTime:"..msg.weekTime) LogRed("msg.weekTime:"..msg.weekTime)
this.traiWeekTime = msg.weekTime this.traiWeekTime = msg.weekTime
@ -114,12 +124,13 @@ function this.GetScore()
end end
function this.SetSingleRewardState(id,state) function this.SetSingleRewardState(id,state)
rewardData[id].state = state this.rewardData[id].state = state
LogBlue("SetSingleRewardState:id:"..id.." state:"..state)
end end
function this.GetAllRewardData() function this.GetAllRewardData()
local temp ={} local temp ={}
for i, v in pairs(rewardData) do for i, v in pairs(this.rewardData) do
if i ~= 0 and v.activityId == this.activityId then if i ~= 0 and v.activityId == this.activityId then
table.insert(temp,v) table.insert(temp,v)
end end
@ -128,7 +139,7 @@ function this.GetAllRewardData()
end end
function this.GetRewardData(lv) function this.GetRewardData(lv)
return rewardData[lv] return this.rewardData[lv]
end end
function this.SetLevel(_level) function this.SetLevel(_level)
@ -159,7 +170,7 @@ function this.GetQinglongSerectTreasureRedPot()
return false return false
end end
local state = this.GetTreasureState() local state = this.GetTreasureState()
for i, v in pairs(rewardData) do for i, v in pairs(this.rewardData) do
if i ~= 0 then if i ~= 0 then
if v.state == 0 or (v.state == 1 and state > 0) then if v.state == 0 or (v.state == 1 and state > 0) then
return true return true

View File

@ -642,7 +642,7 @@ function this.RefreshTreasureLevel(buffer)
msg:ParseFromString(data) msg:ParseFromString(data)
LogGreen("青龙秘宝等级更新了:"..msg.level) LogGreen("青龙秘宝等级更新了:"..msg.level)
QinglongSerectTreasureManager.SetLevel(msg.level) QinglongSerectTreasureManager.SetLevel(msg.level)
QinglongSerectTreasureManager.UpdateTreasureState() QinglongSerectTreasureManager.UpdateTreasureState2()
end end
--幸运转盘 --幸运转盘

View File

@ -20,6 +20,7 @@ local giftGoodsInfo
this.upGradePackagePanelType = 1 this.upGradePackagePanelType = 1
this.upGradePackagePanelIndex = 1 this.upGradePackagePanelIndex = 1
this.IsShowFiveStarPatch = true
--初始化 --初始化
function this.Initialize() function this.Initialize()
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, function() Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, function()

View File

@ -24,7 +24,7 @@ this.heroHandBookListData={}
--移动速度 和 视野范围 --移动速度 和 视野范围
this.MapSpeed = 0 this.MapSpeed = 0
this.MapView = 0 this.MapView = 0
this.IsGetFiveStarHero = false
local update = function() local update = function()
local dt = Time.unscaledDeltaTime local dt = Time.unscaledDeltaTime
this.serverTime = this.serverTime + dt this.serverTime = this.serverTime + dt

View File

@ -61,7 +61,7 @@ function this:OnShow(_parent,...)
rewardData = QinglongSerectTreasureManager.GetAllRewardData() rewardData = QinglongSerectTreasureManager.GetAllRewardData()
this:showRewardQinglong() this:showRewardQinglong()
end end
this.tip.text = "<color=#60A22C>解锁高阶战令,激活进阶</color><color=#95523B>专属奖励+直升15级</color><color=#60A22C>解锁立获限定称号+限定气泡</color>" this.tip.text = "<color=#60A22C>解锁高阶战令,激活进阶</color><color=#95523B>专属奖励+直升15级</color>"
end end
--充值成功 --充值成功

View File

@ -74,7 +74,8 @@ function TenRecruitPanel:OnOpen(...)
for i = 1, #_roleDatas do for i = 1, #_roleDatas do
cardList[i]:OnOpen(_roleDatas[i].id,false,false,-1,self.sortingOrder) cardList[i]:OnOpen(_roleDatas[i].id,false,false,-1,self.sortingOrder)
local heorConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig,_roleDatas[i].heroId) local heorConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig,_roleDatas[i].heroId)
if heorConfig and heorConfig.Quality == 5 and heorConfig.Natural >= 13 then LogBlue("heorConfig.Star:"..heorConfig.Star)
if heorConfig and heorConfig.Star >= 5 then
HeroManager.DetectionOpenFiveStarActivity(heorConfig.Star) HeroManager.DetectionOpenFiveStarActivity(heorConfig.Star)
end end
end end

View File

@ -15,8 +15,8 @@ local curType
local fun--回调 local fun--回调
local rechargeData local rechargeData
local activityType = { local activityType = {
[1] = {name = "等级礼包",timePos = Vector3.New(0,-255.6,0),price = true,comp = "bg1",showType = 21}, [1] = {name = "等级礼包",timePos = Vector3.New(0,-255.6,0),comp = "bg1",showType = 21},
[2] = {name = "五星成长礼",timePos = Vector3.New(0,-567,0),price = false,comp = "bg2",showType = 8}, [2] = {name = "五星成长礼",timePos = Vector3.New(0,-567,0),comp = "bg2",showType = 8},
} }
--初始化组件(用于子类重写) --初始化组件(用于子类重写)
function this:InitComponent() function this:InitComponent()
@ -187,6 +187,9 @@ end
--设置奖励 --设置奖励
local _ItemViewList = {} local _ItemViewList = {}
function this:SetGfitShow(rechargeData) function this:SetGfitShow(rechargeData)
for k,v in pairs(_ItemViewList) do
v.gameObject:SetActive(false)
end
for i=1, #RechargeConfig[curGiftId].RewardShow do for i=1, #RechargeConfig[curGiftId].RewardShow do
if not _ItemViewList[i] then if not _ItemViewList[i] then
local view = SubUIManager.Open(SubUIConfig.ItemView,this.grid.transform) local view = SubUIManager.Open(SubUIConfig.ItemView,this.grid.transform)
@ -197,7 +200,7 @@ function this:SetGfitShow(rechargeData)
end end
this.times.text = Language[10535]..rechargeData.dynamicBuyTimes..Language[10054] this.times.text = Language[10535]..rechargeData.dynamicBuyTimes..Language[10054]
this.price.text = RechargeConfig[curGiftId].Price..Language[10538] this.price.text = RechargeConfig[curGiftId].Price..Language[10538]
this.oriPrice.gameObject:SetActive(activityType[curType].price) --this.oriPrice.gameObject:SetActive(activityType[curType].price)
end end
--设置剩余时间,取剩余时间最短的礼包 --设置剩余时间,取剩余时间最短的礼包