コード例 #1
0
        // Token: 0x0600D09F RID: 53407 RVA: 0x00392BD0 File Offset: 0x00390DD0
        private void InviteNotifyUIController_OnRefuse()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InviteNotifyUIController_OnRefuse_hotfix != null)
            {
                this.m_InviteNotifyUIController_OnRefuse_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ProjectLPlayerContext playerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            if (this.m_inviteInfo.TeamRoomInviteInfo != null)
            {
                TeamRoomInviteInfo inviteInfo = this.m_inviteInfo.TeamRoomInviteInfo;
                TeamRoomInvitationRefusedNetTask teamRoomInvitationRefusedNetTask = new TeamRoomInvitationRefusedNetTask(inviteInfo.SessionId, inviteInfo.ChannelId, inviteInfo.RoomId);
                teamRoomInvitationRefusedNetTask.EventOnStop += delegate(Task task)
                {
                    playerContext.RemoveTeamRoomAInviteInfo(inviteInfo.SessionId, inviteInfo.RoomId);
                    TeamRoomInvitationRefusedNetTask teamRoomInvitationRefusedNetTask2 = task as TeamRoomInvitationRefusedNetTask;
                    if (teamRoomInvitationRefusedNetTask2.Result != 0)
                    {
                        CommonUIController.Instance.ShowErrorMessage(teamRoomInvitationRefusedNetTask2.Result, 2f, null, true);
                    }
                    if (this.NextInviteInfo())
                    {
                        this.UpdateView();
                    }
                    else
                    {
                        this.CloseAndPause();
                    }
                };
                teamRoomInvitationRefusedNetTask.Start(null);
            }
            else if (this.m_inviteInfo.PVPInviteInfo != null)
            {
                PVPInviteInfo inviteInfo = this.m_inviteInfo.PVPInviteInfo;
                BattlePracticeDeclineNetTask battlePracticeDeclineNetTask = new BattlePracticeDeclineNetTask(inviteInfo.Inviter.UserId);
                battlePracticeDeclineNetTask.EventOnStop += delegate(Task task)
                {
                    playerContext.RemovePVPInviteInfo(inviteInfo.Inviter.UserId);
                    BattlePracticeDeclineNetTask battlePracticeDeclineNetTask2 = task as BattlePracticeDeclineNetTask;
                    if (battlePracticeDeclineNetTask2.Result != 0)
                    {
                        CommonUIController.Instance.ShowErrorMessage(battlePracticeDeclineNetTask2.Result, 2f, null, true);
                    }
                    if (this.NextInviteInfo())
                    {
                        this.UpdateView();
                    }
                    else
                    {
                        this.CloseAndPause();
                    }
                };
                battlePracticeDeclineNetTask.Start(null);
            }
        }
コード例 #2
0
    public static int get_Timeout(IntPtr l)
    {
        int result;

        try
        {
            PVPInviteInfo pvpinviteInfo = (PVPInviteInfo)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, pvpinviteInfo.Timeout);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #3
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            PVPInviteInfo o = new PVPInviteInfo();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #4
0
    public static int set_Inviter(IntPtr l)
    {
        int result;

        try
        {
            PVPInviteInfo pvpinviteInfo = (PVPInviteInfo)LuaObject.checkSelf(l);
            UserSummary   inviter;
            LuaObject.checkType <UserSummary>(l, 2, out inviter);
            pvpinviteInfo.Inviter = inviter;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #5
0
    public static int set_Timeout(IntPtr l)
    {
        int result;

        try
        {
            PVPInviteInfo pvpinviteInfo = (PVPInviteInfo)LuaObject.checkSelf(l);
            DateTime      timeout;
            LuaObject.checkValueType <DateTime>(l, 2, out timeout);
            pvpinviteInfo.Timeout = timeout;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #6
0
        // Token: 0x0600D033 RID: 53299 RVA: 0x003910B0 File Offset: 0x0038F2B0
        public void SetPVPInviteInfo(PVPInviteInfo info, int count, bool isBattle)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetPVPInviteInfoPVPInviteInfoInt32Boolean_hotfix != null)
            {
                this.m_SetPVPInviteInfoPVPInviteInfoInt32Boolean_hotfix.call(new object[]
                {
                    this,
                    info,
                    count,
                    isBattle
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            this.m_playerNameText.text  = info.Inviter.Name;
            this.m_playerLevelText.text = info.Inviter.Level.ToString();
            this.m_battleNameText.text  = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Friend_PVPInviteNotify);
            this.m_countText.text       = count.ToString();
            this.m_acceptButton.gameObject.SetActive(!isBattle);
            this.UpdateBackgroundButtonActive();
        }
コード例 #7
0
        // Token: 0x0600D09E RID: 53406 RVA: 0x00392A4C File Offset: 0x00390C4C
        private void InviteNotifyUIController_OnAccept()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InviteNotifyUIController_OnAccept_hotfix != null)
            {
                this.m_InviteNotifyUIController_OnAccept_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (CommonUIController.Instance.IsAnyDisableInput() || CommonUIController.Instance.IsFading())
            {
                return;
            }
            ProjectLPlayerContext playerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            if (this.m_inviteInfo.TeamRoomInviteInfo != null)
            {
                TeamRoomInviteInfo  inviteInfo          = this.m_inviteInfo.TeamRoomInviteInfo;
                TeamRoomJoinNetTask teamRoomJoinNetTask = new TeamRoomJoinNetTask(inviteInfo.RoomId, (GameFunctionType)inviteInfo.GameFunctionTypeId, inviteInfo.LocationId, inviteInfo.SessionId);
                teamRoomJoinNetTask.EventOnStop += delegate(Task task)
                {
                    playerContext.RemoveTeamRoomAInviteInfo(inviteInfo.SessionId, inviteInfo.RoomId);
                    TeamRoomJoinNetTask teamRoomJoinNetTask2 = task as TeamRoomJoinNetTask;
                    if (teamRoomJoinNetTask2.Result == 0)
                    {
                        ChatUITask.PauseUITask();
                        this.StartTeamRoomInfoUITask();
                        this.CloseAndPause();
                    }
                    else
                    {
                        if (this.NextInviteInfo())
                        {
                            this.UpdateView();
                        }
                        else
                        {
                            this.CloseAndPause();
                        }
                        if (teamRoomJoinNetTask2.Result == -3007)
                        {
                            CommonUIController.Instance.ShowMessage(StringTableId.StringTableId_Team_LocationLock, 2f, null, true);
                        }
                        else if (teamRoomJoinNetTask2.Result == -3018 || teamRoomJoinNetTask2.Result == -3006 || teamRoomJoinNetTask2.Result == -3016 || teamRoomJoinNetTask2.Result == -3003)
                        {
                            CommonUIController.Instance.ShowMessage(StringTableId.StringTableId_Team_NoTeamRoom, 2f, null, true);
                        }
                        else
                        {
                            WorldUITask.HandleAttackFailResult(teamRoomJoinNetTask2.Result, this.m_currIntent);
                        }
                    }
                };
                teamRoomJoinNetTask.Start(null);
            }
            else if (this.m_inviteInfo.PVPInviteInfo != null)
            {
                PVPInviteInfo inviteInfo = this.m_inviteInfo.PVPInviteInfo;
                BattlePracticeAcceptNetTask battlePracticeAcceptNetTask = new BattlePracticeAcceptNetTask(inviteInfo.Inviter.UserId);
                battlePracticeAcceptNetTask.EventOnStop += delegate(Task task)
                {
                    playerContext.RemovePVPInviteInfo(inviteInfo.Inviter.UserId);
                    BattlePracticeAcceptNetTask battlePracticeAcceptNetTask2 = task as BattlePracticeAcceptNetTask;
                    if (battlePracticeAcceptNetTask2.Result != 0)
                    {
                        CommonUIController.Instance.ShowErrorMessage(battlePracticeAcceptNetTask2.Result, 2f, null, true);
                    }
                    if (this.NextInviteInfo())
                    {
                        this.UpdateView();
                    }
                    else
                    {
                        this.CloseAndPause();
                    }
                };
                battlePracticeAcceptNetTask.Start(null);
            }
        }