public override IEnumerator UpdateView(FightStatus fightStatus) { if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus)) { if (entityStatus.TryGetCompanion(companionDefId, out ReserveCompanionStatus companionStatus)) { if (FightLogicExecutor.GetFightStatus(toFightId).TryGetEntity(toPlayerId, out PlayerStatus entityStatus2)) { AbstractPlayerUIRework view = entityStatus2.view; if (null != view) { yield return(view.AddAdditionalCompanion(entityStatus, companionDefId, companionStatus.level)); } } else { Log.Error(FightEventErrors.PlayerNotFound(toPlayerId, toFightId), 62, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionGivenEvent.cs"); } } else { Log.Error(FightEventErrors.ReserveCompanionNotFound(companionDefId, concernedEntity), 67, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionGivenEvent.cs"); } } else { Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 72, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionGivenEvent.cs"); } }