Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
aba4617fcd
|
@ -71,7 +71,7 @@ function ActivityMainPanel:CheckActOpen(_index)
|
||||||
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[_index].ActiveType)
|
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[_index].ActiveType)
|
||||||
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) then
|
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) then
|
||||||
if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then
|
if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then
|
||||||
if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or tabs[_index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[_index].ActiveType == ActivityTypeDef.DynamicActShop then
|
if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or tabs[_index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[_index].ActiveType == ActivityTypeDef.DynamicActShop or tabs[_index].ActiveType == ActivityTypeDef.NiuQi then
|
||||||
_CurPageIndex = _index
|
_CurPageIndex = _index
|
||||||
elseif GlobalActConfig[id].ShowArt == this.activityType then
|
elseif GlobalActConfig[id].ShowArt == this.activityType then
|
||||||
_CurPageIndex = _index
|
_CurPageIndex = _index
|
||||||
|
@ -221,7 +221,7 @@ function this.PageTabAdapter(tab, index, status)
|
||||||
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActiveType)
|
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActiveType)
|
||||||
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActiveType) then
|
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActiveType) then
|
||||||
if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then
|
if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then
|
||||||
if tabs[index].ActiveType == ActivityTypeDef.DynamicAct or tabs[index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[index].ActiveType == ActivityTypeDef.DynamicActShop then
|
if tabs[index].ActiveType == ActivityTypeDef.DynamicAct or tabs[index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[index].ActiveType == ActivityTypeDef.DynamicActShop or tabs[index].ActiveType == ActivityTypeDef.NiuQi then
|
||||||
isshow = true
|
isshow = true
|
||||||
elseif GlobalActConfig[id].ShowArt == this.activityType then
|
elseif GlobalActConfig[id].ShowArt == this.activityType then
|
||||||
isshow = true
|
isshow = true
|
||||||
|
|
|
@ -108,7 +108,7 @@ function this.InitMsg(msg)
|
||||||
this.serData[id].restTime = restTime
|
this.serData[id].restTime = restTime
|
||||||
this.serData[id].switch = switch
|
this.serData[id].switch = switch
|
||||||
|
|
||||||
LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch))
|
-- LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch))
|
||||||
|
|
||||||
-- 用于标记是否解锁使用
|
-- 用于标记是否解锁使用
|
||||||
local typeId = AllActSetConfig[id].IsIDdSame
|
local typeId = AllActSetConfig[id].IsIDdSame
|
||||||
|
|
|
@ -8,26 +8,17 @@ local itemId = 0
|
||||||
function this.Initialize()
|
function this.Initialize()
|
||||||
this.InitAllRewardData()
|
this.InitAllRewardData()
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.Mission.NiuQiChongTianTask,this.UpdateStatus)
|
Game.GlobalEvent:AddEvent(GameEvent.Mission.NiuQiChongTianTask,this.UpdateStatus)
|
||||||
this.isOldNiuQiActivity = true
|
this.IsNewActivity = false
|
||||||
end
|
end
|
||||||
|
|
||||||
--服务器发来的活动进度条数据
|
--服务器发来的活动进度条数据
|
||||||
function this.GetActData()
|
function this.GetActData()
|
||||||
if this.isOldNiuQiActivity then
|
|
||||||
return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||||
else
|
|
||||||
return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--牛气值
|
--牛气值
|
||||||
function this.GetScore()
|
function this.GetScore()
|
||||||
local ActData = {}
|
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||||
if this.isOldNiuQiActivity then
|
|
||||||
ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
|
||||||
else
|
|
||||||
ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
|
||||||
end
|
|
||||||
if not (ActData and ActData.activityId) then return end
|
if not (ActData and ActData.activityId) then return end
|
||||||
if #this.configData == 0 then
|
if #this.configData == 0 then
|
||||||
local config = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",ActData.activityId)
|
local config = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",ActData.activityId)
|
||||||
|
@ -82,11 +73,13 @@ end
|
||||||
function this.CreatSingleData(sData)
|
function this.CreatSingleData(sData)
|
||||||
local data = {}
|
local data = {}
|
||||||
data.id = sData.Id
|
data.id = sData.Id
|
||||||
|
data.actId = sData.ActivityId
|
||||||
data.Text = sData.Text
|
data.Text = sData.Text
|
||||||
data.Reward = sData.Reward
|
data.Reward = sData.Reward
|
||||||
data.Sort = sData.Sort
|
data.Sort = sData.Sort
|
||||||
data.Type = sData.Type
|
data.Type = sData.Type
|
||||||
data.state = 0
|
data.state = 0
|
||||||
|
data.jumpId = sData.JumpID
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -94,7 +87,7 @@ end
|
||||||
--需要显示的任务数据
|
--需要显示的任务数据
|
||||||
function this.GetNeedRewardData(sort)
|
function this.GetNeedRewardData(sort)
|
||||||
local needData = {}
|
local needData = {}
|
||||||
if this.isOldNiuQiActivity then--老的牛气冲天
|
if not this.IsNewActivity then--老的牛气冲天
|
||||||
for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
local tempdata = {}
|
local tempdata = {}
|
||||||
for k, v in pairs(this.rewardData) do
|
for k, v in pairs(this.rewardData) do
|
||||||
|
@ -145,11 +138,16 @@ function this.GetNeedRewardData(sort)
|
||||||
table.insert(needData,v)
|
table.insert(needData,v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local STATE = {
|
||||||
|
[0] = 2,
|
||||||
|
[1] = 3,
|
||||||
|
[2] = 1,
|
||||||
|
}
|
||||||
table.sort(needData,function (a,b)
|
table.sort(needData,function (a,b)
|
||||||
if a.state == b.state then
|
if a.state == b.state then
|
||||||
return a.id < b.id
|
return a.id < b.id
|
||||||
else
|
else
|
||||||
return a.state < b.state
|
return STATE[a.state] > STATE[b.state]
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -157,16 +155,15 @@ function this.GetNeedRewardData(sort)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.CheckNiuQiChongTianRedPoint(index)
|
function this.CheckNiuQiChongTianRedPoint(index)
|
||||||
local id = 0
|
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
||||||
if this.isOldNiuQiActivity then
|
|
||||||
id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
|
||||||
else
|
|
||||||
id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
|
||||||
end
|
|
||||||
if not id or id < 1 then
|
if not id or id < 1 then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
for k = #this.rewardData, 1 , -1 do
|
||||||
|
if this.rewardData[k].actId ~= id then
|
||||||
|
table.remove( this.rewardData,k)
|
||||||
|
end
|
||||||
|
end
|
||||||
local isShow = false
|
local isShow = false
|
||||||
if index == RedPointType.NiuQiChongTian_4 then
|
if index == RedPointType.NiuQiChongTian_4 then
|
||||||
isShow = this.NiuQiCheckRedPoint4()
|
isShow = this.NiuQiCheckRedPoint4()
|
||||||
|
@ -203,4 +200,13 @@ function this.NiuQiCheckRedPoint4()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--检查是否为新的牛气冲天
|
||||||
|
function this.CheckIsNewActivity()
|
||||||
|
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
||||||
|
local data = ConfigManager.GetConfigData(ConfigName.GlobalActivity,id)
|
||||||
|
if data.ShowArt == 2 then
|
||||||
|
this.IsNewActivity = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return this
|
return this
|
|
@ -11,9 +11,9 @@ function NiuQiChongTianPanel:New(gameObject)
|
||||||
return b
|
return b
|
||||||
end
|
end
|
||||||
local TabBox = require("Modules/Common/TabBox")
|
local TabBox = require("Modules/Common/TabBox")
|
||||||
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12251] ,rpType = RedPointType.NiuQiChongTian_1},
|
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12251] , nameNew = "神将招募" ,rpType = RedPointType.NiuQiChongTian_1},
|
||||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12252] ,rpType = RedPointType.NiuQiChongTian_2},
|
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12252] , nameNew = "神将升星" ,rpType = RedPointType.NiuQiChongTian_2},
|
||||||
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12253] ,rpType = RedPointType.NiuQiChongTian_3},}
|
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12253] , nameNew = "极速探索" ,rpType = RedPointType.NiuQiChongTian_3},}
|
||||||
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
||||||
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
|
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ function NiuQiChongTianPanel:InitComponent()
|
||||||
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scrollItem.transform,self.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0,0))
|
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scrollItem.transform,self.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0,0))
|
||||||
self.ScrollView.moveTween.MomentumAmount = 1
|
self.ScrollView.moveTween.MomentumAmount = 1
|
||||||
self.ScrollView.moveTween.Strength = 2
|
self.ScrollView.moveTween.Strength = 2
|
||||||
|
self.ScrollView.elastic = false
|
||||||
|
|
||||||
self.effect5 = Util.GetGameObject(self.reward, "icon (5)/UI_Effect_jinkuang_Yuan")
|
self.effect5 = Util.GetGameObject(self.reward, "icon (5)/UI_Effect_jinkuang_Yuan")
|
||||||
Util.SetParticleSortLayer(self.effect5, 1)
|
Util.SetParticleSortLayer(self.effect5, 1)
|
||||||
|
@ -77,11 +78,7 @@ end
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function NiuQiChongTianPanel:OnOpen(_activityConfig,_index,parent)
|
function NiuQiChongTianPanel:OnOpen(_activityConfig,_index,parent)
|
||||||
self.actConfig = _activityConfig
|
self.actConfig = _activityConfig
|
||||||
if self.actConfig.ActiveType == ActivityTypeDef.NiuQi then
|
NiuQiChongTianManager.CheckIsNewActivity()
|
||||||
NiuQiChongTianManager.isOldNiuQiActivity = true
|
|
||||||
else
|
|
||||||
NiuQiChongTianManager.isOldNiuQiActivity = false
|
|
||||||
end
|
|
||||||
self.pageIndex = _index
|
self.pageIndex = _index
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
end
|
end
|
||||||
|
@ -117,7 +114,7 @@ function NiuQiChongTianPanel:OnShow(_sortingOrder)
|
||||||
self.redPointList[_TabData[index].rpType] = redPoint
|
self.redPointList[_TabData[index].rpType] = redPoint
|
||||||
end
|
end
|
||||||
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(_TabData[index][status])
|
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(_TabData[index][status])
|
||||||
tabLab:GetComponent("Text").text = _TabData[index].name
|
tabLab:GetComponent("Text").text = NiuQiChongTianManager.IsNewActivity and _TabData[index].nameNew or _TabData[index].name
|
||||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -260,7 +257,7 @@ function NiuQiChongTianPanel:SingleDataShow(go, index,data)
|
||||||
|
|
||||||
Util.AddOnceClick(btn.gameObject,function ()
|
Util.AddOnceClick(btn.gameObject,function ()
|
||||||
if data.state == 0 then
|
if data.state == 0 then
|
||||||
JumpManager.GoJump(1023)
|
JumpManager.GoJump(data.jumpId)
|
||||||
elseif data.state == 1 then
|
elseif data.state == 1 then
|
||||||
NetManager.TakeMissionRewardRequest(TaskTypeDef.NiuQiChongTian,data.id,function (msg)
|
NetManager.TakeMissionRewardRequest(TaskTypeDef.NiuQiChongTian,data.id,function (msg)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()
|
||||||
|
|
Loading…
Reference in New Issue