public void ShowInviteDialog(InvitedToSquadEvent e, NotBattleUser selfUser, [JoinAll] DialogsNode dialogs, [JoinAll] Optional <SingleNode <EulaNotificationComponent> > eulaNotification, [JoinAll] Optional <SingleNode <PrivacyPolicyNotificationComponent> > ppNotification) { if (!eulaNotification.IsPresent() && !ppNotification.IsPresent()) { object[] objArray1 = new object[] { "InviteToLobbySystem.ShowInviteDialog ", selfUser.Entity, " UserUid=", e.UserUid, " FromUserId=", e.FromUserId, " EngineId=", e.EngineId }; Debug.Log(string.Concat(objArray1)); this.ShowInviteDialog(selfUser, e.EngineId, e.UserUid, e.FromUserId, dialogs); } }
public void ShowInviteDialog(InvitedToLobbyEvent e, SingleNode <SelfUserComponent> user, [JoinAll] DialogsNode dialogs, [JoinAll] Optional <LobbyNode> lobby, [JoinAll] Optional <SingleNode <SelfBattleUserComponent> > selfBattleUser, [JoinAll] Optional <SingleNode <EulaNotificationComponent> > eulaNotification, [JoinAll] Optional <SingleNode <PrivacyPolicyNotificationComponent> > ppNotification) { InviteToLobbyDialogComponent component = dialogs.dialogs60.Get <InviteToLobbyDialogComponent>(); if (((((component != null) && (MainScreenComponent.Instance != null)) && !component.gameObject.activeSelf) && (!lobby.IsPresent() || (lobby.Get().Entity.Id != e.lobbyId))) && (!eulaNotification.IsPresent() && !ppNotification.IsPresent())) { component.engineId = e.engineId; component.lobbyId = e.lobbyId; string messageText = !user.Entity.HasComponent <SquadGroupComponent>() ? ((string)component.messageForSingleUser) : (!user.Entity.HasComponent <SquadLeaderComponent>() ? ((string)component.messageForSquadMember) : ((string)component.messageForSquadLeader)); messageText = messageText.Replace("{0}", e.userUid); dialogs.dialogs60.Get <NotificationsStackContainerComponent>().CreateNotification(component.gameObject).GetComponent <InviteToLobbyDialogComponent>().GetComponent <InviteDialogComponent>().Show(messageText, selfBattleUser.IsPresent()); } }
public void OnLobbyError(BattleLobbyEnterToBattleErrorEvent e, SingleNode <SelfUserComponent> user, [JoinAll] DialogsNode dialogs) { dialogs.dialogs60.Get <EnterToBattleErrorDialog>().Show(); }
private void ShowRequestDialog(SelfUserNode user, long engineId, string userUid, long fromUserId, long squadId, DialogsNode dialogs) { InviteToSquadDialogComponent window = dialogs.dialogs60.Get <InviteToSquadDialogComponent>(); if (!this.CanShowInviteWindow(window)) { RejectRequestToSquadEvent eventInstance = new RejectRequestToSquadEvent { FromUserId = fromUserId, SquadId = squadId, SquadEngineId = engineId }; base.ScheduleEvent(eventInstance, user); } else { InviteToSquadDialogComponent component = dialogs.dialogs60.Get <NotificationsStackContainerComponent>().CreateNotification(window.gameObject).GetComponent <InviteToSquadDialogComponent>(); component.FromUserId = fromUserId; component.EngineId = engineId; component.SquadId = squadId; component.Show(userUid, false, false); } }
public void ShowRequestDialog(RequestedToSquadEvent e, NotBattleUser selfUser, [JoinAll] DialogsNode dialogs, [JoinAll] Optional <SingleNode <EulaNotificationComponent> > eulaNotification, [JoinAll] Optional <SingleNode <PrivacyPolicyNotificationComponent> > ppNotification) { if (!eulaNotification.IsPresent() && !ppNotification.IsPresent()) { object[] objArray1 = new object[10]; objArray1[0] = "InviteToLobbySystem.ShowRequestDialog "; objArray1[1] = selfUser.Entity; objArray1[2] = " UserUid="; objArray1[3] = e.UserUid; objArray1[4] = " FromUserId="; objArray1[5] = e.FromUserId; objArray1[6] = " EngineId="; objArray1[7] = e.EngineId; objArray1[8] = " SquadId="; objArray1[9] = e.SquadId; Debug.Log(string.Concat(objArray1)); this.ShowRequestDialog(selfUser, e.EngineId, e.UserUid, e.FromUserId, e.SquadId, dialogs); } }