public void CheckShouldShowTips(CUIEvent uiEvent)
            {
                if (this.contents.get_Count() > 0)
                {
                    IntimacyRelationView.IntimacyTipsMgr.Ent ent = this.contents.get_Item(this.contents.get_Count() - 1);
                    this.contents.RemoveAt(this.contents.get_Count() - 1);
                    if (ent.ShowType == IntimacyRelationView.IntimacyTipsMgr.EShowType.LevelUpMsgBoxAll)
                    {
                        string text = Singleton <CTextManager> .instance.GetText("RelaLevelUp_Title");

                        string text2 = Singleton <CTextManager> .instance.GetText("RelaLevelUp_ShareText");

                        stUIEventParams param = default(stUIEventParams);
                        param.tag    = (int)ent.state;
                        param.tagStr = ent.name;
                        Singleton <CUIManager> .instance.OpenMessageBoxWithCancel(ent.content, enUIEventID.IntimacyRela_CheckShouldShowTips, enUIEventID.IntimacyRela_ShareLevelUp, param, string.Empty, text2, false, text);
                    }
                    else if (ent.ShowType == IntimacyRelationView.IntimacyTipsMgr.EShowType.ValueUpTips && !string.IsNullOrEmpty(ent.content))
                    {
                        string strContent = string.Format(UT.GetText("Intimacy_UpInfo"), ent.content, this.deltaValue);
                        Singleton <CUIManager> .GetInstance().OpenTips(strContent, false, 1.5f, null, new object[0]);

                        ent.content     = string.Empty;
                        this.deltaValue = 0;
                    }
                }
            }
        private void _check(CUIEvent uiEvent, bool bDay)
        {
            uint tagUInt = uiEvent.m_eventParams.tagUInt;

            DebugHelper.Assert(tagUInt > 0u, "id must > 0");
            if (tagUInt == 0u)
            {
                return;
            }
            ResHuoYueDuReward rewardCfg = this.model.huoyue_data.GetRewardCfg((ushort)tagUInt);
            RES_HUOYUEDU_TYPE type      = bDay ? RES_HUOYUEDU_TYPE.RES_HUOYUEDU_TYPE_DAY : RES_HUOYUEDU_TYPE.RES_HUOYUEDU_TYPE_WEEK;

            if (this.model.huoyue_data.BAlready_Reward(type, rewardCfg.wID))
            {
                Singleton <CUIManager> .instance.OpenTips(UT.GetText("CS_HUOYUEDUREWARD_GETED"), false, 1.5f, null, new object[0]);

                return;
            }
            uint num = bDay ? this.model.huoyue_data.day_curNum : this.model.huoyue_data.week_curNum;

            if (num >= rewardCfg.dwHuoYueDu)
            {
                TaskNetUT.Send_GetHuoyue_Reward(rewardCfg.wID);
            }
            else
            {
                Singleton <CUICommonSystem> .instance.OpenUseableTips(this.model.huoyue_data.GetUsable(rewardCfg.wID), uiEvent.m_pointerEventData.get_pressPosition().x, uiEvent.m_pointerEventData.get_pressPosition().y, enUseableTipsPos.enTop);
            }
        }
示例#3
0
        public static string GetTimeString(uint time)
        {
            string   result    = string.Empty;
            DateTime dateTime  = Utility.ToUtcTime2Local((long)((ulong)time));
            DateTime dateTime2 = Utility.ToUtcTime2Local((long)CRoleInfo.GetCurrentUTCTime());

            if (DateTime.Compare(dateTime2, dateTime) > 0)
            {
                TimeSpan timeSpan = dateTime2 - dateTime;
                if (timeSpan.get_Days() == 0)
                {
                    if (timeSpan.get_Hours() == 0)
                    {
                        result = string.Format(UT.GetText("Friend_Tips_lastTime_min"), timeSpan.get_Minutes());
                    }
                    else
                    {
                        result = string.Format(UT.GetText("Friend_Tips_lastTime_hour_min"), timeSpan.get_Hours(), timeSpan.get_Minutes());
                    }
                }
                else
                {
                    int num = timeSpan.get_Days();
                    if (num > 7)
                    {
                        num = 7;
                    }
                    result = string.Format(UT.GetText("Friend_Tips_lastTime_day"), num);
                }
            }
            return(result);
        }
示例#4
0
        public static void On_SCID_SNS_FRIEND_RECALLPOINT(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_CMD_RECALL_FRIEND stFriendRecallRsp = msg.stPkgData.stFriendRecallRsp;

            if (stFriendRecallRsp.dwResult == 0)
            {
                UT.Check_AddReCallCD(stFriendRecallRsp.stUin, (COM_FRIEND_TYPE)stFriendRecallRsp.bFriendType);
                Singleton <EventRouter> .GetInstance().BroadCastEvent("Friend_FriendList_Refresh");

                Singleton <CUIManager> .GetInstance().OpenTips(UT.GetText("Common_Sns_Tips_10"), false, 1.5f, null, new object[0]);

                COMDT_FRIEND_INFO comdt_friend_info = Singleton <CFriendContoller> .instance.model.getFriendByUid(stFriendRecallRsp.stUin.ullUid, CFriendModel.FriendType.SNS);

                if (comdt_friend_info != null)
                {
                    Singleton <CFriendContoller> .instance.ShareTo_SNSFriend_ReCall(Utility.UTF8Convert(comdt_friend_info.szOpenId));
                }
            }
            else
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stFriendRecallRsp.dwResult), false, 1.5f, null, new object[0]);
            }
        }
示例#5
0
        private void On_FriendSys_Friend_Confrim(CSPkg msg)
        {
            SCPKG_CMD_ADD_FRIEND_CONFIRM stFriendAddConfirmRsp = msg.stPkgData.stFriendAddConfirmRsp;
            COMDT_FRIEND_INFO            stUserInfo            = stFriendAddConfirmRsp.stUserInfo;

            if (stFriendAddConfirmRsp.dwResult == 0)
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.GetText("Friend_Tips_BeFriend_Ok"), false, 1f, null, new object[0]);

                Singleton <CFriendContoller> .GetInstance().model.Remove(CFriendModel.FriendType.RequestFriend, stUserInfo.stUin);

                Singleton <CFriendContoller> .GetInstance().model.Add(CFriendModel.FriendType.GameFriend, stUserInfo, false);

                Singleton <CFriendContoller> .GetInstance().model.SortGameFriend();

                CFriendView view = Singleton <CFriendContoller> .GetInstance().view;

                if ((view != null) && view.IsActive())
                {
                    view.Refresh();
                }
            }
            else
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stFriendAddConfirmRsp.dwResult), false, 1f, null, new object[0]);

                this.Remove_And_Refresh(CFriendModel.FriendType.RequestFriend, stUserInfo.stUin);
            }
        }
示例#6
0
 public static string GetFriendResultTypeString(UT.FriendResultType type)
 {
     if (type != UT.FriendResultType.RequestBeFriend)
     {
         return(string.Empty);
     }
     return(UT.GetText("Friend_Tips_Send_BeFriend_Ok"));
 }
示例#7
0
 public void Load_Task_Tab_String()
 {
     this.Daily_Quest_Career      = UT.GetText("Daily_Quest_Career");
     this.Daily_Quest_NeedGrowing = UT.GetText("Daily_Quest_NeedGrowing");
     this.Daily_Quest_NeedMoney   = UT.GetText("Daily_Quest_NeedMoney");
     this.Daily_Quest_NeedSeal    = UT.GetText("Daily_Quest_NeedSeal");
     this.Daily_Quest_NeedHero    = UT.GetText("Daily_Quest_NeedHero");
 }
示例#8
0
 public void On_Friend_Invite_SNS_Friend(CUIEvent uiEvent)
 {
     if (MonoSingleton <ShareSys> .instance.IsInstallPlatform())
     {
         string text = UT.GetText("Friend_Invite_SNS_Title");
         string desc = UT.GetText("Friend_Invite_SNS_Desc");
         Singleton <ApolloHelper> .GetInstance().ShareToFriend(text, desc);
     }
 }
示例#9
0
 public static void Send_Request_BeFriend(ulong ullUid, uint dwLogicWorldId)
 {
     if (Singleton <CFriendContoller> .GetInstance().model.IsContain(CFriendModel.FriendType.GameFriend, ullUid, dwLogicWorldId))
     {
         Singleton <CUIManager> .GetInstance().OpenTips(UT.GetText("Friend_Tips_AlreadyBeFriend"), false, 1f, null, new object[0]);
     }
     else
     {
         CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x4b6);
         msg.stPkgData.stFriendAddReq.stUin.ullUid         = ullUid;
         msg.stPkgData.stFriendAddReq.stUin.dwLogicWorldId = dwLogicWorldId;
         Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
     }
 }
示例#10
0
 public void On_SearchFriend(CUIEvent uiEvent)
 {
     this.Clear_SearchFriend();
     this.searchFriendShower.gameObject.CustomSetActive(false);
     if (string.IsNullOrEmpty(this.input.text))
     {
         Singleton <CUIManager> .GetInstance().OpenMessageBox(UT.GetText("Friend_Input_Tips"), false);
     }
     else
     {
         FriendSysNetCore.Send_Serch_Player(this.input.text);
     }
     this.Refresh_Friend_Recommand_List_Pos();
 }
        public static void On_SCID_SNS_FRIEND_RECALLPOINT(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_CMD_RECALL_FRIEND stFriendRecallRsp = msg.stPkgData.stFriendRecallRsp;

            if (stFriendRecallRsp.dwResult == 0u)
            {
                UT.Check_AddReCallCD(stFriendRecallRsp.stUin, (COM_FRIEND_TYPE)stFriendRecallRsp.bFriendType);
                Singleton <EventRouter> .GetInstance().BroadCastEvent("Friend_FriendList_Refresh");

                Singleton <CUIManager> .GetInstance().OpenTips(UT.GetText("Common_Sns_Tips_10"), false, 1.5f, null, new object[0]);
            }
            else
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stFriendRecallRsp.dwResult), false, 1.5f, null, new object[0]);
            }
        }
示例#12
0
 public static void Send_Request_BeFriend(ulong ullUid, uint dwLogicWorldId, string veriyText = "")
 {
     if (Singleton <CFriendContoller> .GetInstance().model.IsContain(CFriendModel.FriendType.GameFriend, ullUid, dwLogicWorldId))
     {
         Singleton <CUIManager> .GetInstance().OpenTips(UT.GetText("Friend_Tips_AlreadyBeFriend"), false, 1.5f, null, new object[0]);
     }
     else
     {
         CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x4b6);
         msg.stPkgData.stFriendAddReq.stUin.ullUid         = ullUid;
         msg.stPkgData.stFriendAddReq.stUin.dwLogicWorldId = dwLogicWorldId;
         if (!string.IsNullOrEmpty(veriyText))
         {
             StringHelper.StringToUTF8Bytes(veriyText, ref msg.stPkgData.stFriendAddReq.szVerificationInfo);
         }
         Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
     }
 }
示例#13
0
        public static void On_Send_FriendPower(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_CMD_DONATE_FRIEND_POINT stFriendDonatePointRsp = msg.stPkgData.stFriendDonatePointRsp;

            if (stFriendDonatePointRsp.dwResult == 0)
            {
                UT.Check_AddHeartCD(stFriendDonatePointRsp.stUin, (COM_FRIEND_TYPE)stFriendDonatePointRsp.bFriendType);
                Singleton <EventRouter> .GetInstance().BroadCastEvent("Friend_FriendList_Refresh");

                Singleton <EventRouter> .GetInstance().BroadCastEvent <SCPKG_CMD_DONATE_FRIEND_POINT>("Friend_Send_Coin_Done", stFriendDonatePointRsp);

                if (Singleton <CFriendContoller> .instance.model.IsSnsFriend(stFriendDonatePointRsp.stUin.ullUid, stFriendDonatePointRsp.stUin.dwLogicWorldId))
                {
                    COMDT_FRIEND_INFO info = Singleton <CFriendContoller> .instance.model.GetInfo(CFriendModel.FriendType.SNS, stFriendDonatePointRsp.stUin);

                    if (info != null)
                    {
                        string str = Utility.UTF8Convert(info.szOpenId);
                        if (!string.IsNullOrEmpty(str) && !CFriendModel.IsOnSnsSwitch(info.dwRefuseFriendBits, COM_REFUSE_TYPE.COM_REFUSE_TYPE_DONOTE_AND_REC))
                        {
                            string text = Singleton <CTextManager> .instance.GetText("Common_Sns_Tips_3");

                            string confirmStr = Singleton <CTextManager> .instance.GetText("Common_Sns_Tips_5");

                            string cancelStr = Singleton <CTextManager> .instance.GetText("Common_Sns_Tips_4");

                            stUIEventParams param = new stUIEventParams();
                            param.snsFriendEventParams.openId = str;
                            Singleton <CUIManager> .instance.OpenMessageBoxWithCancel(text, enUIEventID.Friend_Share_SendCoin, enUIEventID.None, param, confirmStr, cancelStr, false);

                            return;
                        }
                    }
                }
                Singleton <CUIManager> .GetInstance().OpenTips(UT.GetText("Friend_Tips_SendHeartOK"), false, 1.5f, null, new object[0]);
            }
            else
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stFriendDonatePointRsp.dwResult), false, 1.5f, null, new object[0]);
            }
        }
        public static void Send_Request_BeFriend(ulong ullUid, uint dwLogicWorldId, string veriyText = "", COM_ADD_FRIEND_TYPE addFriendType = COM_ADD_FRIEND_TYPE.COM_ADD_FRIEND_NULL, int useHeroId = -1)
        {
            if (Singleton <CFriendContoller> .GetInstance().model.IsContain(CFriendModel.FriendType.GameFriend, ullUid, dwLogicWorldId))
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.GetText("Friend_Tips_AlreadyBeFriend"), false, 1.5f, null, new object[0]);

                return;
            }
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1206u);

            cSPkg.stPkgData.stFriendAddReq.stUin.ullUid         = ullUid;
            cSPkg.stPkgData.stFriendAddReq.stUin.dwLogicWorldId = dwLogicWorldId;
            if (!string.IsNullOrEmpty(veriyText))
            {
                StringHelper.StringToUTF8Bytes(veriyText, ref cSPkg.stPkgData.stFriendAddReq.szVerificationInfo);
            }
            cSPkg.stPkgData.stFriendAddReq.stUserSource.bAddFriendType                 = (byte)addFriendType;
            cSPkg.stPkgData.stFriendAddReq.stUserSource.stAddFriendInfo.stPvp          = new COMDT_ADDFRIEND_PVP();
            cSPkg.stPkgData.stFriendAddReq.stUserSource.stAddFriendInfo.stPvp.dwHeroID = (uint)useHeroId;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }
        private void On_Friend_Recruit_zmzItemClickDown(CUIEvent uievent)
        {
            ushort num = (ushort)uievent.m_eventParams.tagUInt;
            ulong  commonUInt64Param         = uievent.m_eventParams.commonUInt64Param1;
            uint   taskId                    = uievent.m_eventParams.taskId;
            COM_RECRUITMENT_TYPE weakGuideId = (COM_RECRUITMENT_TYPE)uievent.m_eventParams.weakGuideId;

            if (num == 0)
            {
                return;
            }
            CFriendRecruit friendRecruit = Singleton <CFriendContoller> .instance.model.friendRecruit;

            CFriendRecruit.RecruitReward recruitReward;
            if (friendRecruit.SuperReward.rewardID == num)
            {
                recruitReward = friendRecruit.SuperReward;
            }
            else
            {
                recruitReward = friendRecruit.GetRecruitReward(commonUInt64Param, taskId, num);
            }
            if (recruitReward != null && recruitReward.state == CFriendRecruit.RewardState.Getted)
            {
                Singleton <CUIManager> .instance.OpenTips(UT.GetText("CS_HUOYUEDUREWARD_GETED"), false, 1.5f, null, new object[0]);
            }
            else if (recruitReward != null && recruitReward.state == CFriendRecruit.RewardState.Keling)
            {
                CFriendRecruitNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, taskId, num);
            }
            else
            {
                CUseable usable = friendRecruit.GetUsable(num);
                Singleton <CUICommonSystem> .instance.OpenUseableTips(usable, uievent.m_pointerEventData.get_pressPosition().x, uievent.m_pointerEventData.get_pressPosition().y, enUseableTipsPos.enTop);
            }
        }
        public void OnHuoyue_Error_NTF(ref CSPkg pkg)
        {
            int    iErrorCode = pkg.stPkgData.stHuoYueDuRewardErr.iErrorCode;
            string text       = string.Empty;

            switch (iErrorCode)
            {
            case 0:
                text = UT.GetText("CS_HUOYUEDUREWARD_SUCC");
                break;

            case 1:
                text = UT.GetText("CS_HUOYUEDUREWARD_ACNTNULL");
                break;

            case 2:
                text = UT.GetText("CS_HUOYUEDUREWARD_INFONULL");
                break;

            case 3:
                text = UT.GetText("CS_HUOYUEDUREWARD_NOTINTABLE");
                break;

            case 4:
                text = UT.GetText("CS_HUOYUEDUREWARD_NOTENOUGH");
                break;

            case 5:
                text = UT.GetText("CS_HUOYUEDUREWARD_GETED");
                break;
            }
            if (!string.IsNullOrEmpty(text))
            {
                Singleton <CUIManager> .instance.OpenTips(text, false, 1.5f, null, new object[0]);
            }
        }
示例#17
0
        public void OpenForm(CUIEvent uiEvent)
        {
            this.friendform = Singleton <CUIManager> .GetInstance().OpenForm(CFriendContoller.FriendFormPath, false, true);

            GameObject gameObject = this.friendform.gameObject;

            this.friendListNode = gameObject.transform.Find("node/Image/FriendList").gameObject;
            this.friendListNode.CustomSetActive(true);
            this.friendListCom          = this.friendListNode.GetComponent <CUIListScript>();
            this.addFriendBtnGameObject = Utility.FindChild(gameObject, "node/Buttons/Add");
            this.info_node = gameObject.transform.Find("node/Image/info_node").gameObject;
            this.info_node.CustomSetActive(false);
            this.ifnoText      = Utility.GetComponetInChild <Text>(gameObject, "node/Image/info_node/Text");
            this.ifnoText.text = Singleton <CTextManager> .instance.GetText("Friend_NoFriend_Tip");

            string text = Singleton <CTextManager> .instance.GetText("FriendAdd_Tab_QQ");

            if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.Wechat)
            {
                text = Singleton <CTextManager> .instance.GetText("FriendAdd_Tab_Weixin");
            }
            this.tablistScript = gameObject.transform.Find("TopCommon/Panel_Menu/List").gameObject.GetComponent <CUIListScript>();
            string[] strArray  = new string[] { text, UT.GetText("Friend_Title_List"), UT.GetText("Friend_Title_Requests"), "黑名单", "附近的人" };
            string[] strArray2 = new string[] { UT.GetText("Friend_Title_List"), UT.GetText("Friend_Title_Requests") };
            string[] strArray3 = !CSysDynamicBlock.bSocialBlocked ? strArray : strArray2;
            Tab      tab       = !CSysDynamicBlock.bSocialBlocked ? Tab.Friend_SNS : Tab.Friend;

            this.tablistScript.SetElementAmount(strArray3.Length);
            for (int i = 0; i < this.tablistScript.m_elementAmount; i++)
            {
                this.tablistScript.GetElemenet(i).gameObject.transform.Find("Text").GetComponent <Text>().text = strArray3[i];
            }
            this.btnText        = Utility.GetComponetInChild <Text>(gameObject, "node/Buttons/Invite/Text");
            this.sns_invite_btn = gameObject.transform.Find("node/Buttons/Invite").gameObject;
            string str2 = Singleton <CTextManager> .instance.GetText("FriendAdd_Invite_Btn_QQ");

            if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.Wechat)
            {
                str2 = Singleton <CTextManager> .instance.GetText("FriendAdd_Invite_Btn_Weixin");
            }
            this.btnText.text = str2;
            this.sns_invite_btn.CustomSetActive(false);
            this.rule_btn_node    = gameObject.transform.Find("btnRule").gameObject;
            this.lbs_node         = gameObject.transform.Find("node/LBSNode").gameObject;
            this.m_QQboxBtn       = Utility.FindChild(gameObject, "node/Buttons/QQBoxBtn");
            this.sns_share_switch = Utility.FindChild(gameObject, "node/SnsNtfNode/SnsToggle");
            this.sns_add_switch   = Utility.FindChild(gameObject, "node/SnsNtfNode/AddToggle");
            this.sns_share_switch.CustomSetActive(false);
            this.localtionToggle = Utility.FindChild(gameObject, "node/LBSNode/location").GetComponent <Toggle>();
            this.nanToggle       = Utility.FindChild(gameObject, "node/LBSNode/nan").GetComponent <Toggle>();
            this.nvToggle        = Utility.FindChild(gameObject, "node/LBSNode/nv").GetComponent <Toggle>();
            this.lbsRefreshBtn   = Utility.FindChild(gameObject, "node/LBSNode/Add").GetComponent <Button>();
            if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ)
            {
                Utility.GetComponetInChild <Text>(this.sns_share_switch, "Label").text = Singleton <CTextManager> .instance.GetText("Friend_SNS_NTF_Switch_Tips_1");
            }
            else
            {
                Utility.GetComponetInChild <Text>(this.sns_share_switch, "Label").text = Singleton <CTextManager> .instance.GetText("Friend_SNS_NTF_Switch_Tips_2");
            }
            this.sns_add_switch.CustomSetActive(false);
            this.tablistScript.m_alwaysDispatchSelectedChangeEvent = true;
            this.tablistScript.SelectElement(0, true);
            this.tablistScript.m_alwaysDispatchSelectedChangeEvent = false;
            this._tab = Tab.None;
            this.Refresh_Tab();
            this.CurTab = tab;
            CUIListElementScript elemenet = this.tablistScript.GetElemenet(4);

            if (elemenet != null)
            {
                Singleton <CMiShuSystem> .GetInstance().ShowNewFlag(elemenet.gameObject, enNewFlagKey.New_PeopleNearby_V1);
            }
        }
示例#18
0
 private void On_DelFriend(CUIEvent evt)
 {
     this.com = evt.m_srcWidget;
     Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(UT.GetText("Friend_Tips_DelFriend"), enUIEventID.Friend_DelFriend_OK, enUIEventID.Friend_DelFriend_Cancle, false);
 }
示例#19
0
        public static string ErrorCode_String(uint dwResult)
        {
            switch (dwResult)
            {
            case 171u:
                return(UT.GetText("CS_ERR_FRIEND_IN_BLACK"));

            case 172u:
            case 173u:
            case 176u:
            case 177u:
            case 178u:
            case 179u:
            case 182u:
            case 183u:
            case 184u:
            case 185u:
            case 186u:
IL_76:
                switch (dwResult)
                {
                case 144u:
                    return(UT.GetText("Friend_CS_ERR_FRIEND_RECALL_REPEATED"));

                case 145u:
                    return(UT.GetText("Friend_CS_ERR_FRIEND_EXCEED"));

                case 146u:
                    return(UT.GetText("Friend_CS_ERR_FRIEND_RECALL_TIME_LIMIT"));

                case 147u:
                case 148u:
                case 149u:
                case 150u:
                case 153u:
                case 155u:
                case 156u:
                case 157u:
                case 158u:
                case 159u:
IL_D2:
                    switch (dwResult)
                    {
                    case 101u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_TCAPLUS_ERR"));

                    case 102u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_RECORD_NOT_EXSIST"));

                    case 103u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_NUM_EXCEED"));

                    case 104u:
                        return(UT.GetText("Friend_CS_ERR_PEER_FRIEND_NUM_EXCEED"));

                    case 105u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_DONATE_AP_EXCEED"));

                    case 106u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_RECV_AP_EXCEED"));

                    case 107u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_ADD_FRIEND_DENY"));

                    case 108u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_ADD_FRIEND_SELF"));

                    case 109u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_ADD_FRIEND_EXSIST"));

                    case 110u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_REQ_REPEATED"));

                    case 111u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_NOT_EXSIST"));

                    case 112u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_SEND_MAIL"));

                    case 113u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_DONATE_REPEATED"));

                    case 114u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_AP_FULL"));

                    case 115u:
IL_11F:
                        switch (dwResult)
                        {
                        case 37u:
                            return(UT.GetText("CS_ERR_RECRUITER_LEVELLIMIT"));

                        case 38u:
                        case 39u:
                        case 40u:
                        case 41u:
IL_15C:
                            switch (dwResult)
                            {
                            case 2u:
                                return(UT.GetText("Friend_CS_ERR_STARTSINGLEGAME_FAIL"));

                            case 4u:
                                return(UT.GetText("Friend_CS_ERR_FINSINGLEGAME_FAIL"));

                            case 5u:
                                return(UT.GetText("Friend_CS_ERR_QUITMULTGAME_FAIL"));

                            case 6u:
                                return(UT.GetText("Friend_CS_ERR_REGISTER_NAME_DUP_FAIL"));

                            case 7u:
                                return(UT.GetText("Friend_CS_ERR_SHOULD_REFRESH_TASK"));

                            case 8u:
                                return(UT.GetText("Friend_CS_ERR_COMMIT_ERR"));
                            }
                            return(string.Format(UT.GetText("Friend_CS_ERR_FRIEND_DEFAULT"), dwResult));

                        case 42u:
                            return(UT.GetText("CS_ERR_RECRUIT_INVITECODE"));

                        case 43u:
                            return(UT.GetText("CS_ERR_RECRUIT_LEVELLIMIT"));

                        case 44u:
                            return(UT.GetText("CS_ERR_RECRUIT_NOTONEPLAT"));

                        case 45u:
                            return(UT.GetText("CS_ERR_PASSIVE_RECRUIT_NUMLIMIT"));

                        case 46u:
                            return(UT.GetText("CS_ERR_ACTIVE_RECRUIT_NUMLIMIT"));

                        case 47u:
                            return(UT.GetText("CS_ERR_RECRUIT_OTHER"));

                        case 48u:
                            return(UT.GetText("CS_ERR_RECRUIT_SELF"));

                        case 49u:
                            return(UT.GetText("CS_ERR_RECRUIT_CLOSING"));
                        }
                        goto IL_15C;

                    case 116u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_ADD_FRIEND_ZONE"));

                    case 117u:
                        return(UT.GetText("Friend_CS_ERR_FRIEND_OTHER"));
                    }
                    goto IL_11F;

                case 151u:
                    return(UT.GetText("CS_ERR_REFUSE_RECALL_REPEATED"));

                case 152u:
                    return(UT.GetText("CS_ERR_REFUSE_ADDFRIEND"));

                case 154u:
                    return(UT.GetText("CS_ERR_VERIFICATION_ILLEGAL"));

                case 160u:
                    return(UT.GetText("CS_ERR_DEFRIEND_REPEATED"));

                case 161u:
                    return(UT.GetText("CS_ERR_BLACKLIST_NOT_EXSIST"));

                case 162u:
                    return(UT.GetText("CS_ERR_BLACKLIST_EXCEED"));

                case 163u:
                    return(UT.GetText("CS_ERR_FRIEND_INVALID_PLAT"));
                }
                goto IL_D2;

            case 174u:
                return(UT.GetText("CS_ERR_LBS_LIMIT"));

            case 175u:
                return(UT.GetText("CS_ERR_LBSSERECH_TIMELIMIT"));

            case 180u:
                return(UT.GetText("CS_ERR_FRIEND_ADD_LOCK"));

            case 181u:
                return(UT.GetText("CS_ERR_FRIEND_ADD_TOO_OFTEN"));

            case 187u:
                return(UT.GetText("CS_ERR_INTIMACY_REQUEST_SELF"));

            case 188u:
                return(UT.GetText("CS_ERR_INTIMACY_REQUEST_TIME_LIMIT"));

            case 189u:
                return(UT.GetText("CS_ERR_INTIMACY_VALUE_NOTENOUGH"));

            case 190u:
                return(UT.GetText("CS_ERR_INTIMACY_REQUEST_REPEATED"));

            case 191u:
                return(UT.GetText("CS_ERR_INTIMACY_RELATION_NUM_EXCEED"));

            case 192u:
                return(UT.GetText("CS_ERR_PEER_INTIMACY_RELATION_NUM_EXCEED"));

            case 193u:
                return(UT.GetText("CS_ERR_INTIMACY_RELATION_EXSIST"));

            case 194u:
                return(UT.GetText("CS_ERR_INTIMACY_RELATION_NOTEXIST"));

            case 195u:
                return(UT.GetText("CS_ERR_INTIMACY_RELATION_OTHER"));

            case 196u:
                return(UT.GetText("CS_ERR_INTIMACY_RELATION_OFTEN"));
            }
            goto IL_76;
        }
示例#20
0
        public void OpenForm(CUIEvent uiEvent)
        {
            this.friendform = Singleton <CUIManager> .GetInstance().OpenForm(CFriendContoller.FriendFormPath, false, true);

            GameObject gameObject = this.friendform.gameObject;

            this.friendListNode = gameObject.transform.Find("node/Image/FriendList").gameObject;
            this.friendListNode.CustomSetActive(true);
            this.friendListCom          = this.friendListNode.GetComponent <CUIListScript>();
            this.addFriendBtnGameObject = Utility.FindChild(gameObject, "node/Buttons/Add");
            this.info_node = gameObject.transform.Find("node/Image/info_node").gameObject;
            this.info_node.CustomSetActive(false);
            this.ifnoText      = Utility.GetComponetInChild <Text>(gameObject, "node/Image/info_node/Text");
            this.ifnoText.text = Singleton <CTextManager> .instance.GetText("Friend_NoFriend_Tip");

            string text = Singleton <CTextManager> .instance.GetText("FriendAdd_Tab_QQ");

            if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.Wechat)
            {
                text = Singleton <CTextManager> .instance.GetText("FriendAdd_Tab_Weixin");
            }
            this.tablistScript = gameObject.transform.Find("TopCommon/Panel_Menu/List").gameObject.GetComponent <CUIListScript>();
            string[] strArray  = new string[] { text, UT.GetText("Friend_Title_List"), UT.GetText("Friend_Title_Requests") };
            string[] strArray2 = new string[] { UT.GetText("Friend_Title_List"), UT.GetText("Friend_Title_Requests") };
            string[] strArray3 = !CSysDynamicBlock.bSocialBlocked ? strArray : strArray2;
            Tab      tab       = !CSysDynamicBlock.bSocialBlocked ? Tab.Friend_SNS : Tab.Friend;

            this.tablistScript.SetElementAmount(strArray3.Length);
            for (int i = 0; i < this.tablistScript.m_elementAmount; i++)
            {
                this.tablistScript.GetElemenet(i).gameObject.transform.Find("Text").GetComponent <Text>().text = strArray3[i];
            }
            this.btnText        = Utility.GetComponetInChild <Text>(gameObject, "node/Buttons/Invite/Text");
            this.sns_invite_btn = gameObject.transform.Find("node/Buttons/Invite").gameObject;
            string str2 = Singleton <CTextManager> .instance.GetText("FriendAdd_Invite_Btn_QQ");

            if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.Wechat)
            {
                str2 = Singleton <CTextManager> .instance.GetText("FriendAdd_Invite_Btn_Weixin");
            }
            this.btnText.text = str2;
            this.sns_invite_btn.CustomSetActive(false);
            this.tablistScript.m_alwaysDispatchSelectedChangeEvent = true;
            this.tablistScript.SelectElement((int)tab, true);
            this.tablistScript.m_alwaysDispatchSelectedChangeEvent = false;
            this._tab = Tab.None;
            this.Refresh_Tab();
            this.CurTab = tab;
            bool bActive = false;
            long curTime = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().getCurrentTimeSinceLogin();

            if (MonoSingleton <BannerImageSys> .GetInstance().QQBOXInfo.isTimeValid(curTime))
            {
                bActive = true;
            }
            GameObject obj4 = Utility.FindChild(gameObject, "node/Buttons/QQBoxBtn");

            if (obj4 != null)
            {
                if ((ApolloConfig.platform == ApolloPlatform.QQ) || (ApolloConfig.platform == ApolloPlatform.WTLogin))
                {
                    obj4.CustomSetActive(bActive);
                }
                else
                {
                    obj4.CustomSetActive(false);
                }
                if (CSysDynamicBlock.bLobbyEntryBlocked && (obj4 != null))
                {
                    obj4.CustomSetActive(false);
                }
            }
        }