public override void UpdateStatus(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)) { entityStatus2.AddAdditionalCompanion(companionStatus); AbstractPlayerUIRework view = entityStatus2.view; if (null != view) { view.AddAdditionalCompanionStatus(entityStatus, companionDefId, companionStatus.level); } } else { Log.Error(FightEventErrors.PlayerNotFound(toPlayerId, toFightId), 30, "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), 35, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionGivenEvent.cs"); } } else { Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 40, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionGivenEvent.cs"); } }