public override void UpdateStatus(FightStatus fightStatus) { if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus)) { if (!entityStatus.TryGetCompanion(companionDefId, out ReserveCompanionStatus companionStatus)) { Log.Error(FightEventErrors.ReserveCompanionNotFound(companionDefId, concernedEntity), 19, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionReserveStateChangedEvent.cs"); } m_wasGiven = companionStatus.isGiven; if (m_wasGiven && state == CompanionReserveState.Dead) { entityStatus.RemoveAdditionalCompanion(companionDefId); } else { companionStatus.SetState(state); } AbstractPlayerUIRework view = entityStatus.view; if (null != view) { if (m_wasGiven && state == CompanionReserveState.Dead) { view.RemoveAdditionalCompanionStatus(companionDefId); } else { view.ChangeCompanionStateStatus(companionDefId, state); } } } else { Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 48, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionReserveStateChangedEvent.cs"); } }