Пример #1
0
 public static void Handler(GC_RET_MARRAGE packet)
 {
     if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_ASKMARRY && packet.Id != GlobeVar.INVALID_GUID)
     {
         string strTarget = "";
         if (GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID == GlobeVar.INVALID_ID)
         {
             return;
         }
         for (int i = 0; i < GlobeVar.MAX_TEAM_MEMBER; ++i)
         {
             TeamMember tm = GameManager.gameManager.PlayerDataPool.TeamInfo.GetTeamMember(i);
             if (null != tm && true == tm.IsValid() && tm.Guid == packet.Id)
             {
                 strTarget = tm.MemberName;
             }
         }
         MarryRootLogic.m_SavedGUID = packet.Id;
         //MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1415}", strTarget),"求婚",
         MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1415}", strTarget),
                                         StrDictionary.GetClientDictionaryString("#{2864}"), ConfirmPromise, CancelNone);
     }
     else if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_CONFIRM && packet.Id != GlobeVar.INVALID_GUID)
     {
         string strTarget = "";
         if (GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID == GlobeVar.INVALID_ID)
         {
             return;
         }
         for (int i = 0; i < GlobeVar.MAX_TEAM_MEMBER; ++i)
         {
             TeamMember tm = GameManager.gameManager.PlayerDataPool.TeamInfo.GetTeamMember(i);
             if (null != tm && true == tm.IsValid() && tm.Guid == packet.Id)
             {
                 strTarget = tm.MemberName;
             }
         }
         MarryRootLogic.m_SavedGUID = packet.Id;
         MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1416}", strTarget),
                                         StrDictionary.GetClientDictionaryString("#{2864}"), RetPromiseOK, RetPromiseCancel, GlobeVar.INVALID_ID, MessageBoxLogic.PASSWORD.MARRYROOT);
     }
     else if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_CANCEL && packet.Id != GlobeVar.INVALID_GUID)
     {
         if (MarryRootLogic.m_SavedGUID == packet.Id)
         {
             MarryRootLogic.m_SavedGUID = GlobeVar.INVALID_GUID;
             if (MessageBoxLogic.Instance() != null &&
                 MessageBoxLogic.Instance().EPassword == MessageBoxLogic.PASSWORD.MARRYROOT)
             {
                 MessageBoxLogic.CloseBox();
             }
         }
     }
 }
Пример #2
0
 void Ret_Login(GC_LOGIN_RET.LOGINRESULT result, int validateResult)
 {
     if (result == GC_LOGIN_RET.LOGINRESULT.SUCCESS)
     {
         LogModule.DebugLog("choose role....");
         MessageBoxLogic.CloseBox();
         MessageBoxLogic.OpenWaitBox(1366, 1, 0, OnChooseRole);
     }
     else
     {
         // 重新连接失败,点击确定返回登录界面
         MessageBoxLogic.OpenOKBox(1295, 1000, EnterLoginScene);
     }
 }
Пример #3
0
    void ShowPvPRankList()
    {
        if (PVPData.PvPRankCurPage >= PVPData.PvPRankTotalPage)
        {
            NextPageButton.SetActive(false);
        }
        else
        {
            NextPageButton.SetActive(true);
        }

        if (PVPData.PvPRankCurPage <= 1)
        {
            PrePageButton.SetActive(false);
        }
        else
        {
            PrePageButton.SetActive(true);
        }

        if (RankMemberList.transform.childCount > 0)
        {
            for (int i = 0; i < PVPData.PvPRankList.Count; ++i)
            {
                GameObject curItem = RankMemberList.transform.GetChild(i).gameObject;
                if (null != curItem)
                {
                    curItem.name = PVPData.PvPRankList[i].id.ToString();
                    PvPRankListItem curItemComponent = curItem.GetComponent <PvPRankListItem>();
                    if (null != curItemComponent)
                    {
                        curItemComponent.SendData(this, PVPData.PvPRankList[i]);
                    }
                }
            }
            PageTip.text = PVPData.PvPRankCurPage.ToString() + "/" + PVPData.PvPRankTotalPage.ToString();
        }
        else
        {
            UIManager.LoadItem(UIInfo.PvPRankListItem, OnLoadPvPRanListItem);
        }
        MessageBoxLogic.CloseBox();
    }
Пример #4
0
 void OnConnectResult(bool bSuccess, string result)
 {
     if (bSuccess)
     {
         MessageBoxLogic.CloseBox();
         if (LoginUILogic.Instance() != null)
         {
             LoginUILogic.Instance().EnterAccount();
         }
     }
     else
     {
         if (!m_bShowConnectResult)
         {
             StartCoroutine(RequestServerState(PlayerPreferenceData.LastServer));
             m_bShowConnectResult = true;
         }
         LogModule.WarningLog("connect fail");
         m_connnectTimer = 0;
     }
 }
Пример #5
0
    public static void UpdateLoginQueueState(int state, int num)
    {
        m_curQueueState = (GC_LOGIN_QUEUE_STATUS.QUEUESTATUS)state;

        /*
         * m_curQueueState = (GC_LOGIN_QUEUE_STATUS.QUEUESTATUS)data.Status;
         * m_curQueueNum = data.Index;
         */
        if (m_curQueueState == GC_LOGIN_QUEUE_STATUS.QUEUESTATUS.BEGINQUEUE || m_curQueueState == GC_LOGIN_QUEUE_STATUS.QUEUESTATUS.QUEUING)
        {
            if (m_curQueueState == GC_LOGIN_QUEUE_STATUS.QUEUESTATUS.BEGINQUEUE)
            {
                m_curQueueNum = QueueDefaultNum;
            }
            else
            {
                if (num < m_curQueueNum)
                {
                    m_curQueueNum = num;
                }
            }
            if (QueueWindow.Instance() == null)
            {
                MessageBoxLogic.CloseBox();
                UIManager.ShowUI(UIInfo.QueueWindow);
            }
            else
            {
                QueueWindow.Instance().UpdateQueueInfo();
            }
        }
        else if (m_curQueueState == GC_LOGIN_QUEUE_STATUS.QUEUESTATUS.ENDQUEUE)
        {
            UIManager.CloseUI(UIInfo.QueueWindow);
        }
    }
Пример #6
0
 void OnCancelClick()
 {
     MessageBoxLogic.CloseBox();
 }
Пример #7
0
 public static void Ret_Login(GC_LOGIN_RET.LOGINRESULT result, int validateResult)
 {
     PlatformHelper.SendUserAction(UserBehaviorDefine.LoginVarifyTokenFinish);
     if (result == GC_LOGIN_RET.LOGINRESULT.ACCOUNTVERIFYFAIL)
     {
         PlatformHelper.SendUserAction(UserBehaviorDefine.VerifyResult + ((int)result).ToString() + validateResult);
     }
     else
     {
         PlatformHelper.SendUserAction(UserBehaviorDefine.VerifyResult + ((int)result).ToString());
     }
     LogModule.DebugLog("connect result: " + result.ToString() + " validateResult: " + validateResult);
     UIManager.CloseUI(UIInfo.QueueWindow);
     MessageBoxLogic.CloseBox();
     if (result == GC_LOGIN_RET.LOGINRESULT.SUCCESS)
     {
         LoginUILogic.Instance().LoginSuccess();
     }
     else if (result == GC_LOGIN_RET.LOGINRESULT.ACCOUNTVERIFYFAIL)
     {
         // 登录失败
         if (validateResult == 6)
         {
             PlatformHelper.UserLogout();
             accountData.CleanData();
             MessageBoxLogic.OpenOKBox(2369, 1000, SDKVarifyFail);
         }
         else
         {
             string strTip   = StrDictionary.GetClientDictionaryString("#{1284}", (int)validateResult);
             string strTitle = StrDictionary.GetClientDictionaryString("#{1000}");
             MessageBoxLogic.OpenOKBox(strTip, strTitle);
         }
     }
     else if (result == GC_LOGIN_RET.LOGINRESULT.ALREADYLOGIN)
     {
         // 该账户已经登录
         MessageBoxLogic.OpenOKBox(1285, 1000);
     }
     else if (result == GC_LOGIN_RET.LOGINRESULT.READROLELISTFAIL)
     {
         // 获取角色列表失败
         MessageBoxLogic.OpenOKBox(1286, 1000);
     }
     else if (result == GC_LOGIN_RET.LOGINRESULT.QUEUEFULL)
     {
         // 队伍已满,请稍后尝试
         MessageBoxLogic.OpenOKBox(1852, 1000);
     }
     else if (result == GC_LOGIN_RET.LOGINRESULT.VERSIONNOTMATCH || result == GC_LOGIN_RET.LOGINRESULT.PACKETNOTMATCH)
     {
         // 客户端版本过低
         MessageBoxLogic.OpenOKBox(2161, 1000, VersionNotMatch);
     }
     else if (result == GC_LOGIN_RET.LOGINRESULT.NEEDFORCEENTER)
     {
         if (null != ServerChooseController.Instance())
         {
             ServerChooseController.Instance().ShowForceEnterTip(true);
         }
         else
         {
             MessageBoxLogic.OpenOKBox(2161, 1000, VersionNotMatch);
         }
     }
     else
     {
         MessageBoxLogic.OpenOKBox(1287, 1000);
     }
 }