Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
gaoxin 2021-11-03 17:44:08 +08:00
commit 29df41d399
2 changed files with 11 additions and 2 deletions

View File

@ -107,6 +107,7 @@ function HongMengEnvoyPanel:BindEvent()
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.UpdateGongMingLv)
CheckRedPointStatus(RedPointType.HongMeng_UpTower)
HeroPropManager.SetFormationDirtyByType(FormationTypeDef.FORMATION_NORMAL,Hero_Prop_Type.Base)
HarmonyManager.WarPowerChangeNotify()
end)
else

View File

@ -418,7 +418,7 @@ function this.NewHeroProp(dId, powerType, propList)
this.IsHeroDirty[dId][powerType] = false
end
-- 设置脏数据
-- 设置单个神将某一类型属性为脏数据
function this.SetDirtyByType(dId, powerType)
if not this.IsHeroDirty[dId] then
this.IsHeroDirty[dId] = {}
@ -429,13 +429,21 @@ function this.SetDirtyByType(dId, powerType)
HeroPowerManager.SetPowerDirty(dId)
end
-- 设置某编队全部神将某一类型属性为脏数据
function this.SetFormationDirtyByType(formationType,powerType)
local herodata = FormationManager.GetFormationByID(formationType)--FormationTypeDef.FORMATION_NORMAL)
for k,v in pairs(herodata.teamHeroInfos) do
this.SetDirtyByType(v.heroId, powerType)
end
end
-- 将整个人置为脏数据
function this.SetHeroDirty(dId)
this.IsHeroDirty[dId] = {}
-- 战斗力需要重新计算
HeroPowerManager.SetPowerDirty(dId)
end
-- 将个人某个数据置为脏数据
-- 将所有人某个数据置为脏数据
function this.SetAllHeroDirtyByType(powerType)
for dId, data in pairs(this.IsHeroDirty) do
data[powerType] = true