public static uint Get_BloodTH(ActorRoot actor) { if (actor == null || actor.ValueComponent == null) { return(0u); } return(BurnExpeditionUT.Get_BloodTH((uint)actor.ValueComponent.actorHp, (uint)actor.ValueComponent.actorHpTotal)); }
public static void Build_Burn_BattleParam(COMDT_SINGLE_GAME_PARAM param, bool bClickGameOver) { param.bGameType = 7; PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA(); if (hostKDA == null) { DebugHelper.Assert(hostKDA != null, "Failed find player kda"); Singleton <BattleStatistic> .instance.m_playerKDAStat.DumpDebugInfo(); return; } ListView <HeroKDA> .Enumerator enumerator = hostKDA.GetEnumerator(); if (!bClickGameOver) { while (enumerator.MoveNext()) { int configId = enumerator.Current.actorHero.handle.TheActorMeta.ConfigId; Singleton <BurnExpeditionController> .GetInstance().model.SetHero_Hp((uint)configId, (int)BurnExpeditionUT.Get_BloodTH(enumerator.Current.actorHero.handle)); } } param.stGameDetail.stBurning = new COMDT_BURNING_ENEMY_HERO_DETAIL(); COMDT_BURNING_HERO_INFO[] astHeroList = param.stGameDetail.stBurning.astHeroList; List <PoolObjHandle <ActorRoot> > heroActors = Singleton <GameObjMgr> .GetInstance().HeroActors; int num = 0; for (int i = 0; i < heroActors.get_Count(); i++) { ActorRoot handle = heroActors.get_Item(i).handle; if (!handle.IsHostCamp()) { astHeroList[num].dwHeroID = (uint)handle.TheActorMeta.ConfigId; bool flag = handle.ValueComponent.actorHp == 0; uint num2; byte bIsDead; if (flag) { num2 = 0u; bIsDead = 1; } else { num2 = BurnExpeditionUT.Get_BloodTH(handle); bIsDead = 0; } astHeroList[num].dwBloodTTH = num2; astHeroList[num].bIsDead = bIsDead; if (!bClickGameOver) { BurnExpeditionUT.Record_EnemyHero_HPInfo(handle.TheActorMeta.ConfigId, num2); } num++; } } param.stGameDetail.stBurning.bHeroNum = (byte)num; }