Merge branch 'master_xma_local' into master_xma_test
commit
9a487bd4c2
|
|
@ -441,7 +441,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
|
|||
fightData.enemyData[i].outData = data2.specialPassive
|
||||
-- 灵兽数据
|
||||
fightData.enemyData[i].monsterList ={}
|
||||
if data.pokemonUnitList then
|
||||
if data2.pokemonUnitList then
|
||||
for k = 1, #data2.pokemonUnitList do
|
||||
fightData.enemyData[i].monsterList[k] = this.PokemonUnitAdapter(data2.pokemonUnitList[k],1)
|
||||
end
|
||||
|
|
@ -985,7 +985,7 @@ end
|
|||
-- 通过接口获取战斗数据
|
||||
function this.RequestBattleDataByFightId(fightId, func)
|
||||
local uid = string.split(fightId, "_")[1]
|
||||
local requestUrl = string.format("http://60.1.1.244:8888/req/getFightRecord?uid=%s&fightid=%s", uid, fightId)
|
||||
local requestUrl = string.format("http://119.28.114.198:8888/req/getFightRecord?uid=%s&fightid=%s", uid, fightId)
|
||||
LogGreen(requestUrl)
|
||||
networkMgr:SendGetHttp(requestUrl, function(str)
|
||||
LogGreen(str)
|
||||
|
|
|
|||
|
|
@ -931,7 +931,14 @@ function BattleUtil.CheckIsHit(atkRole, defRole,skill)
|
|||
end
|
||||
|
||||
|
||||
|
||||
--获取table的长度
|
||||
function BattleUtil.LengthOfTable(table)
|
||||
local length = 0
|
||||
for i, v in pairs(table) do
|
||||
length = length + 1
|
||||
end
|
||||
return length
|
||||
end
|
||||
|
||||
function BattleUtil.RandomAction(rand, action)
|
||||
if Random.Range01() <= rand and action then
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ function MSkill:Cast(func)
|
|||
--放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26
|
||||
--为解决攻击目标只剩被放逐的单位导致技能播放异常
|
||||
self.effectCaster:ChooseTarget()
|
||||
local targets=LengthOfTable(self:GetDirectTargetsNoExile())
|
||||
local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile())
|
||||
if targets==0 and self.castDoneFunc then
|
||||
self.castDoneFunc()
|
||||
return
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ function Skill:Cast(func)
|
|||
--放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26
|
||||
--为解决攻击目标只剩被放逐的单位导致技能播放异常
|
||||
self.effectCaster:ChooseTarget()
|
||||
local targets=LengthOfTable(self:GetDirectTargetsNoExile())
|
||||
local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile())
|
||||
if targets==0 and self.castDoneFunc then
|
||||
self.isRage=false
|
||||
self.castDoneFunc()
|
||||
|
|
|
|||
|
|
@ -559,9 +559,10 @@ function RoleInfoLayout:DeleteLvUpMaterials(isSingleLvUp,msg)
|
|||
local allAddProValOld = allAddProVal
|
||||
parent:UpdateHeroInfoData()--刷新界面
|
||||
this.ShowProAddVal(allAddProValOld)
|
||||
|
||||
parent.upLvEffect:SetActive(false)
|
||||
parent.upLvEffect:SetActive(true)
|
||||
if isSingleLvUp then
|
||||
parent.upLvEffect:SetActive(false)
|
||||
parent.upLvEffect:SetActive(true)
|
||||
end
|
||||
-- _isReqLvUp = false
|
||||
Timer.New(function()
|
||||
_isReqLvUp = false
|
||||
|
|
@ -585,6 +586,8 @@ function RoleInfoLayout:DeleteLvUpMaterials2(msg)
|
|||
HeroManager.UpdateSingleHeroDatas(curHeroData.dynamicId,curHeroData.lv,curHeroData.star,curHeroData.breakId,curHeroData.upStarId,true)
|
||||
end
|
||||
parent:UpdateHeroInfoData()--刷新界面
|
||||
parent.upLvEffect:SetActive(false)
|
||||
parent.upLvEffect:SetActive(true)
|
||||
end
|
||||
--长按升级处理
|
||||
function this.OnUpdate()
|
||||
|
|
|
|||
Loading…
Reference in New Issue