【ID1010636】

【优化】灵兽宝阁活动调整
dev_chengFeng
jiaoyangna 2021-11-10 18:35:38 +08:00
parent 908e068f23
commit ceb7ee3602
4 changed files with 23 additions and 22 deletions

View File

@ -529,12 +529,21 @@ function this.CheckMoneyProgress(v)
end
end
function this.ChangeLingShouBaoGeSelectId(_activityId,_selectId)
if this.mission[_activityId] then
for i = 1, #this.mission[_activityId].mission do
if this.mission[_activityId].mission[i].missionId == 0 then
this.mission[_activityId].mission[i].progress = _selectId
break
end
end
end
end
--刷新某个活动的数据进度
function this.RefreshActivityProgressData(msg)
-- 检测
this.CheckMoneyProgress(msg.activityInfo)
-- LogYellow("刷新活动数据activityId" .. msg.activityInfo.activityId .. "value" .. msg.activityInfo.value)
if this.mission[msg.activityInfo.activityId] then
this.mission[msg.activityInfo.activityId].value = msg.activityInfo.value
@ -543,7 +552,6 @@ function this.RefreshActivityProgressData(msg)
if missionInfo.missionId == msg.activityInfo.mission[i].missionId then
missionInfo.state = msg.activityInfo.mission[i].state
missionInfo.progress = msg.activityInfo.mission[i].progress
-- LogYellow(msg.activityInfo.activityId.." 刷新活动数据missionId" .. missionInfo.missionId .. "state" .. missionInfo.state .. "progress" .. missionInfo.progress)
end
end
end
@ -552,7 +560,6 @@ function this.RefreshActivityProgressData(msg)
--断线重连时 在线奖励活动 数据刷新
this.CutUpLineUpdateOnLineData(msg)
end
end
function this.RefreshActivityRedPoint()

View File

@ -313,11 +313,13 @@ function this.LingShouBuildData()
showData.sasId = 0
showData.monsterId = tempData.Reward[1]
showData.iconId = LSrewardData[1].Reward[1][1]
showData.battleId = tempData.Fakebattle
else
local tempData = SpiritAnimalSummonConfig[v.progress]
showData.sasId = tempData.Id
showData.monsterId = tempData.FocusID
showData.iconId = tempData.TargetItemList[2]
showData.iconId = tempData.OriginalItemList
showData.battleId = tempData.Fakebattle
end
end
end
@ -401,19 +403,11 @@ function this.XiangYaoBuildData()
for index, value in ipairs(ActData.mission) do
local v = ActData.mission[index]
if v.missionId == 0 then
if v.progress == 0 then
local mergePool = singleRecruit.MergePool
local poolId = ConfigManager.GetConfigDataByKey(ConfigName.LotterySpecialConfig,"Type",mergePool).pool_id
local tempData = ConfigManager.GetConfigDataByKey(ConfigName.LotteryRewardConfig,"Pool",poolId)
showData.sasId = 0
showData.monsterId = tempData.Reward[1]
showData.iconId = LSrewardData[1].Reward[1][1]
else
local tempData = SpiritAnimalSummonConfig[v.progress]
showData.sasId = tempData.Id
showData.monsterId = tempData.FocusID
showData.iconId = tempData.TargetItemList[2]
end
local mergePool = singleRecruit.MergePool
local poolId = ConfigManager.GetConfigDataByKey(ConfigName.LotterySpecialConfig,"Type",mergePool).pool_id
local tempData = ConfigManager.GetConfigDataByKey(ConfigName.LotteryRewardConfig,"Pool",poolId)
showData.sasId = 0
showData.monsterId = tempData.Reward[1]
end
end
--剩下的是奖励信息

View File

@ -32,7 +32,6 @@ function LingShouBaoGe:InitComponent()
self.preview = Util.GetGameObject(self.gameObject,"rightUp/preview")
self.change = Util.GetGameObject(self.gameObject,"rightUp/change")
self.change:SetActive(false)
self.detailBtn = Util.GetGameObject(self.gameObject,"rightUp/detailBtn")
self.upper=Util.GetGameObject(self.gameObject,"bottom/times"):GetComponent("Text") ---召唤上限
@ -66,7 +65,7 @@ function LingShouBaoGe:BindEvent()
end)
Util.AddOnceClick(self.preview, function()
local battleId = tonumber(gloAcivity[self.activityId].ExpertDec)
local battleId = tonumber(self.showData.battleId)
local fdata, fseed = BattleManager.GetFakeBattleData(battleId)
local testFightData = {
fightData = fdata,
@ -117,12 +116,12 @@ end
function LingShouBaoGe:Refresh()
self.actData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LingShouBaoGe)
self.curLingShowId = self.actData.choiceRewardId
self.activityId = self.actData.activityId
self.LSrewardData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",self.activityId)
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",self.activityId)
self.singleRecruit = array[1]
self.tenRecruit = array[2]
self.change:SetActive(false)
CheckRedPointStatus(RedPointType.LingShouBaoGe)
self:refreshBtnShow()--刷新按钮显示

View File

@ -29,7 +29,9 @@ function this:BindEvent()
parent:ClosePanel()
return
end
NetManager.ChengeMonsterChooseRequest(ActData.activityId,curIndex,function ()
NetManager.ChengeMonsterChooseRequest(ActData.activityId,curMonsterId,function ()
local selectId = ConfigManager.GetConfigDataByDoubleKey(ConfigName.SpiritAnimalSummon,"ActivityID",ActData.activityId,"FocusID",curMonsterId).Id
ActivityGiftManager.ChangeLingShouBaoGeSelectId(ActData.activityId,selectId)
parent:ClosePanel()
end)
end)
@ -56,7 +58,6 @@ function this:OnShow(_parent,...)
this.titleText.text=Language[11565]
this.tip.text = Language[11566]
LogYellow("ActData.ActivityId:"..ActData.activityId)
local monsterData = ConfigManager.GetAllConfigsDataByKey(ConfigName.SpiritAnimalSummon,"ActivityID",ActData.activityId)
if not itemsGrid then