Merge branch 'china/dev' into 0功能/玉虚论道

# Conflicts:
#	Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua
dev_chengFeng
gaoxin 2021-09-22 10:37:42 +08:00
commit e5af89fac9
25 changed files with 140 additions and 102 deletions

View File

@ -41,6 +41,7 @@ public class ClientConfigManager
// 获取所有的version文件列表 // 获取所有的version文件列表
public string[] GetVersionList() public string[] GetVersionList()
{ {
SVN_Update();
string versionPath = localPath + "/Version"; string versionPath = localPath + "/Version";
string[] list = Directory.GetDirectories(versionPath); string[] list = Directory.GetDirectories(versionPath);
Debug.LogError(list.Length); Debug.LogError(list.Length);
@ -50,6 +51,7 @@ public class ClientConfigManager
// 获取热更新用的配置文件 // 获取热更新用的配置文件
public Hashtable GetHotFixConfig() public Hashtable GetHotFixConfig()
{ {
SVN_Update();
string hotfixConfig = localPath + "/HotFixWindow.txt"; string hotfixConfig = localPath + "/HotFixWindow.txt";
Hashtable config = null; Hashtable config = null;
if (File.Exists(hotfixConfig)) if (File.Exists(hotfixConfig))
@ -64,6 +66,7 @@ public class ClientConfigManager
// 获取打包工具配置文件 // 获取打包工具配置文件
public Hashtable GetAutoPackConfig() public Hashtable GetAutoPackConfig()
{ {
SVN_Update();
string hotfixConfig = localPath + "/AutoPack.txt"; string hotfixConfig = localPath + "/AutoPack.txt";
Hashtable config = null; Hashtable config = null;
if (File.Exists(hotfixConfig)) if (File.Exists(hotfixConfig))
@ -76,6 +79,7 @@ public class ClientConfigManager
// 获取校验服同步工程配置文件 // 获取校验服同步工程配置文件
public Hashtable GetFightServerConfig() public Hashtable GetFightServerConfig()
{ {
SVN_Update();
string hotfixConfig = localPath + "/FightServer.txt"; string hotfixConfig = localPath + "/FightServer.txt";
Hashtable config = null; Hashtable config = null;
if (File.Exists(hotfixConfig)) if (File.Exists(hotfixConfig))

View File

@ -60,6 +60,7 @@ GameEvent = {
OnResetFormationHp = "Formation.OnResetFormationHp", OnResetFormationHp = "Formation.OnResetFormationHp",
-- 掉血消息 -- 掉血消息
OnMapTeamHpReduce = "Formation.OnMapTeamHpReduce", OnMapTeamHpReduce = "Formation.OnMapTeamHpReduce",
OnFormationChange1 = "OnFormationChange1",
}, },
Mission = { Mission = {
--新增任务 --新增任务

View File

@ -213,15 +213,15 @@ function this.GetBaoKuData()
end end
end end
end end
local BasicPoolId = string.split(BlessingConfigNew.BasicPoolId, "#")
--大奖和当前层数数据 --大奖和当前层数数据
for i = 1, 1100 do for i = 1, 1100 do
if ActInfo.mission[i] then if ActInfo.mission[i] then
local v = ActInfo.mission[i] local v = ActInfo.mission[i]
if v.missionId == 100 then if v.missionId == 100 then
-- LogYellow("层数:"..v.progress)
actData.curLevel = v.progress actData.curLevel = v.progress
curBasicPool = BlessingConfigNew.BasicPoolId[v.progress] curBasicPool = tonumber(BasicPoolId[v.progress])
actData.poolId = curBasicPool
curFinalPool = BlessingConfigNew.FinalPoolId curFinalPool = BlessingConfigNew.FinalPoolId
elseif v.missionId > 1000 then elseif v.missionId > 1000 then
local data = {} local data = {}
@ -272,7 +272,7 @@ end
function this.GetLeftRewardData() function this.GetLeftRewardData()
local actData = this.GetBaoKuData() local actData = this.GetBaoKuData()
local finalCardDatas = actData.finalCardDatas local finalCardDatas = actData.finalCardDatas
local RewardConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.BlessingRewardPoolNew,"PoolId",actData.curLevel)--初始所有奖励数据 local RewardConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.BlessingRewardPoolNew,"PoolId",actData.poolId)--初始所有奖励数据
local data={} local data={}
for i = 1, #RewardConfig do for i = 1, #RewardConfig do
data[RewardConfig[i].Id] = {} data[RewardConfig[i].Id] = {}

View File

@ -70,20 +70,27 @@ end
--刷新编队数据 --刷新编队数据
function this.UpdateFormation(msg) function this.UpdateFormation(msg)
Log("编队数量:" .. #msg.TeamPosInfo)
this.formationList = {} this.formationList = {}
-- this.curFormationIndex = this.SetCurFormationIndex() -- this.curFormationIndex = this.SetCurFormationIndex()
this.curFormationIndex = 1 this.curFormationIndex = 1
for i, team in ipairs(msg.TeamPosInfo) do for i, team in ipairs(msg.TeamPosInfo) do
local isRefresh = false
local oTeam = this.MakeAEmptyTeam(team.teamId) local oTeam = this.MakeAEmptyTeam(team.teamId)
for j = 1, #team.teamHeroInfos do for j = 1, #team.teamHeroInfos do
local teamHeroInfo = team.teamHeroInfos[j] local teamHeroInfo = team.teamHeroInfos[j]
table.insert(oTeam.teamHeroInfos, teamHeroInfo) if HeroManager.GetSingleHeroData(teamHeroInfo.heroId) then
HeroManager.SetHeroFormationList(teamHeroInfo.heroId,team.teamId,1) table.insert(oTeam.teamHeroInfos, teamHeroInfo)
HeroManager.SetHeroFormationList(teamHeroInfo.heroId,team.teamId,1)
else
isRefresh = true
end
end end
oTeam.teamPokemonInfos = {} oTeam.teamPokemonInfos = {}
this.formationList[team.teamId] = oTeam this.formationList[team.teamId] = oTeam
if isRefresh then
FormationManager.RefreshFormation(team.teamId, this.formationList[team.teamId].teamHeroInfos, {})
end
end end
if #msg.TeamPosInfo == 0 then if #msg.TeamPosInfo == 0 then
@ -210,7 +217,9 @@ function this.GetFormationByID(teamId)
local _v=tonumber(v) local _v=tonumber(v)
if teamId==_v and #this.formationList[teamId].teamHeroInfos<=0 then if teamId==_v and #this.formationList[teamId].teamHeroInfos<=0 then
for n = 1, #this.formationList[1].teamHeroInfos do for n = 1, #this.formationList[1].teamHeroInfos do
table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n]) if HeroManager.GetSingleHeroData(this.formationList[1].teamHeroInfos.heroId) then
table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n])
end
end end
-- --
FormationManager.SaveFormation(teamId, this.formationList[teamId].teamHeroInfos, {}) FormationManager.SaveFormation(teamId, this.formationList[teamId].teamHeroInfos, {})

View File

@ -203,10 +203,12 @@ end
function this:AddListener() function this:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower) Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower)
Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange1, this.OnShow)
end end
function this:RemoveListener() function this:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower) Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower)
Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange1, this.OnShow)
end end
function this:OnSortingOrderChange() function this:OnSortingOrderChange()

View File

@ -99,10 +99,20 @@ function this.On_Btn2_Click()
if LengthOfTable(this.root.choosedList) < 1 then if LengthOfTable(this.root.choosedList) < 1 then
PopupTipPanel.ShowTip("挑战编队为空") PopupTipPanel.ShowTip("挑战编队为空")
return return
end
local newteam = {}
for i = 1,#this.root.choosedList do
if HeroManager.GetSingleHeroData(this.root.choosedList[i].heroId) then
table.insert(newteam, this.root.choosedList[i])
end
end
if #newteam < 1 then
PopupTipPanel.ShowTip("挑战编队为空")
return
end end
FormationManager.RefreshFormation( FormationManager.RefreshFormation(
this.root.curFormationIndex, this.root.curFormationIndex,
this.root.choosedList, newteam,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos
) )
this.StartFight() this.StartFight()

View File

@ -98,7 +98,7 @@ end
function GeneralBigPopup:OnShow() function GeneralBigPopup:OnShow()
contentPrefabs[this.popupKey].gameObject:SetActive(true) contentPrefabs[this.popupKey].gameObject:SetActive(true)
contentScripts[this.popupKey].view:OnShow(this, unpack(this.args))--1、传入自己 2、传入不定参 contentScripts[this.popupKey].view:OnShow(this,this.args)--1、传入自己 2、传入不定参
end end
function GeneralBigPopup:OnClose() function GeneralBigPopup:OnClose()

View File

@ -35,10 +35,10 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,data)
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
local args = {...} local args = data
activityId = args[1] activityId = args[1]
activityType = args[2] activityType = args[2]
local rewardTabs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRankingReward,"ActivityId",activityId) local rewardTabs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRankingReward,"ActivityId",activityId)

View File

@ -50,13 +50,16 @@ function this:BindEvent()
end end
function this:BtnClick(i) function this:BtnClick(i)
if curIndex == i then if curIndex == i then
return return
end end
curIndex = i
LogGreen("curIndex:"..curIndex)
this.selectBtn.transform:SetParent(tabs[i].transform) this.selectBtn.transform:SetParent(tabs[i].transform)
this.selectBtn:GetComponent("RectTransform").localPosition = Vector3.zero this.selectBtn:GetComponent("RectTransform").localPosition = Vector3.zero
this.selectBtn.transform:SetAsFirstSibling() this.selectBtn.transform:SetAsFirstSibling()
curIndex = i
for k,v in pairs(itemList) do for k,v in pairs(itemList) do
v.gameObject:SetActive(false) v.gameObject:SetActive(false)
end end
@ -69,14 +72,15 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,_Data)
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
local args = {...} local args = _Data
waveId = args[1] waveId = args[1]
curType = args[2] curType = args[2]
friendHelpHeros = args[3] friendHelpHeros = args[3]
myHeros = args[4] myHeros = args[4]
LogGreen("myHeros:"..#myHeros)
this:SetMyHeightPower() this:SetMyHeightPower()
this.titleText.text = FourElementName[curType] this.titleText.text = FourElementName[curType]
rate = tonumber(string.format("%.2f",ConfigManager.GetConfigData(ConfigName.CampTowerSetting,1).HelpFightMax / 10000)) rate = tonumber(string.format("%.2f",ConfigManager.GetConfigData(ConfigName.CampTowerSetting,1).HelpFightMax / 10000))
@ -152,6 +156,10 @@ end
function this:SetMyHeightPower() function this:SetMyHeightPower()
heightPower = 0 heightPower = 0
if not myHeros or #myHeros < 1 then
heightPower = 0
return
end
for k,v in ipairs(myHeros) do for k,v in ipairs(myHeros) do
if v.warPower > heightPower then if v.warPower > heightPower then
heightPower = v.warPower heightPower = v.warPower

View File

@ -27,11 +27,11 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,_Data)
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
parent.BG:SetActive(false) parent.BG:SetActive(false)
local args = {...} local args = _Data
local curHeroData = args[1] local curHeroData = args[1]
if not curHeroData or not HeroConfig[curHeroData.heroConfig.Id] or #HeroConfig[curHeroData.heroConfig.Id].RankupConsumeMaterial < 1 then if not curHeroData or not HeroConfig[curHeroData.heroConfig.Id] or #HeroConfig[curHeroData.heroConfig.Id].RankupConsumeMaterial < 1 then
parent:ClosePanel() parent:ClosePanel()

View File

@ -48,10 +48,10 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,_Data)
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
local args = {...} local args = _Data
local helpType = args[1] local helpType = args[1]
local str = ConfigManager.TryGetConfigData(ConfigName.QAConfig,helpType).content local str = ConfigManager.TryGetConfigData(ConfigName.QAConfig,helpType).content
str = string.gsub(str,"{","<color=#D48A07>") str = string.gsub(str,"{","<color=#D48A07>")

View File

@ -70,10 +70,10 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,_Data)
self.parent=_parent self.parent=_parent
self.sortingOrder = _parent.sortingOrder self.sortingOrder = _parent.sortingOrder
local args = {...} local args = _Data
NetManager.ChoiceWishHeroRequest(nil,function () NetManager.ChoiceWishHeroRequest(nil,function ()
if args[1] then if args[1] then
self.curSelect = args[1] self.curSelect = args[1]

View File

@ -26,11 +26,11 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,_Data)
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
parent.BG:SetActive(false) parent.BG:SetActive(false)
local args = {...} local args = _Data
local data = args[1] local data = args[1]
for i = 1, #data do for i = 1, #data do
if not attriList[i] then if not attriList[i] then

View File

@ -58,11 +58,11 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,_Data)
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
local _args = {...} local _args = _Data
data = _args[1] data = _args[1]
func = _args[2] func = _args[2]
self.heroList = HeroManager.GetHeroDataByPropertyAndProfession(data.FitList[1],data.FitList[2],1) self.heroList = HeroManager.GetHeroDataByPropertyAndProfession(data.FitList[1],data.FitList[2],1)

View File

@ -30,10 +30,10 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,_Data)
self.parent=_parent self.parent=_parent
self.sortingOrder = _parent.sortingOrder self.sortingOrder = _parent.sortingOrder
local args = {...} local args = _Data
self.actData = args[1] self.actData = args[1]
self.timeText.text = string.format("概率有效期:%s ~ %s",os.date("%Y-%m-%d", self.actData.startTime),os.date("%Y-%m-%d", self.actData.endTime)) self.timeText.text = string.format("概率有效期:%s ~ %s",os.date("%Y-%m-%d", self.actData.startTime),os.date("%Y-%m-%d", self.actData.endTime))
this:Refresh(true,true) this:Refresh(true,true)

View File

@ -51,18 +51,24 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,data)
itemList={} itemList={}
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
_args = {...} _args = data
ActData = _args[1] ActData = _args[1]
func = _args[2] func = _args[2]
this.titleText.text = Language[10760] this.titleText.text = Language[10760]
curId = ActData.selectId or nil curId = ActData.selectId or nil
local RewardConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.BlessingRewardPoolNew,"PoolId",ActData.curFinalPool) local RewardConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.BlessingRewardPoolNew,"PoolId",ActData.curFinalPool)
table.sort(RewardConfig, function(a, b)
if a.FloorLimit == b.FloorLimit then
return a.Id < b.Id
end
return a.FloorLimit < b.FloorLimit
end)
this.ScrollView:SetData(RewardConfig, function(index, go) this.ScrollView:SetData(RewardConfig, function(index, go)
this:SetSingleData(index,go, RewardConfig[index]) this:SetSingleData(index,go, RewardConfig[index])
end) end)
@ -130,15 +136,18 @@ function this:SetSingleData(index,item,data)
limit2.text = Language[10262]..data.FloorLimit..Language[10762] limit2.text = Language[10262]..data.FloorLimit..Language[10762]
t2 = false t2 = false
end end
-- LogRed(ActData.allData[index].rewardId..""..tostring(ActData.allData[index].progress)) local aData = this.GetDataByRewardId(data.Id)
if ActData.allData[index].progress > data.InitializeNum then -- LogRed(aData.rewardId..""..tostring(aData.progress))
if aData.progress >= data.InitializeNum then
t3 = false t3 = false
elseif ActData.allData[index].progress == data.InitializeNum and ActData.curLevel > data.InitializeNum then -- 如果是当前层选中的特殊奖励
t3 = false if aData.progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum
num.text = "<color=red>"..(data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum.."</color>" t3 = true
end
num.text = "<color=red>"..(data.InitializeNum-aData.progress).."/"..data.InitializeNum.."</color>"
else else
t3 = true t3 = true
num.text = (data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum num.text = (data.InitializeNum - aData.progress).."/"..data.InitializeNum
end end
num.gameObject:SetActive(t1 and t2) num.gameObject:SetActive(t1 and t2)
@ -146,6 +155,16 @@ function this:SetSingleData(index,item,data)
end end
-- 获取数量
function this.GetDataByRewardId(rId)
for k, v in ipairs(ActData.allData) do
if v.rewardId == rId then
return v
end
end
end
function this:OnClose() function this:OnClose()
end end
@ -153,6 +172,7 @@ end
function this:OnDestroy() function this:OnDestroy()
this.spLoader:Destroy() this.spLoader:Destroy()
itemIconList={} itemIconList={}
goList = {}
end end
return this return this

View File

@ -44,13 +44,13 @@ end
function this:RemoveListener() function this:RemoveListener()
end end
function this:OnShow(_parent,...) function this:OnShow(_parent,data)
itemList={} itemList={}
parent=_parent parent=_parent
sortingOrder = _parent.sortingOrder sortingOrder = _parent.sortingOrder
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
_args = {...} _args = data
ActData = _args[1] ActData = _args[1]
func = _args[2] func = _args[2]
this.titleText.text = Language[10763] this.titleText.text = Language[10763]
@ -81,7 +81,7 @@ function this:OnShow(_parent,...)
table.insert(tempData,value) table.insert(tempData,value)
end end
this.ScrollView:SetData(tempData, function(index, go) this.ScrollView:SetData(tempData, function(index, go)
this:SetSingleData(index,go,leftRewardData[index + (ActData.curLevel-1)*10]) this:SetSingleData(index,go,leftRewardData[index + (ActData.poolId-1)*10])
end) end)
end end

View File

@ -481,6 +481,24 @@ end
--设置好友帮助我的英雄 以试炼类型为键 --设置好友帮助我的英雄 以试炼类型为键
function this.SetFriendHelpHero(helpFightList,trailType) function this.SetFriendHelpHero(helpFightList,trailType)
if not trailType then if not trailType then
for i = 1,4 do
local team = FormationManager.GetFormationByID(i + 3000)
if this.friendHelpHero and this.friendHelpHero[i] and this.friendHelpHero[i].hero then
local newteam = {}
for k,v in ipairs(team.teamHeroInfos) do
if v.heroId == this.friendHelpHero[i].hero.dynamicId then
else
table.insert(newteam,v)
end
end
if LengthOfTable(newteam) ~= LengthOfTable(team.teamHeroInfos) then
FormationManager.RefreshFormation(
i + 3000,
newteam,
FormationManager.formationList[i + 3000].teamPokemonInfos)
end
end
end
this.friendHelpHero = {} this.friendHelpHero = {}
for k,v in ipairs(helpFightList) do for k,v in ipairs(helpFightList) do
if not this.friendHelpHero[v.trailType] then if not this.friendHelpHero[v.trailType] then
@ -491,6 +509,7 @@ function this.SetFriendHelpHero(helpFightList,trailType)
local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[v.trailType].hero, false) local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[v.trailType].hero, false)
this.friendHelpHero[v.trailType].hero.warPower = allAddProVal[HeroProType.WarPower] this.friendHelpHero[v.trailType].hero.warPower = allAddProVal[HeroProType.WarPower]
end end
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange1)
else else
if not this.friendHelpHero then if not this.friendHelpHero then
this.friendHelpHero = {} this.friendHelpHero = {}

View File

@ -599,8 +599,6 @@ function this.EquipTreasureBuildRequest(_IdDyn, _type,_mats,func)
if func then if func then
func(msg) func(msg)
end end
-- 宝物属性改变需要重新计算战斗力
EquipTreasureManager.SetTreasureDirty(_IdDyn, true)
end) end)
end end

View File

@ -138,6 +138,7 @@ local TypeUpdateFunc = {
for j = 1, #configData do for j = 1, #configData do
if curData.rewards[i].missionId == configData[j].Id then if curData.rewards[i].missionId == configData[j].Id then
curData.rewards[i].otherData.PackId = configData[j].PackId curData.rewards[i].otherData.PackId = configData[j].PackId
curData.rewards[i].otherData.Sort = configData[j].Sort
curData.rewards[i].otherData.BuyDay = configData[j].BuyDay curData.rewards[i].otherData.BuyDay = configData[j].BuyDay
curData.rewards[i].otherData.Name = rechargeConfig[configData[j].PackId].Name curData.rewards[i].otherData.Name = rechargeConfig[configData[j].PackId].Name
curData.rewards[i].otherData.Reward = rechargeConfig[configData[j].PackId].RewardShow curData.rewards[i].otherData.Reward = rechargeConfig[configData[j].PackId].RewardShow
@ -153,7 +154,7 @@ local TypeUpdateFunc = {
end end
end end
table.sort(curData.rewards,function (a,b) table.sort(curData.rewards,function (a,b)
return a.otherData.PackId < b.otherData.PackId return a.otherData.Sort < b.otherData.Sort
end) end)
end, end,

View File

@ -8,7 +8,6 @@ local jewerLevelUpConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig)
local EquipTreasureData = require("Modules.RoleInfo.EquipTreasureData") local EquipTreasureData = require("Modules.RoleInfo.EquipTreasureData")
function this.Initialize() function this.Initialize()
this.TreasurePowerData = {}
end end
--初始化所有宝器数据 --初始化所有宝器数据
function this.InitAllEquipTreasure(_equipData) function this.InitAllEquipTreasure(_equipData)
@ -525,65 +524,21 @@ end
--计算战斗力 --计算战斗力
function this.CalculateWarForce(Did) function this.CalculateWarForce(Did)
-- Log("CalculateWarForce "..Did) local curTreasure = allTreasures[Did]
local power = 0 if not curTreasure then
if this.IsTreasureDirty(Did) then curTreasure = MonsterCampManager.GetSingleTreasureByIdDyn(Did)
local curTreasure = allTreasures[Did]
if not curTreasure then
curTreasure = MonsterCampManager.GetSingleTreasureByIdDyn(Did)
end
if not curTreasure then
curTreasure = ExpeditionManager.GetSingleTreasureByIdDyn(Did)
end
if not curTreasure then
curTreasure = GoodFriendManager.GetSingleTreasureByIdDyn(Did)
end
if curTreasure then
power = this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv, curTreasure.treeLv,curTreasure)
end
this.SetTreasurePower(Did, power)
this.SetTreasureDirty(Did, false)
else
if this.TreasurePowerData and this.TreasurePowerData[Did] then
power = this.TreasurePowerData[Did].power or 0
end
end end
return power if not curTreasure then
curTreasure = ExpeditionManager.GetSingleTreasureByIdDyn(Did)
end
if not curTreasure then
curTreasure = GoodFriendManager.GetSingleTreasureByIdDyn(Did)
end
if curTreasure then
return this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv, curTreasure.treeLv,curTreasure)
end
return 0
end end
-- 判断脏数据
function this.IsTreasureDirty(dId)
if not this.TreasurePowerData then
this.TreasurePowerData = {}
end
if not this.TreasurePowerData[dId] then
this.TreasurePowerData[dId] = {}
end
return this.TreasurePowerData[dId].isDirty ~= false
end
-- 设置脏数据
function this.SetTreasureDirty(dId, isDirty)
if not this.TreasurePowerData then
this.TreasurePowerData = {}
end
if not this.TreasurePowerData[dId] then
this.TreasurePowerData[dId] = {}
end
this.TreasurePowerData[dId].isDirty = isDirty ~= false
end
-- 设置宝物战斗力
function this.SetTreasurePower(dId, power)
if not this.TreasurePowerData then
this.TreasurePowerData = {}
end
if not this.TreasurePowerData[dId] then
this.TreasurePowerData[dId] = {}
end
this.TreasurePowerData[dId].power = power or 0
end
function this.CalculateWarForceBase(sId, lv, rlv, tlv,curTreasure) function this.CalculateWarForceBase(sId, lv, rlv, tlv,curTreasure)
-- LogGreen("sId:"..sId.." lv:"..lv.." rlv:"..rlv.." tlv:"..tlv) -- LogGreen("sId:"..sId.." lv:"..lv.." rlv:"..rlv.." tlv:"..tlv)
local curEuipTreaSureConfig = ConfigManager.GetConfigData(ConfigName.JewelConfig, sId) local curEuipTreaSureConfig = ConfigManager.GetConfigData(ConfigName.JewelConfig, sId)

View File

@ -143,6 +143,12 @@ function SurpriseBox:ShowSingleData(item,data,index)
end end
Util.AddOnceClick(getBtn,function () Util.AddOnceClick(getBtn,function ()
local actData = CommonActPageManager.GetData(ActivityTypeDef.SurpriseBox)
if not actData then
PopupTipPanel.ShowTip("活动已关闭")
self:ClosePanel()
return
end
if data.progress == 1 then--完成所有条件,可购买 if data.progress == 1 then--完成所有条件,可购买
PayManager.Pay(data.otherData.PackId, function(id) PayManager.Pay(data.otherData.PackId, function(id)
FirstRechargeManager.RefreshAccumRechargeValue(data.otherData.PackId) FirstRechargeManager.RefreshAccumRechargeValue(data.otherData.PackId)

View File

@ -69,10 +69,16 @@ end
--添加事件监听(用于子类重写) --添加事件监听(用于子类重写)
function XunBaoMiZong:AddListener() function XunBaoMiZong:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, self.UpdateGoldVal, self)
end end
--移除事件监听(用于子类重写) --移除事件监听(用于子类重写)
function XunBaoMiZong:RemoveListener() function XunBaoMiZong:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, self.UpdateGoldVal, self)
end
function XunBaoMiZong:UpdateGoldVal()
self:Refresh()
end end
function XunBaoMiZong:OnSortingOrderChange(_sortingOrder) function XunBaoMiZong:OnSortingOrderChange(_sortingOrder)

View File

@ -357,8 +357,8 @@ function UpView:RechargeType(_type)
JumpManager.GoJump(40014) JumpManager.GoJump(40014)
elseif _type == UpViewRechargeType.HuaLingFu then--跳灵兽特惠 elseif _type == UpViewRechargeType.HuaLingFu then--跳灵兽特惠
JumpManager.GoJump(40010) JumpManager.GoJump(40010)
elseif _type == UpViewRechargeType.XunBaoMiZong then--寻宝迷踪->主题活动日任务 elseif _type == UpViewRechargeType.XunBaoMiZong then--寻宝迷踪->惊喜礼盒
JumpManager.GoJump(40011) JumpManager.GoJump(36041)
elseif _type == UpViewRechargeType.GrowthAmulet or elseif _type == UpViewRechargeType.GrowthAmulet or
_type == UpViewRechargeType.Yaoh or _type == UpViewRechargeType.Yaoh or
_type == UpViewRechargeType.Panacea or _type == UpViewRechargeType.Panacea or

View File

@ -326,7 +326,6 @@ namespace GameEditor.FrameTool {
{ {
//if (!string.IsNullOrEmpty(versionPath) && Directory.Exists(versionPath)) //if (!string.IsNullOrEmpty(versionPath) && Directory.Exists(versionPath))
//{ //{
ClientConfigManager.Instance.SVN_Update();
m_Files = ClientConfigManager.Instance.GetVersionList();//Directory.GetFiles(versionPath, "*.txt", SearchOption.AllDirectories); m_Files = ClientConfigManager.Instance.GetVersionList();//Directory.GetFiles(versionPath, "*.txt", SearchOption.AllDirectories);
m_Choose = new bool[m_Files.Length]; m_Choose = new bool[m_Files.Length];
//} //}