四灵助战宝器修改宝器修改
parent
c3e2842f3a
commit
400512d4b5
|
|
@ -37,7 +37,6 @@ end
|
||||||
|
|
||||||
function this.InitFourMonsterData(msg)
|
function this.InitFourMonsterData(msg)
|
||||||
for i = 1 , #msg.info do
|
for i = 1 , #msg.info do
|
||||||
LogGreen("type:"..msg.info[i].type.." currentFloor:"..msg.info[i].currentFloor.." msg.info[i].remainTimes:"..msg.info[i].remainTimes.." overTime:"..msg.info[i].overTime)
|
|
||||||
local index = msg.info[i].type
|
local index = msg.info[i].type
|
||||||
this.fourMonsterData[index].monsterWave = msg.info[i].currentFloor
|
this.fourMonsterData[index].monsterWave = msg.info[i].currentFloor
|
||||||
this.fourMonsterData[index].canFightTime = msg.info[i].remainTimes
|
this.fourMonsterData[index].canFightTime = msg.info[i].remainTimes
|
||||||
|
|
@ -181,26 +180,11 @@ function this.StraightBattle(id,type,func,curType)
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
if result.result == 0 then
|
if result.result == 0 then
|
||||||
LogGreen(Language[10741])
|
|
||||||
elseif result.result == 1 then
|
elseif result.result == 1 then
|
||||||
this.fourMonsterData[curType].monsterWave = id
|
this.fourMonsterData[curType].monsterWave = id
|
||||||
-- LogGreen("前:".. this.fourMonsterData[curType].canFightTime)
|
|
||||||
-- this.fourMonsterData[curType].canFightTime = this.fourMonsterData[curType].canFightTime - 1
|
|
||||||
-- LogGreen("后:".. this.fourMonsterData[curType].canFightTime)
|
|
||||||
-- this.SaveFormation(curType)
|
|
||||||
-- UIManager.OpenPanel(UIName.BattleWinPopup, nil, false, BATTLE_TYPE.MONSTER_CAMP, result, true, true,function()
|
|
||||||
-- if this.fourMonsterData[curType].openState ~= 0 then
|
|
||||||
-- UIManager.OpenPanel(UIName.FourElementMonsterCampPanel,curType)
|
|
||||||
-- else
|
|
||||||
-- UIManager.OpenPanel(UIName.MonsterCampMainPanel)
|
|
||||||
-- end
|
|
||||||
-- end)
|
|
||||||
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
|
||||||
-- end)
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
LogGreen(#msg.drop.itemlist)
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
|
|
@ -252,13 +236,12 @@ end
|
||||||
------------------------------四灵试炼 助战---------------------------------------
|
------------------------------四灵试炼 助战---------------------------------------
|
||||||
|
|
||||||
--创建一个英雄信息
|
--创建一个英雄信息
|
||||||
function this.UpdateHeroDatas(_msgHeroData)
|
function this.UpdateHeroDatas(_msgHeroData,_msgPlayerData)
|
||||||
local heroData = {}
|
local heroData = {}
|
||||||
heroData.soulPrintList={}
|
heroData.soulPrintList={}
|
||||||
heroData.heroBackData=_msgHeroData
|
heroData.heroBackData=_msgHeroData
|
||||||
heroData.dynamicId = _msgHeroData.id
|
heroData.dynamicId = _msgHeroData.id
|
||||||
local _id = _msgHeroData.heroId
|
local _id = _msgHeroData.heroId
|
||||||
LogYellow("_id:".._id)
|
|
||||||
heroData.id = _id
|
heroData.id = _id
|
||||||
heroData.star = _msgHeroData.star
|
heroData.star = _msgHeroData.star
|
||||||
heroData.lv = _msgHeroData.level--30
|
heroData.lv = _msgHeroData.level--30
|
||||||
|
|
@ -288,7 +271,6 @@ function this.UpdateHeroDatas(_msgHeroData)
|
||||||
|
|
||||||
heroData.heroViewConfig=heroViewConfig[_id]
|
heroData.heroViewConfig=heroViewConfig[_id]
|
||||||
heroData.maxStar=_configData.MaxRank
|
heroData.maxStar=_configData.MaxRank
|
||||||
--Log(heroData.heroViewConfig.ReadingName.." _msgHeroData.starBreakId ".._msgHeroData.starBreakId)
|
|
||||||
local actionPowerRormula= gameSetting[1].ActionPowerRormula
|
local actionPowerRormula= gameSetting[1].ActionPowerRormula
|
||||||
heroData.actionPower=heroData.heroViewConfig.ActionPower+math.floor(((actionPowerRormula[1] * math.pow(heroData.lv, 3) + actionPowerRormula[2] * math.pow(heroData.lv, 2) + actionPowerRormula[3] * heroData.lv + actionPowerRormula[4])))--_msgHeroData.actionPower
|
heroData.actionPower=heroData.heroViewConfig.ActionPower+math.floor(((actionPowerRormula[1] * math.pow(heroData.lv, 3) + actionPowerRormula[2] * math.pow(heroData.lv, 2) + actionPowerRormula[3] * heroData.lv + actionPowerRormula[4])))--_msgHeroData.actionPower
|
||||||
heroData.equipIdList=_msgHeroData.equipIdList
|
heroData.equipIdList=_msgHeroData.equipIdList
|
||||||
|
|
@ -296,7 +278,7 @@ function this.UpdateHeroDatas(_msgHeroData)
|
||||||
EquipManager.SetEquipUpHeroDid(heroData.equipIdList[i],heroData.dynamicId)
|
EquipManager.SetEquipUpHeroDid(heroData.equipIdList[i],heroData.dynamicId)
|
||||||
end
|
end
|
||||||
heroData.jewels=_msgHeroData.jewels
|
heroData.jewels=_msgHeroData.jewels
|
||||||
this.InitBaoDatas(heroData.jewels)
|
this.InitBaoDatas(_msgPlayerData.jewels)
|
||||||
for i = 1 , #heroData.jewels do
|
for i = 1 , #heroData.jewels do
|
||||||
this.SetEquipTreasureUpHeroDid(heroData.jewels[i],heroData.dynamicId)
|
this.SetEquipTreasureUpHeroDid(heroData.jewels[i],heroData.dynamicId)
|
||||||
end
|
end
|
||||||
|
|
@ -353,7 +335,6 @@ function this.InitSingleTreasureData(_singleData)
|
||||||
end
|
end
|
||||||
local single={}
|
local single={}
|
||||||
local staticId=_singleData.equipId
|
local staticId=_singleData.equipId
|
||||||
LogGreen(staticId)
|
|
||||||
local currJewel=jewelConfig[staticId]
|
local currJewel=jewelConfig[staticId]
|
||||||
single.id=staticId
|
single.id=staticId
|
||||||
single.idDyn=_singleData.id
|
single.idDyn=_singleData.id
|
||||||
|
|
@ -379,7 +360,6 @@ function this.InitSingleTreasureData(_singleData)
|
||||||
single.icon=GetResourcePath(itemConfig[staticId].ResourceID)
|
single.icon=GetResourcePath(itemConfig[staticId].ResourceID)
|
||||||
single.strongConfig=this.GetCurrTreasureLvConfig(1,currJewel.LevelupPool,_singleData.exp)
|
single.strongConfig=this.GetCurrTreasureLvConfig(1,currJewel.LevelupPool,_singleData.exp)
|
||||||
single.refineConfig=this.GetCurrTreasureLvConfig(2,currJewel.RankupPool,_singleData.rebuildLevel)
|
single.refineConfig=this.GetCurrTreasureLvConfig(2,currJewel.RankupPool,_singleData.rebuildLevel)
|
||||||
--LogGreen("天宫推送宝器 _singleData.id ".._singleData.id)
|
|
||||||
this.allTreasures[_singleData.id]=single
|
this.allTreasures[_singleData.id]=single
|
||||||
end
|
end
|
||||||
local jewerLevelUpConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig)
|
local jewerLevelUpConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig)
|
||||||
|
|
@ -397,7 +377,6 @@ function this.GetSingleTreasureByIdDyn(_idDyn)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
return this.allTreasures[_idDyn]
|
return this.allTreasures[_idDyn]
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--设置装备穿戴的英雄
|
--设置装备穿戴的英雄
|
||||||
|
|
@ -417,8 +396,7 @@ function this.GetFriendHelpHeros(trailType,func)
|
||||||
end
|
end
|
||||||
local tempdata = {}
|
local tempdata = {}
|
||||||
tempdata.player = v
|
tempdata.player = v
|
||||||
tempdata.hero = this.UpdateHeroDatas(v.hero)
|
tempdata.hero = this.UpdateHeroDatas(v.hero,v)
|
||||||
LogGreen("好友的助战数据 v.trailType:"..v.trailType.." v.hero.id:"..v.hero.id .. " v.hero.dynamicId:" ..v.hero.id)
|
|
||||||
table.insert(this.friendHelpHeros[v.trailType],tempdata)
|
table.insert(this.friendHelpHeros[v.trailType],tempdata)
|
||||||
end
|
end
|
||||||
if func then
|
if func then
|
||||||
|
|
@ -436,14 +414,12 @@ end
|
||||||
function this.SetFriendHelpHero(helpFightList,trailType)
|
function this.SetFriendHelpHero(helpFightList,trailType)
|
||||||
if not trailType then
|
if not trailType then
|
||||||
this.friendHelpHero = {}
|
this.friendHelpHero = {}
|
||||||
--LogGreen("helpFightList"..#helpFightList)
|
|
||||||
for k,v in ipairs(helpFightList) do
|
for k,v in ipairs(helpFightList) do
|
||||||
--LogGreen("this.friendHelpHero[v.trailType]".." trailType:"..tostring(v.trailType).." v.hero.dynamicId:" ..v.hero.id)
|
|
||||||
if not this.friendHelpHero[v.trailType] then
|
if not this.friendHelpHero[v.trailType] then
|
||||||
this.friendHelpHero[v.trailType] = {}
|
this.friendHelpHero[v.trailType] = {}
|
||||||
end
|
end
|
||||||
this.friendHelpHero[v.trailType].player = v
|
this.friendHelpHero[v.trailType].player = v
|
||||||
this.friendHelpHero[v.trailType].hero = this.UpdateHeroDatas(v.hero)
|
this.friendHelpHero[v.trailType].hero = this.UpdateHeroDatas(v.hero,v)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if not this.friendHelpHero then
|
if not this.friendHelpHero then
|
||||||
|
|
@ -455,7 +431,7 @@ function this.SetFriendHelpHero(helpFightList,trailType)
|
||||||
end
|
end
|
||||||
if helpFightList then
|
if helpFightList then
|
||||||
this.friendHelpHero[trailType].player = helpFightList
|
this.friendHelpHero[trailType].player = helpFightList
|
||||||
this.friendHelpHero[trailType].hero = this.UpdateHeroDatas(helpFightList.hero)
|
this.friendHelpHero[trailType].hero = this.UpdateHeroDatas(helpFightList.hero,helpFightList)
|
||||||
else
|
else
|
||||||
this.friendHelpHero[trailType] = nil
|
this.friendHelpHero[trailType] = nil
|
||||||
end
|
end
|
||||||
|
|
@ -490,7 +466,6 @@ function this.SetMyHelpHeroData(trail,_data,func)
|
||||||
if not this.myHelpHeroData[v.trailType] then
|
if not this.myHelpHeroData[v.trailType] then
|
||||||
this.myHelpHeroData[v.trailType] = {}
|
this.myHelpHeroData[v.trailType] = {}
|
||||||
end
|
end
|
||||||
LogGreen("我的助战数据 v.trailType:"..v.trailType.." v.hero.id:"..v.hero.id)
|
|
||||||
this.myHelpHeroData[v.trailType] = HeroManager.GetSingleHeroData(v.hero.id)
|
this.myHelpHeroData[v.trailType] = HeroManager.GetSingleHeroData(v.hero.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -522,7 +497,6 @@ end
|
||||||
--获取我的助战
|
--获取我的助战
|
||||||
function this.GetMyHelpHero(trailType)
|
function this.GetMyHelpHero(trailType)
|
||||||
if this.myHelpHeroData[trailType] then
|
if this.myHelpHeroData[trailType] then
|
||||||
--LogGreen(this.myHelpHeroData[trailType].dynamicId)
|
|
||||||
return this.myHelpHeroData[trailType]
|
return this.myHelpHeroData[trailType]
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -626,11 +600,9 @@ function this.CheckHelpFightRedPoint(redType)
|
||||||
end
|
end
|
||||||
if this.fourMonsterData[4] and this.fourMonsterData[4].openState > 0 then
|
if this.fourMonsterData[4] and this.fourMonsterData[4].openState > 0 then
|
||||||
if not this.GetMyHelpHero(4) then
|
if not this.GetMyHelpHero(4) then
|
||||||
LogGreen("道玄 红点开了")
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
LogGreen("道玄 红点关了")
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue