parent
bdb08206df
commit
d1cb61fc18
|
@ -212,6 +212,8 @@ GameEvent = {
|
||||||
ContinueRechargeRefresh ="Activity.ContinueRechargeRefresh",
|
ContinueRechargeRefresh ="Activity.ContinueRechargeRefresh",
|
||||||
--限时up的英雄改变
|
--限时up的英雄改变
|
||||||
TimeLimitUpHeroChange = "Activity.TimeLimitUpHeroChange",
|
TimeLimitUpHeroChange = "Activity.TimeLimitUpHeroChange",
|
||||||
|
--灵兽宝阁灵兽改变
|
||||||
|
UpMonsterChange = "Activity.UpMonsterChange",
|
||||||
},
|
},
|
||||||
Carbon = {
|
Carbon = {
|
||||||
CarbonCountChange = "Carbon.CarbonCountChange",
|
CarbonCountChange = "Carbon.CarbonCountChange",
|
||||||
|
|
|
@ -292,6 +292,24 @@ function this.GetLeftRewardData()
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.LingShouOrigiUpData()
|
||||||
|
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LingShouBaoGe)
|
||||||
|
local activityId = ActData.activityId
|
||||||
|
local LSrewardData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",activityId)
|
||||||
|
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
|
||||||
|
local singleRecruit = array[1]
|
||||||
|
local curScore = 0
|
||||||
|
local mergePool = singleRecruit.MergePool
|
||||||
|
local poolId = ConfigManager.GetConfigDataByKey(ConfigName.LotterySpecialConfig,"Type",mergePool).pool_id
|
||||||
|
local tempData = ConfigManager.GetConfigDataByKey(ConfigName.LotteryRewardConfig,"Pool",poolId)
|
||||||
|
local showData = {}
|
||||||
|
showData.sasId = 0
|
||||||
|
showData.monsterId = tempData.Reward[1]
|
||||||
|
showData.iconId = LSrewardData[1].Reward[1][1]
|
||||||
|
showData.battleId = tempData.Fakebattle
|
||||||
|
return showData
|
||||||
|
end
|
||||||
|
|
||||||
function this.LingShouBuildData()
|
function this.LingShouBuildData()
|
||||||
local rewardData={}
|
local rewardData={}
|
||||||
local showData={}
|
local showData={}
|
||||||
|
|
|
@ -74,9 +74,9 @@ function LingShouBaoGe:BindEvent()
|
||||||
maxRound = 20
|
maxRound = 20
|
||||||
}
|
}
|
||||||
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test,function ()
|
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test,function ()
|
||||||
-- Timer.New(function ()
|
Timer.New(function ()
|
||||||
-- self:Refresh()
|
self:Refresh()
|
||||||
-- end,3):Start()
|
end,3):Start()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -141,13 +141,13 @@ function LingShouBaoGe:SetData()
|
||||||
self.showData={}
|
self.showData={}
|
||||||
self.rewardData,self.showData,self.curScore = DynamicActivityManager.LingShouBuildData()
|
self.rewardData,self.showData,self.curScore = DynamicActivityManager.LingShouBuildData()
|
||||||
self.title.sprite = self.spLoader:LoadSprite(PositionList[self.showData.monsterId].title)
|
self.title.sprite = self.spLoader:LoadSprite(PositionList[self.showData.monsterId].title)
|
||||||
|
if self.Live then
|
||||||
|
poolManager:UnLoadLive(self.bgName, self.Live)
|
||||||
|
end
|
||||||
--设置立绘
|
--设置立绘
|
||||||
self.bgName = artConfig[SpiritAnimalConfig[self.showData.monsterId].Live].Name
|
self.bgName = artConfig[SpiritAnimalConfig[self.showData.monsterId].Live].Name
|
||||||
local pos = SpiritAnimalConfig[self.showData.monsterId].Position
|
local pos = SpiritAnimalConfig[self.showData.monsterId].Position
|
||||||
local scale = SpiritAnimalConfig[self.showData.monsterId].Scale
|
local scale = SpiritAnimalConfig[self.showData.monsterId].Scale
|
||||||
if self.Live then
|
|
||||||
poolManager:UnLoadLive(self.bgName, self.Live)
|
|
||||||
end
|
|
||||||
self.Live = poolManager:LoadLive(self.bgName, self.grid.transform, Vector3.one*scale*0.8, Vector2.New(pos[1],pos[2]+PositionList[self.showData.monsterId].pos))
|
self.Live = poolManager:LoadLive(self.bgName, self.grid.transform, Vector3.one*scale*0.8, Vector2.New(pos[1],pos[2]+PositionList[self.showData.monsterId].pos))
|
||||||
local RoleLiveGOGraphic = self.Live:GetComponent("SkeletonGraphic")
|
local RoleLiveGOGraphic = self.Live:GetComponent("SkeletonGraphic")
|
||||||
RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true)
|
RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||||
|
@ -345,12 +345,16 @@ end
|
||||||
|
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
function LingShouBaoGe:AddListener()
|
function LingShouBaoGe:AddListener()
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.Activity.UpMonsterChange, function()
|
||||||
|
self:Refresh()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
--移除事件监听(用于子类重写)
|
--移除事件监听(用于子类重写)
|
||||||
function LingShouBaoGe:RemoveListener()
|
function LingShouBaoGe:RemoveListener()
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.UpMonsterChange, function()
|
||||||
|
self:Refresh()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
return LingShouBaoGe
|
return LingShouBaoGe
|
|
@ -43,9 +43,11 @@ function this:LookDetailBtnAction()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this:AddListener()
|
function this:AddListener()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:RemoveListener()
|
function this:RemoveListener()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnShow(_parent,_Data)
|
function this:OnShow(_parent,_Data)
|
||||||
|
@ -118,11 +120,20 @@ function this:OnShow(_parent,_Data)
|
||||||
itemList[i].Reward[1]=dic[itemList[i].Reward[1]]
|
itemList[i].Reward[1]=dic[itemList[i].Reward[1]]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif activityType == ActivityTypeDef.LingShouBaoGe then
|
||||||
|
local rewardData,showData,curScore = DynamicActivityManager.LingShouBuildData()
|
||||||
|
local origiUpMonster = DynamicActivityManager.LingShouOrigiUpData()
|
||||||
|
itemList = RecruitManager.GetRewardPreviewData(poolType)
|
||||||
|
for i = 1,#itemList do
|
||||||
|
if itemList[i].Reward[1] == origiUpMonster.monsterId then
|
||||||
|
UpItemList = {[1] = {Reward = {showData.monsterId,1},WeightShow = itemList[i].WeightShow}}
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
UpItemList = RecruitManager.GetRewardPreviewData(poolUpType)
|
UpItemList = RecruitManager.GetRewardPreviewData(poolUpType)
|
||||||
itemList = RecruitManager.GetRewardPreviewData(poolType)
|
itemList = RecruitManager.GetRewardPreviewData(poolType)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
local _upRateList,rateList = this:BuildRateData(activityType,itemList,UpItemList)
|
local _upRateList,rateList = this:BuildRateData(activityType,itemList,UpItemList)
|
||||||
this:ReFreshUpItem(UpItemList,_upRateList)
|
this:ReFreshUpItem(UpItemList,_upRateList)
|
||||||
|
|
|
@ -32,6 +32,7 @@ function this:BindEvent()
|
||||||
NetManager.ChengeMonsterChooseRequest(ActData.activityId,curMonsterId,function ()
|
NetManager.ChengeMonsterChooseRequest(ActData.activityId,curMonsterId,function ()
|
||||||
local selectId = ConfigManager.GetConfigDataByDoubleKey(ConfigName.SpiritAnimalSummon,"ActivityID",ActData.activityId,"FocusID",curMonsterId).Id
|
local selectId = ConfigManager.GetConfigDataByDoubleKey(ConfigName.SpiritAnimalSummon,"ActivityID",ActData.activityId,"FocusID",curMonsterId).Id
|
||||||
ActivityGiftManager.ChangeLingShouBaoGeSelectId(ActData.activityId,selectId)
|
ActivityGiftManager.ChangeLingShouBaoGeSelectId(ActData.activityId,selectId)
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.Activity.UpMonsterChange)
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue