diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
index 9913a23a18..0c6c182fa0 100644
--- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
+++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
@@ -1311,7 +1311,7 @@ GoodsTypeDef = {
TreasureOfHeaven=12,--天宫秘宝
WuJinMiBao=14,--天宫秘宝
-- UpgradePackage=13,--升级限时礼包
- --TreasureOfHeaven=12,--天宫秘宝
+ QiJieMiBao=40,--天宫秘宝
}
--工坊功能类型
diff --git a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua
index fc5f9d5f0b..7d022ad577 100644
--- a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua
+++ b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua
@@ -493,4 +493,7 @@ GameEvent = {
UpdateWordLv="JumpServerHeightLadder.UpdateWordLv",-- 刷新世界等级
CrossStateChange = "JumpServerHeightLadder.CrossStateChange", -- 跨服状态改变
},
+ SerectTreasure = {
+ RechargeSuccess = "SerectTreasure.RechargeSuccess"--秘宝充值成功
+ }
}
\ No newline at end of file
diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasureMangaer.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasureMangaer.lua
index 8ec8a1e9fa..ec90bc180c 100644
--- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasureMangaer.lua
+++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasureMangaer.lua
@@ -42,6 +42,7 @@ function this.InitConfigData()
end
function this.GetTreasureData(ActType)
+ this.curType = ActType
local actInfo = ActivityGiftManager.GetActivityTypeInfo(ActType)
local curTypeData = this.TreasureList[ActType]
curTypeData.ActId = actInfo.activityId
@@ -83,4 +84,21 @@ function this.GetTreasureData(ActType)
return curTypeData
end
+function this.GetAllRewardData()
+ local directData = {}
+ local indirectData = {}
+ local value = this.TreasureList[this.curType].value
+ for k,v in ConfigPairs(ConfigManager.GetConfig(this.TreasureList[this.curType].configName)) do
+ local curDataList = v.Integral[1][2] <= value and directData or indirectData
+ for i = 1, #v.TreasureReward do
+ if not curDataList[v.TreasureReward[i][1]] then
+ curDataList[v.TreasureReward[i][1]] = 0
+ end
+ curDataList[v.TreasureReward[i][1]] = curDataList[v.TreasureReward[i][1]] + v.TreasureReward[i][2]
+ end
+
+ end
+ return directData,indirectData
+end
+
return GeneralTreasureMangaer
\ No newline at end of file
diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasurePanel.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasurePanel.lua
index 061268e02b..2f7b0a550f 100644
--- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasurePanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralTreasurePanel.lua
@@ -46,10 +46,12 @@ end
--添加事件监听(用于子类重写)
function GeneralTreasurePanel:AddListener()
+ Game.GlobalEvent:AddEvent(GameEvent.SerectTreasure.RechargeSuccess, self.refresh,self)
end
--移除事件监听(用于子类重写)
function GeneralTreasurePanel:RemoveListener()
+ Game.GlobalEvent:AddEvent(GameEvent.SerectTreasure.RechargeSuccess, self.refresh,self)
end
--界面打开时调用(用于子类重写)
@@ -78,7 +80,7 @@ function GeneralTreasurePanel:topBar()
self.buyBtn:GetComponent("Button").interactable = self.treasureData.treasureState == 0
self.Text1.text = self.treasureData.treasureState == 0 and "激活秘宝" or "已激活"
Util.AddOnceClick(self.buyBtn,function()
- PopupTipPanel.ShowTip("天宫秘宝")
+ UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,4)
end)
end
@@ -146,7 +148,7 @@ function GeneralTreasurePanel:SingleTask(rewardItem, singleData)
self.itemsList2[rewardItem][i]:OnOpen(false, {singleData.TreasureReward[i][1], singleData.TreasureReward[i][2]}, 0.8, false)
end
- scoreLevel.text = singleData.Level
+ scoreLevel.text = singleData.Integral[1][2]
--初始化按钮状态
self:InitButtonState(rewardItem, singleData)
end
@@ -222,7 +224,7 @@ function GeneralTreasurePanel:OnBtnDealClicked(rewardItem,singleData)
end)
end)
elseif singleData.State == 1 then
- -- UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,3)
+ UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,4)
end
end
diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua
index a29b12e56b..1dd4402b4d 100644
--- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua
@@ -16,6 +16,7 @@ local type = {
[1] = {name=Language[11561],id = 106,goodsType = GoodsTypeDef.TreasureOfHeaven},
[2] = {name=Language[11316],id = 5001,goodsType = GoodsTypeDef.FindBaby},
[3] = {name="无尽秘宝",id = 107,goodsType = GoodsTypeDef.WuJinMiBao},
+ [4] = {name="七界秘宝",id = 108,goodsType = GoodsTypeDef.QiJieMiBao},
}
--初始化组件(用于子类重写)
@@ -80,6 +81,14 @@ function this:OnShow(_parent,...)
this.dealBtnText.gameObject:SetActive(true)
local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,type[curType].id)
this.dealBtnText.text = MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)
+ elseif curType == 4 then --七界秘宝
+ rewardData,rewardData1 = GeneralTreasureMangaer.GetAllRewardData()
+ this:SetItem(rewardData,rewardData1)
+ this.tip.text = "解锁秘宝,激活进阶专属奖励+1500积分,可获取1280妖晶"
+ this.dealBtnIma.gameObject:SetActive(false)
+ this.dealBtnText.gameObject:SetActive(true)
+ local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,type[curType].id)
+ this.dealBtnText.text = MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)
end
end
@@ -97,7 +106,9 @@ function this:RechargeSuccessFunc()
EndLessMapManager.SetTreasureGiftState(1)
EndLessMapManager.SetTreasureState()
Game.GlobalEvent:DispatchEvent(GameEvent.EndLess.RechargeQinglongSerectSuccess,false,false)
- end
+ elseif curType == 4 then
+ Game.GlobalEvent:DispatchEvent(GameEvent.SerectTreasure.RechargeSuccess,false,false)
+ end
parent:ClosePanel()
end