Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public void OnDialogDecline(DialogDeclineEvent e, SingleNode <InviteToSquadDialogComponent> dialog, [JoinAll] SingleNode <SelfUserComponent> user)
 {
     object[] objArray1 = new object[] { "InviteToLobbySystem.OnDialogDecline ", user.Entity, " ", dialog.component.invite, " ", dialog.component.FromUserId, " ", dialog.component.EngineId };
     Debug.Log(string.Concat(objArray1));
     if (dialog.component.invite)
     {
         RejectInviteToSquadEvent eventInstance = new RejectInviteToSquadEvent {
             FromUserId = dialog.component.FromUserId,
             EngineId   = dialog.component.EngineId
         };
         base.ScheduleEvent(eventInstance, user);
     }
     else
     {
         RejectRequestToSquadEvent eventInstance = new RejectRequestToSquadEvent {
             FromUserId    = dialog.component.FromUserId,
             SquadId       = dialog.component.SquadId,
             SquadEngineId = dialog.component.EngineId
         };
         base.ScheduleEvent(eventInstance, user);
     }
 }