Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
9c76f42161
|
@ -264,11 +264,12 @@ end
|
||||||
|
|
||||||
function this.PokemonUnitAdapter(pokemonUnit,camp,_teamDamage)
|
function this.PokemonUnitAdapter(pokemonUnit,camp,_teamDamage)
|
||||||
-- 基础数据
|
-- 基础数据
|
||||||
|
--LogError("teamdamage=="..tonumber(pokemonUnit.forceScore))
|
||||||
local role = {
|
local role = {
|
||||||
id = tonumber(pokemonUnit.unitId),
|
id = tonumber(pokemonUnit.unitId),
|
||||||
position = tonumber(pokemonUnit.position),
|
position = tonumber(pokemonUnit.position),
|
||||||
star = tonumber(pokemonUnit.star),
|
star = tonumber(pokemonUnit.star),
|
||||||
teamDamage = _teamDamage,
|
teamDamage = tonumber(pokemonUnit.forceScore),
|
||||||
camp = camp,
|
camp = camp,
|
||||||
skill = {},
|
skill = {},
|
||||||
property = {},
|
property = {},
|
||||||
|
|
|
@ -310,6 +310,13 @@ function this.GetFormationPower(formationId)
|
||||||
ThinkingAnalyticsManager.SetSuperProperties({
|
ThinkingAnalyticsManager.SetSuperProperties({
|
||||||
fighting_capacity = power2,
|
fighting_capacity = power2,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- 刷新后端战斗力
|
||||||
|
if power2 > PlayerManager.maxForce then
|
||||||
|
Log("发送队伍战力改变 ~~~~~~~~~~~~~~ ")
|
||||||
|
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)--targetTeamId
|
||||||
|
PlayerManager.maxForce = power2
|
||||||
|
end
|
||||||
-- 编队战斗力刷新
|
-- 编队战斗力刷新
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationPowerChange, power2)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationPowerChange, power2)
|
||||||
return power2
|
return power2
|
||||||
|
@ -348,24 +355,9 @@ function this.CheckFormationHasId(formationId, heroId)
|
||||||
return has
|
return has
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 重新算一遍战斗力
|
||||||
function this.UserPowerChanged()
|
function this.UserPowerChanged()
|
||||||
|
this.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||||
local maxPower, targetTeamId = 0
|
|
||||||
-- for _, teamInfo in pairs(this.formationList) do
|
|
||||||
-- if #teamInfo.teamHeroInfos > 0 then
|
|
||||||
local curFormationWarPower = this.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)--teamInfo.teamId
|
|
||||||
if curFormationWarPower > maxPower then
|
|
||||||
maxPower = curFormationWarPower
|
|
||||||
-- targetTeamId = teamInfo.teamId
|
|
||||||
end
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
if maxPower > PlayerManager.maxForce then
|
|
||||||
Log("发送队伍战力改变 ~~~~~~~~~~~~~~ ")
|
|
||||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)--targetTeamId
|
|
||||||
PlayerManager.maxForce = maxPower
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 获取相应编队的血量数据
|
-- 获取相应编队的血量数据
|
||||||
|
|
Loading…
Reference in New Issue