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

ZhangBiao 2020-09-09 17:25:33 +08:00
commit ac87815d64
7 changed files with 53 additions and 17 deletions

View File

@ -93,9 +93,12 @@ end
--添加事件监听(用于子类重写)
function DynamicActivityPanel:AddListener()
end
--移除事件监听(用于子类重写)
function DynamicActivityPanel:RemoveListener()
end
--界面打开时调用(用于子类重写)

View File

@ -1,6 +1,6 @@
local QianKunBox = quick_class("QianKunBox")
local ActivityDetail = require("Modules/DynamicActivity/ActivityDetail")--活动详情
local parent
local iconsData = nil
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
@ -98,8 +98,8 @@ function QianKunBox:BindEvent()
end)
end
function QianKunBox:OnShow(sortingOrder)
function QianKunBox:OnShow(sortingOrder,_parent)
parent = _parent
Util.AddParticleSortLayer(self.effect, sortingOrder - orginLayer)
orginLayer = sortingOrder
activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.QianKunBox)
@ -251,6 +251,12 @@ function QianKunBox:timeCountDown()
self.timer = Timer.New(function()
self.leftUpTime.text = self:TimeToDHMS(self.shopData.endTime - PlayerManager.serverTime)
self.btnTime.text = TimeToHMS(timeDown)
if timeDown < 1 then
self.timer:Stop()
self.timer = nil
parent:ClosePanel()
return
end
timeDown = timeDown -1
end, 1, -1, true)
self.timer:Start()

View File

@ -8,7 +8,7 @@ local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local heroConfig=ConfigManager.GetConfig(ConfigName.HeroConfig)
local parent
local activityId = 0
local singleRecruit = nil
local tenRecruit = nil
@ -110,7 +110,8 @@ function TimeLimitedCall:BindEvent()
end)
end
function TimeLimitedCall:OnShow(_sortingOrder)
function TimeLimitedCall:OnShow(_sortingOrder,_parent)
parent = _parent
sortingOrder = _sortingOrder
self.gameObject:SetActive(true)
@ -361,6 +362,7 @@ function TimeLimitedCall:TimeCountDown()
if timeDown < 1 then
self.timer:Stop()
self.timer = nil
parent:ClosePanel()
return
end
timeDown = timeDown - 1

View File

@ -11,7 +11,7 @@ local this = MainPanel
-- [GUILD_FIGHT_STAGE.MATCHING] = "r_zjm_zhanpzz",
-- [GUILD_FIGHT_STAGE.COUNTING] = "r_zjm_zhanjjz",
-- }
local GlobalActConfig = ConfigManager.GetConfig(ConfigName.GlobalActivity)
--示意图轮回放
local imageList = {}
-- 主界面需要隐藏的功能
@ -47,6 +47,12 @@ local lightList = {
[2] = { -1367, -950 },
[3] = { -2447, -2397 },
}
local mainDynamicActivityIcon = {
[1] = "r_zjm_huodongicon-pozhenzhuxian", --破阵诛仙
[2] = "r_zjm_huodongicon-yongguansanjun", -- 勇冠三军
[3] = "r_zjm_huodongicon-pozhenzhuxian", --叱咤风云
}
function this:AddFuncItem(btnGO, pos)
return {go = btnGO, open = Util.GetGameObject(btnGO, "open"), lock = Util.GetGameObject(btnGO, "lock"), pos = pos}
end
@ -55,6 +61,7 @@ function this:InsertNewText(btn)
local xinText = Util.GetGameObject(btn, "new")
return xinText
end
local isRefeshIcon = true
--初始化组件(用于子类重写)
function this:InitComponent()
orginLayer = 0
@ -164,6 +171,7 @@ function this:InitComponent()
--东海寻仙
this.findFairyBtn=Util.GetGameObject(self.gameObject,"RightUp/findFairy")
this.findFairyRedPoint = Util.GetGameObject(this.findFairyBtn, "redPoint")
this.findFairyBtn:SetActive(false)
--幸运转盘
this.luckyTurnBtn=Util.GetGameObject(self.gameObject,"RightUp/luckyTurn")
@ -400,7 +408,6 @@ function this:InitComponent()
--this.horseRaceLamp = Util.GetGameObject(self.gameObject, "horseRaceLamp")
--this.titleInfo = Util.GetGameObject(self.gameObject, "horseRaceLamp/bgImage/mask/titleInfo")
--this.horseMask = Util.GetGameObject(self.gameObject, "horseRaceLamp/bgImage/mask")
this.animRoot = Util.GetGameObject(self.gameObject, "scene")
this.btnSupreme = Util.GetGameObject(self.gameObject, "RightUp/supreme")
@ -1007,7 +1014,7 @@ end
--界面打开时调用(用于子类重写)
function this:OnShow()
isRefeshIcon = true
this.vipLevelText.sprite = VipManager.SetVipLevelImg()
timePressStarted = Time.realtimeSinceStartup
SoundManager.PlayMusic(SoundConfig.BGM_Main)
@ -1372,9 +1379,14 @@ function this.TimeFormat()
end
--轮转活动,乾坤宝盒
local dynamicAct = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FindFairy)
local dynamicAct = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct)
if dynamicAct then
local info = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FindFairy)
if isRefeshIcon then
local curindex = GlobalActConfig[dynamicAct].ShowArt
Util.GetGameObject(this.btnDynamicActivity,"Image"):GetComponent("Image").sprite = Util.LoadSprite(mainDynamicActivityIcon[curindex])
isRefeshIcon = false
end
local info = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.DynamicAct)
local tempTime = info.endTime - PlayerManager.serverTime
if tempTime>= 86400 then
this.DynamicActivityTime.text = TimeToDH(tempTime)
@ -1382,7 +1394,7 @@ function this.TimeFormat()
this.DynamicActivityTime.text = TimeToHMS(tempTime)
end
else
this.btnDynamicActivity.gameObject:SetActive(false)
this.btnDynamicActivity:SetActive(false)
end
--青龙秘宝
local QingLong = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.TreasureOfSomeBody)
@ -1590,14 +1602,16 @@ function this.RefreshActivityBtn(context)
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.SupremeHero) then
this.btnSupreme:SetActive(ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.SupremeHero) > 0 and ActivityGiftManager.GetRewardState(42)~=3)
end
elseif context.type==ActivityTypeDef.FindFairy then
this.findFairyBtn:SetActive(false)--not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FindFairy))
elseif context.type==ActivityTypeDef.DynamicAct then
isRefeshIcon = true
LogBlue("11111111111111111111111111111111111111111")
this.btnDynamicActivity:SetActive(not not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct))
end
if ActTimeCtrlManager.IsQualifiled(42) then
this.expert:SetActive(ActivityGiftManager.GetExpertActiveisOpen() > 0)
end
isRefeshIcon = true
end
--客户端自己Show刷新
function this.RefreshActivityShow()

View File

@ -130,6 +130,7 @@ function this.RefreshActivityList(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.ActivityUpateIndication()
msg:ParseFromString(data)
LogYellow("刷新活动的的indication来了")
ActivityGiftManager.RefreshActivityData(msg)
Game.GlobalEvent:DispatchEvent(GameEvent.FunctionCtrl.OnFunctionOpen)
end

View File

@ -765,12 +765,21 @@ function this.InitDynamicActData()
local data = {}
data.id = allMissionData[j].missionId
data.progress = allMissionData[j].progress
data.state = allMissionData[j].state
data.type = allListData[i].Type
local strs = string.split(allListData[i].Show,"#")
data.title = strs[1]
data.content = strs[2]
data.value = allListData[i].TaskValue[2][1]
data.state = allMissionData[j].state
-- if allMissionData[j].state == 2 then
-- data.state = allMissionData[j].state
-- else
-- if data.progress >= data.value then
-- data.state = 1
-- else
-- data.state = 0
-- end
-- end
data.type = allListData[i].Type
data.reward = {allListData[i].Integral[1][1],allListData[i].Integral[1][2]}
data.jump = allListData[i].Jump[1]
table.insert(this.allData,data)

View File

@ -212,6 +212,7 @@ function this.GetActivityPreviewData(type)
end
local data = nil
if curActivityId ~= nil then --活动招募
LogGreen("curActivityId:"..curActivityId)
data = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LotterySetting,"ActivityId",curActivityId,"PerCount",1)
else
LogRed("活动没开,你不应该看到这儿"..curActivityId)