public override IEnumerator UpdateView(FightStatus fightStatus) { if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus)) { IObjectWithArmoredLife objectWithArmoredLife; if ((objectWithArmoredLife = (entityStatus.view as IObjectWithArmoredLife)) != null) { objectWithArmoredLife.SetBaseLife(maxLifeAfter); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithArmoredLife>(entityStatus), 37, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MaxLifeChangedEvent.cs"); } if (entityStatus.type == EntityType.Hero) { HeroStatus heroStatus = (HeroStatus)entityStatus; if (heroStatus.ownerId == fightStatus.localPlayerId) { FightMap current = FightMap.current; if (null != current) { current.SetLocalPlayerHeroLife(heroStatus.life, maxLifeAfter); } } if (fightStatus.TryGetEntity(heroStatus.ownerId, out PlayerStatus entityStatus2)) { AbstractPlayerUIRework view = entityStatus2.view; if (null != view) { view.ChangeHeroBaseLifePoints(maxLifeAfter); } } else { Log.Error(FightEventErrors.PlayerNotFound(heroStatus.ownerId), 62, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MaxLifeChangedEvent.cs"); } } } else { Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 68, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MaxLifeChangedEvent.cs"); } FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.LifeArmorChanged); yield break; }