Пример #1
0
        public static void On_Send_CHG_INTIMACY_CONFIRM(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_CMD_CHG_INTIMACY_CONFIRM stChgIntimacyConfirmRsp = msg.stPkgData.stChgIntimacyConfirmRsp;

            if (stChgIntimacyConfirmRsp.dwResult == 0u)
            {
                if (stChgIntimacyConfirmRsp.bRelationChgType == 1 && IntimacyRelationViewUT.IsRelaState(stChgIntimacyConfirmRsp.bIntimacyState))
                {
                    CFriendRelationship.FRData.Add(stChgIntimacyConfirmRsp.stUin.ullUid, stChgIntimacyConfirmRsp.stUin.dwLogicWorldId, (COM_INTIMACY_STATE)stChgIntimacyConfirmRsp.bIntimacyState, (COM_INTIMACY_RELATION_CHG_TYPE)stChgIntimacyConfirmRsp.bRelationChgType, 0u, false);
                }
                if (stChgIntimacyConfirmRsp.bRelationChgType == 2 && IntimacyRelationViewUT.IsRelaState(stChgIntimacyConfirmRsp.bIntimacyState))
                {
                    CFriendRelationship.FRData.Add(stChgIntimacyConfirmRsp.stUin.ullUid, stChgIntimacyConfirmRsp.stUin.dwLogicWorldId, COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL, (COM_INTIMACY_RELATION_CHG_TYPE)stChgIntimacyConfirmRsp.bRelationChgType, stChgIntimacyConfirmRsp.dwTerminateTime, false);
                }
            }
            else
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stChgIntimacyConfirmRsp.dwResult), false, 1.5f, null, new object[0]);

                COMDT_ACNT_UNIQ stUin = stChgIntimacyConfirmRsp.stUin;
                if (stUin != null)
                {
                    FriendRelationNetCore.ProcessByErrorCode(stChgIntimacyConfirmRsp.dwResult, stUin.ullUid, stUin.dwLogicWorldId);
                }
            }
        }
Пример #2
0
        public static void On_NTF_INTIMACY_RELATION_REQUEST(CSPkg msg)
        {
            SCPKG_CMD_NTF_INTIMACY_RELATION_REQUEST stNtfIntimacyRelationRequest = msg.stPkgData.stNtfIntimacyRelationRequest;

            if (stNtfIntimacyRelationRequest == null)
            {
                return;
            }
            COM_INTIMACY_STATE cOM_INTIMACY_STATE = COM_INTIMACY_STATE.COM_INTIMACY_STATE_NULL;

            if (stNtfIntimacyRelationRequest.bRelationChgType == 1)
            {
                if (IntimacyRelationViewUT.IsRelaState(stNtfIntimacyRelationRequest.bIntimacyState))
                {
                    cOM_INTIMACY_STATE = IntimacyRelationViewUT.GetConfirmState(stNtfIntimacyRelationRequest.bIntimacyState);
                }
            }
            else if (stNtfIntimacyRelationRequest.bRelationChgType == 2 && IntimacyRelationViewUT.IsRelaState(stNtfIntimacyRelationRequest.bIntimacyState))
            {
                cOM_INTIMACY_STATE = IntimacyRelationViewUT.GetDenyState(stNtfIntimacyRelationRequest.bIntimacyState);
            }
            if (cOM_INTIMACY_STATE != COM_INTIMACY_STATE.COM_INTIMACY_STATE_NULL)
            {
                CFriendRelationship.FRData.Add(stNtfIntimacyRelationRequest.stUin.ullUid, stNtfIntimacyRelationRequest.stUin.dwLogicWorldId, cOM_INTIMACY_STATE, (COM_INTIMACY_RELATION_CHG_TYPE)stNtfIntimacyRelationRequest.bRelationChgType, 0u, true);
            }
        }
        public void Add(ulong ulluid, uint worldId, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE op, uint timeStamp, bool bReceiveNtf = false)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

            if (masterRoleInfo != null && masterRoleInfo.playerUllUID == ulluid && (long)masterRoleInfo.logicWorldID == (long)((ulong)worldId))
            {
                return;
            }
            CFR cfr = this.GetCfr(ulluid, worldId);

            if (cfr == null)
            {
                this.m_cfrList.Add(new CFR(ulluid, worldId, state, op, timeStamp, bReceiveNtf));
            }
            else
            {
                cfr.SetData(ulluid, worldId, state, op, timeStamp, bReceiveNtf);
            }
            if (IntimacyRelationViewUT.IsRelaState(state))
            {
                COM_INTIMACY_STATE confirmState = IntimacyRelationViewUT.GetConfirmState(state);
                this.FindSetState(confirmState, COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL);
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent("FRDataChange");
        }
 public void ShowIntimacyRelation_Item(CUIComponent com, CFR frData, CUIFormScript uiFrom)
 {
     if (com == null || frData == null)
     {
         return;
     }
     IntimacyRelationViewUT.Show_Item(com, frData, uiFrom);
 }
Пример #5
0
 public void ShowIntimacyRelation_Item(CUIComponent com, CFR frData)
 {
     if (com == null || frData == null)
     {
         return;
     }
     IntimacyRelationViewUT.Show_Item(com, frData);
 }
		private static void Process_Bottm_Btns(bool bShow, GameObject node, ulong ullUid, uint dwLogicWorldId)
		{
			GameObject gameObject = node.transform.FindChild("Button_Send").gameObject;
			GameObject gameObject2 = node.transform.FindChild("Button_Cancel").gameObject;
			IntimacyRelationViewUT.SetEvtParam(gameObject, ullUid, dwLogicWorldId);
			IntimacyRelationViewUT.SetEvtParam(gameObject2, ullUid, dwLogicWorldId);
			gameObject.CustomSetActive(bShow);
			gameObject.CustomSetActive(bShow);
		}
        private void On_IntimacyRela_Delete_Relation_OK(CUIEvent uievent)
        {
            ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1;
            uint  tagUInt           = uievent.m_eventParams.tagUInt;
            CFR   cfr = Singleton <CFriendContoller> .instance.model.FRData.GetCfr(commonUInt64Param, tagUInt);

            if (cfr != null && IntimacyRelationViewUT.IsRelaState(cfr.state))
            {
                FriendRelationNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, tagUInt, cfr.state, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_DEL);
            }
        }
		public static string GetRelationText(COM_INTIMACY_STATE state)
		{
			if (IntimacyRelationViewUT.IsRelaState(state))
			{
				RelationConfig relaTextCfg = Singleton<CFriendContoller>.instance.model.FRData.GetRelaTextCfg(state);
				if (relaTextCfg != null)
				{
					return relaTextCfg.IntimRela_Type;
				}
			}
			return string.Empty;
		}
        public static void Show_Item(CUIComponent com, CFR frData)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo();

            if (masterRoleInfo != null && masterRoleInfo.playerUllUID == frData.ulluid && (long)masterRoleInfo.logicWorldID == (long)((ulong)frData.worldID))
            {
                return;
            }
            IntimacyRelationViewUT.Show_Item_Top(com, frData);
            IntimacyRelationViewUT.Show_Item_Middle(com, frData);
            IntimacyRelationViewUT.Show_Item_Bottom(com, frData);
            frData.bRedDot = false;
        }
		public static void Show_Item(CUIComponent com, CFR frData, CUIFormScript uiFrom)
		{
			CRoleInfo masterRoleInfo = Singleton<CRoleInfoManager>.instance.GetMasterRoleInfo();
			if (masterRoleInfo != null && masterRoleInfo.playerUllUID == frData.ulluid && (long)masterRoleInfo.logicWorldID == (long)((ulong)frData.worldID))
			{
				return;
			}
			IntimacyRelationViewUT.Show_Item_Top(com, frData, uiFrom);
			IntimacyRelationViewUT.Show_Item_Middle(com, frData, uiFrom);
			IntimacyRelationViewUT.Show_Item_Bottom(com, frData);
			frData.bRedDot = false;
			GameObject obj = Utility.FindChild(com.m_widgets[1], "NobeImag");
			obj.CustomSetActive(!frData.bInShowChoiseRelaList);
		}
		public static string GetRelationInLoadingMenu(byte state, string name)
		{
			if (IntimacyRelationViewUT.IsRelaState(state))
			{
				RelationConfig relaTextCfg = Singleton<CFriendContoller>.instance.model.FRData.GetRelaTextCfg(state);
				if (relaTextCfg != null)
				{
					return Singleton<CTextManager>.instance.GetText(relaTextCfg.IntimacyShowLoad, new string[]
					{
						name
					});
				}
			}
			return string.Empty;
		}
 public RelationConfig GetRelaTextCfg(COM_INTIMACY_STATE state)
 {
     if (IntimacyRelationViewUT.IsRelaState(state))
     {
         for (int i = 0; i < this.m_RelationConfig.Count; i++)
         {
             RelationConfig relationConfig = this.m_RelationConfig[i];
             if (relationConfig.state == state)
             {
                 return(relationConfig);
             }
         }
     }
     return(null);
 }
Пример #13
0
        public static void On_NTF_CHG_INTIMACY_DENY(CSPkg msg)
        {
            SCPKG_CMD_NTF_CHG_INTIMACY_DENY stNtfChgIntimacyDeny = msg.stPkgData.stNtfChgIntimacyDeny;

            if (stNtfChgIntimacyDeny == null)
            {
                return;
            }
            COMDT_FRIEND_INFO gameOrSnsFriend = Singleton <CFriendContoller> .instance.model.GetGameOrSnsFriend(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId);

            string text = string.Empty;

            if (stNtfChgIntimacyDeny.bRelationChgType == 1)
            {
                string         text2       = string.Empty;
                RelationConfig relaTextCfg = CFriendRelationship.FRData.GetRelaTextCfg(stNtfChgIntimacyDeny.bIntimacyState);
                if (relaTextCfg != null)
                {
                    text2 = relaTextCfg.IntimRela_Tips_DenyYourRequest;
                }
                if (!string.IsNullOrEmpty(text2) && gameOrSnsFriend != null)
                {
                    text = string.Format(text2, UT.Bytes2String(gameOrSnsFriend.szUserName));
                    CFriendRelationship.FRData.Add(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId, COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_NULL, 0u, false);
                }
            }
            if (stNtfChgIntimacyDeny.bRelationChgType == 2)
            {
                if (!IntimacyRelationViewUT.IsRelaState(stNtfChgIntimacyDeny.bIntimacyState))
                {
                    return;
                }
                RelationConfig relaTextCfg2 = CFriendRelationship.FRData.GetRelaTextCfg(stNtfChgIntimacyDeny.bIntimacyState);
                if (relaTextCfg2 == null)
                {
                    return;
                }
                if (gameOrSnsFriend != null)
                {
                    text = string.Format(relaTextCfg2.IntimRela_Tips_DenyYourDel, UT.Bytes2String(gameOrSnsFriend.szUserName));
                }
                CFriendRelationship.FRData.Add(stNtfChgIntimacyDeny.stUin.ullUid, stNtfChgIntimacyDeny.stUin.dwLogicWorldId, (COM_INTIMACY_STATE)stNtfChgIntimacyDeny.bIntimacyState, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_NULL, 0u, false);
            }
            if (string.IsNullOrEmpty(text))
            {
                Singleton <CUIManager> .GetInstance().OpenTips(text, false, 1.5f, null, new object[0]);
            }
        }
        private void On_IntimacyRela_PrevState(CUIEvent uievent)
        {
            ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1;
            uint  tagUInt           = uievent.m_eventParams.tagUInt;
            CFR   cfr = Singleton <CFriendContoller> .instance.model.FRData.GetCfr(commonUInt64Param, tagUInt);

            if (IntimacyRelationViewUT.IsRelaStateConfirm(cfr.state) && !cfr.bReciveOthersRequest)
            {
                cfr.state = COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL;
            }
            if (IntimacyRelationViewUT.IsRelaStateDeny(cfr.state) && !cfr.bReciveOthersRequest)
            {
                cfr.state = IntimacyRelationViewUT.GetStateByDenyState(cfr.state);
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent("FRDataChange");
        }
        private void On_IntimacyRela_Drop_ListElement_Click(CUIEvent uievent)
        {
            CUIComponent   component         = uievent.m_srcWidgetScript.m_widgets[0].GetComponent <CUIComponent>();
            CUIEventScript component2        = component.m_widgets[7].GetComponent <CUIEventScript>();
            ulong          commonUInt64Param = component2.m_onClickEventParams.commonUInt64Param1;
            uint           tagUInt           = component2.m_onClickEventParams.tagUInt;
            CFR            cfr = Singleton <CFriendContoller> .instance.model.FRData.GetCfr(commonUInt64Param, tagUInt);

            if (cfr == null)
            {
                return;
            }
            cfr.bInShowChoiseRelaList = false;
            cfr.choiseRelation        = uievent.m_srcWidgetIndexInBelongedList;
            IntimacyRelationViewUT.Show_Item(component, cfr, this.form);
        }
Пример #16
0
        public static void On_NTF_CHG_INTIMACY_CONFIRM(CSPkg msg)
        {
            SCPKG_CMD_NTF_CHG_INTIMACY_CONFIRM stNtfChgIntimacyConfirm = msg.stPkgData.stNtfChgIntimacyConfirm;

            if (stNtfChgIntimacyConfirm == null)
            {
                return;
            }
            if (stNtfChgIntimacyConfirm.bRelationChgType == 1 && IntimacyRelationViewUT.IsRelaState(stNtfChgIntimacyConfirm.bIntimacyState))
            {
                CFriendRelationship.FRData.Add(stNtfChgIntimacyConfirm.stUin.ullUid, stNtfChgIntimacyConfirm.stUin.dwLogicWorldId, (COM_INTIMACY_STATE)stNtfChgIntimacyConfirm.bIntimacyState, (COM_INTIMACY_RELATION_CHG_TYPE)stNtfChgIntimacyConfirm.bRelationChgType, 0u, false);
            }
            if (stNtfChgIntimacyConfirm.bRelationChgType == 2 && IntimacyRelationViewUT.IsRelaState(stNtfChgIntimacyConfirm.bIntimacyState))
            {
                CFriendRelationship.FRData.Add(stNtfChgIntimacyConfirm.stUin.ullUid, stNtfChgIntimacyConfirm.stUin.dwLogicWorldId, COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL, (COM_INTIMACY_RELATION_CHG_TYPE)stNtfChgIntimacyConfirm.bRelationChgType, stNtfChgIntimacyConfirm.dwTerminateTime, false);
            }
        }
        private void On_IntimacyRela_Show_Drop_List(CUIEvent uievent)
        {
            ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1;
            uint  tagUInt           = uievent.m_eventParams.tagUInt;
            CFR   cfr = Singleton <CFriendContoller> .instance.model.FRData.GetCfr(commonUInt64Param, tagUInt);

            if (cfr != null)
            {
                cfr.bInShowChoiseRelaList = !cfr.bInShowChoiseRelaList;
                CUIComponent  component  = uievent.m_srcWidgetScript.m_widgets[0].GetComponent <CUIComponent>();
                CUIListScript component2 = uievent.m_srcWidgetScript.m_widgets[1].GetComponent <CUIListScript>();
                if (component2 != null)
                {
                    component2.SetElementAmount(4);
                }
                IntimacyRelationViewUT.Show_Item(component, cfr, this.form);
            }
        }
        private void On_IntimacyRela_OK(CUIEvent uievent)
        {
            ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1;
            uint  tagUInt           = uievent.m_eventParams.tagUInt;
            COM_INTIMACY_STATE tag  = (COM_INTIMACY_STATE)uievent.m_eventParams.tag;
            int tag2 = uievent.m_eventParams.tag2;

            if (tag == COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL && tag2 != -1)
            {
                CFriendRelationship          fRData     = Singleton <CFriendContoller> .instance.model.FRData;
                CFriendRelationship.FRConfig cFGByIndex = fRData.GetCFGByIndex(tag2);
                if (cFGByIndex == null)
                {
                    return;
                }
                if (IntimacyRelationViewUT.IsRelaState(cFGByIndex.state))
                {
                    if (fRData.FindFrist(cFGByIndex.state) == null)
                    {
                        FriendRelationNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, tagUInt, cFGByIndex.state, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_ADD);
                        Singleton <CFriendContoller> .instance.model.FRData.ResetChoiseRelaState(commonUInt64Param, tagUInt);
                    }
                    else
                    {
                        RelationConfig relaTextCfg = Singleton <CFriendContoller> .instance.model.FRData.GetRelaTextCfg(cFGByIndex.state);

                        if (relaTextCfg != null)
                        {
                            Singleton <CUIManager> .instance.OpenTips(relaTextCfg.IntimRela_Tips_AlreadyHas, true, 1.5f, null, new object[0]);
                        }
                    }
                }
            }
            else if (IntimacyRelationViewUT.IsRelaStateConfirm(tag))
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, IntimacyRelationViewUT.GetStateByConfirmState(tag), COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_ADD);
            }
            else if (IntimacyRelationViewUT.IsRelaStateDeny(tag))
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, IntimacyRelationViewUT.GetStateByDenyState(tag), COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_DEL);
            }
        }
        private void On_IntimacyRela_Cancle(CUIEvent uievent)
        {
            ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1;
            uint  tagUInt           = uievent.m_eventParams.tagUInt;
            COM_INTIMACY_STATE tag  = (COM_INTIMACY_STATE)uievent.m_eventParams.tag;

            Singleton <CFriendContoller> .instance.model.FRData.ResetChoiseRelaState(commonUInt64Param, tagUInt);

            if (IntimacyRelationViewUT.IsRelaStateConfirm(tag))
            {
                COM_INTIMACY_STATE stateByConfirmState = IntimacyRelationViewUT.GetStateByConfirmState(tag);
                FriendRelationNetCore.Send_CHG_INTIMACY_DENY(commonUInt64Param, tagUInt, stateByConfirmState, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_ADD);
                CFriendRelationship.FRData.Add(commonUInt64Param, tagUInt, COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_NULL, 0u, false);
            }
            if (IntimacyRelationViewUT.IsRelaStateDeny(tag))
            {
                COM_INTIMACY_STATE stateByDenyState = IntimacyRelationViewUT.GetStateByDenyState(tag);
                FriendRelationNetCore.Send_CHG_INTIMACY_DENY(commonUInt64Param, tagUInt, stateByDenyState, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_DEL);
                CFriendRelationship.FRData.Add(commonUInt64Param, tagUInt, stateByDenyState, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_NULL, 0u, false);
            }
        }
		public static void Show_Item_Top(CUIComponent com, CFR frData, CUIFormScript uiFrom)
		{
			Image componetInChild = Utility.GetComponetInChild<Image>(com.gameObject, "Image");
			IntimacyRelationViewUT.SetRelationBGImg(componetInChild, frData.state);
			IntimacyRelationViewUT.SetButtonParam(com.m_widgets[19], frData);
			if (IntimacyRelationViewUT.IsRelaState(frData.state))
			{
				com.m_widgets[19].CustomSetActive(true);
			}
			else
			{
				com.m_widgets[19].CustomSetActive(false);
			}
			COMDT_FRIEND_INFO friendInfo = frData.friendInfo;
			if (friendInfo == null)
			{
				return;
			}
			CUIHttpImageScript component = com.m_widgets[1].GetComponent<CUIHttpImageScript>();
			UT.SetHttpImage(component, friendInfo.szHeadUrl);
			Image componetInChild2 = Utility.GetComponetInChild<Image>(component.gameObject, "NobeImag");
			if (componetInChild2 && uiFrom != null)
			{
				MonoSingleton<NobeSys>.GetInstance().SetHeadIconBk(componetInChild2, (int)friendInfo.stGameVip.dwHeadIconId);
				MonoSingleton<NobeSys>.GetInstance().SetHeadIconBkEffect(componetInChild2, (int)friendInfo.stGameVip.dwHeadIconId, uiFrom, 1f, true);
			}
			GameObject gameObject = com.m_widgets[2];
			if (gameObject)
			{
				MonoSingleton<NobeSys>.GetInstance().SetNobeIcon(gameObject.GetComponent<Image>(), (int)friendInfo.stGameVip.dwCurLevel, false, false, friendInfo.ullUserPrivacyBits);
			}
			Text component2 = com.m_widgets[3].GetComponent<Text>();
			string text = UT.Bytes2String(friendInfo.szUserName);
			if (component2 != null)
			{
				component2.set_text(text);
			}
			GameObject genderImage = com.m_widgets[4];
			FriendShower.ShowGender(genderImage, (COM_SNSGENDER)friendInfo.bGender);
		}
            public void AddRelaLevelUpMsgBox(string otherName, int newLevel, COM_INTIMACY_STATE state)
            {
                RelationConfig relaTextCfg = Singleton <CFriendContoller> .instance.model.FRData.GetRelaTextCfg(state);

                if (relaTextCfg == null)
                {
                    return;
                }
                string levelDescStr = IntimacyRelationViewUT.GetLevelDescStr(newLevel);
                string text         = Singleton <CTextManager> .instance.GetText("RelaLevelUp_Info");

                string content = string.Format(text, new object[]
                {
                    otherName,
                    relaTextCfg.IntimRela_Type,
                    levelDescStr,
                    levelDescStr,
                    relaTextCfg.IntimRela_Type
                });

                this.contents.Add(new IntimacyRelationView.IntimacyTipsMgr.Ent(content, IntimacyRelationView.IntimacyTipsMgr.EShowType.LevelUpMsgBoxAll, otherName, state));
            }
        public static void Show_Item_Top(CUIComponent com, CFR frData)
        {
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[19], frData);
            if (frData.state == 1 || frData.state == 2)
            {
                com.m_widgets[19].CustomSetActive(true);
            }
            else
            {
                com.m_widgets[19].CustomSetActive(false);
            }
            COMDT_FRIEND_INFO friendInfo = frData.friendInfo;

            if (friendInfo == null)
            {
                return;
            }
            CUIHttpImageScript component = com.m_widgets[1].GetComponent <CUIHttpImageScript>();

            UT.SetHttpImage(component, friendInfo.szHeadUrl);
            GameObject gameObject = com.m_widgets[2];

            if (gameObject)
            {
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(gameObject.GetComponent <Image>(), (int)friendInfo.stGameVip.dwCurLevel, false);
            }
            Text   component2 = com.m_widgets[3].GetComponent <Text>();
            string text       = UT.Bytes2String(friendInfo.szUserName);

            if (component2 != null)
            {
                component2.text = text;
            }
            GameObject genderImage = com.m_widgets[4];

            FriendShower.ShowGender(genderImage, friendInfo.bGender);
        }
		public static int GetCurLevelDoorValue(int intimacyValue)
		{
			if (intimacyValue >= 0 && intimacyValue < IntimacyRelationViewUT.Getlevel1_maxValue())
			{
				return 0;
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel1_maxValue() && intimacyValue < IntimacyRelationViewUT.Getlevel2_maxValue())
			{
				return IntimacyRelationViewUT.Getlevel1_maxValue();
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel2_maxValue() && intimacyValue < IntimacyRelationViewUT.Getlevel3_maxValue())
			{
				return IntimacyRelationViewUT.Getlevel2_maxValue();
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel3_maxValue() && intimacyValue < IntimacyRelationViewUT.Getlevel4_maxValue())
			{
				return IntimacyRelationViewUT.Getlevel3_maxValue();
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel4_maxValue())
			{
				return IntimacyRelationViewUT.Getlevel4_maxValue();
			}
			return -1;
		}
Пример #24
0
        public static void On_Send_INTIMACY_RELATION_REQUEST(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_CMD_INTIMACY_RELATION_REQUEST stIntimacyRelationRequestRsp = msg.stPkgData.stIntimacyRelationRequestRsp;

            if (stIntimacyRelationRequestRsp.dwResult == 0u)
            {
                string             strContent = string.Empty;
                COM_INTIMACY_STATE state      = COM_INTIMACY_STATE.COM_INTIMACY_STATE_NULL;
                if (stIntimacyRelationRequestRsp.bRelationChgType == 1)
                {
                    if (IntimacyRelationViewUT.IsRelaState(stIntimacyRelationRequestRsp.bIntimacyState))
                    {
                        state = IntimacyRelationViewUT.GetConfirmState(stIntimacyRelationRequestRsp.bIntimacyState);
                        RelationConfig relaTextCfg = Singleton <CFriendContoller> .instance.model.FRData.GetRelaTextCfg(stIntimacyRelationRequestRsp.bIntimacyState);

                        strContent = relaTextCfg.IntimRela_Tips_SendRequestSuccess;
                    }
                }
                else if (stIntimacyRelationRequestRsp.bRelationChgType == 2 && IntimacyRelationViewUT.IsRelaState(stIntimacyRelationRequestRsp.bIntimacyState))
                {
                    state = IntimacyRelationViewUT.GetDenyState(stIntimacyRelationRequestRsp.bIntimacyState);
                    RelationConfig relaTextCfg2 = Singleton <CFriendContoller> .instance.model.FRData.GetRelaTextCfg(stIntimacyRelationRequestRsp.bIntimacyState);

                    strContent = relaTextCfg2.IntimRela_Tips_SendDelSuccess;
                }
                Singleton <CUIManager> .GetInstance().OpenTips(strContent, false, 1.5f, null, new object[0]);

                CFriendRelationship.FRData.Add(stIntimacyRelationRequestRsp.stUin.ullUid, stIntimacyRelationRequestRsp.stUin.dwLogicWorldId, state, (COM_INTIMACY_RELATION_CHG_TYPE)stIntimacyRelationRequestRsp.bRelationChgType, 0u, false);
            }
            else
            {
                Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stIntimacyRelationRequestRsp.dwResult), false, 1.5f, null, new object[0]);
            }
        }
		public static int CalcRelaLevel(int intimacyValue)
		{
			if (intimacyValue >= 0 && intimacyValue < IntimacyRelationViewUT.Getlevel1_maxValue())
			{
				return 0;
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel1_maxValue() && intimacyValue < IntimacyRelationViewUT.Getlevel2_maxValue())
			{
				return 1;
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel2_maxValue() && intimacyValue < IntimacyRelationViewUT.Getlevel3_maxValue())
			{
				return 2;
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel3_maxValue() && intimacyValue < IntimacyRelationViewUT.Getlevel4_maxValue())
			{
				return 3;
			}
			if (intimacyValue >= IntimacyRelationViewUT.Getlevel4_maxValue())
			{
				return 4;
			}
			return 0;
		}
		public static bool IsRelationPriorityHigher(byte State1, COM_INTIMACY_STATE State2, byte firstChoise)
		{
			return IntimacyRelationViewUT.IsRelationPriorityHigher((COM_INTIMACY_STATE)State1, State2, (COM_INTIMACY_STATE)firstChoise);
		}
        private static void ShowMultiLoading()
        {
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CUILoadingSystem.PVP_PATH_LOADING, false, false);

            if (cUIFormScript == null)
            {
                return;
            }
            if (!Singleton <CUIEventManager> .GetInstance().HasUIEventListener(enUIEventID.IntimacyRela_LoadingClick))
            {
                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.IntimacyRela_LoadingClick, new CUIEventManager.OnUIEventHandler(CUILoadingSystem.On_IntimacyRela_LoadingClick));
            }
            SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext();

            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider);

            IGameActorDataProvider actorDataProvider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            ActorStaticData actorStaticData = default(ActorStaticData);
            ActorMeta       actorMeta       = default(ActorMeta);
            ActorMeta       actorMeta2      = default(ActorMeta);
            ActorServerData actorServerData = default(ActorServerData);

            actorMeta.ActorType = ActorTypeDef.Actor_Type_Hero;
            for (int i = 1; i <= 2; i++)
            {
                List <Player> allCampPlayers = Singleton <GamePlayerCenter> .GetInstance().GetAllCampPlayers((COM_PLAYERCAMP)i);

                if (allCampPlayers == null)
                {
                    DebugHelper.Assert(false, "Loading Players is Null");
                }
                else
                {
                    Transform transform = (i == 1) ? cUIFormScript.transform.FindChild("UpPanel") : cUIFormScript.transform.FindChild("DownPanel");
                    int       num       = 1;
                    while ((long)num <= 5L)
                    {
                        string     name       = (i == 1) ? string.Format("Up_Player{0}", num) : string.Format("Down_Player{0}", num);
                        GameObject gameObject = transform.FindChild(name).gameObject;
                        gameObject.CustomSetActive(false);
                        num++;
                    }
                    List <Player> .Enumerator enumerator = allCampPlayers.GetEnumerator();
                    Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

                    COM_PLAYERCAMP playerCamp = hostPlayer.PlayerCamp;
                    while (enumerator.MoveNext())
                    {
                        Player current = enumerator.get_Current();
                        if (current != null)
                        {
                            bool       flag        = current.PlayerId == hostPlayer.PlayerId;
                            string     name2       = (i == 1) ? string.Format("Up_Player{0}", current.CampPos + 1) : string.Format("Down_Player{0}", current.CampPos + 1);
                            GameObject gameObject2 = transform.FindChild(name2).gameObject;
                            gameObject2.CustomSetActive(true);
                            GameObject gameObject3 = gameObject2.transform.Find("RankFrame").gameObject;
                            bool       flag2       = current.PlayerCamp == playerCamp && (!Singleton <WatchController> .GetInstance().IsWatching || !Singleton <WatchController> .GetInstance().IsReplaying);
                            if (gameObject3 != null)
                            {
                                if (flag2)
                                {
                                    string rankFrameIconPath = CLadderView.GetRankFrameIconPath((byte)current.GradeOfRank, current.ClassOfRank);
                                    if (string.IsNullOrEmpty(rankFrameIconPath))
                                    {
                                        gameObject3.CustomSetActive(false);
                                    }
                                    else
                                    {
                                        Image component = gameObject3.GetComponent <Image>();
                                        if (component != null)
                                        {
                                            component.SetSprite(rankFrameIconPath, cUIFormScript, true, false, false, false);
                                        }
                                        gameObject3.CustomSetActive(true);
                                    }
                                }
                                else
                                {
                                    gameObject3.CustomSetActive(false);
                                }
                            }
                            Transform transform2 = gameObject2.transform.Find("RankClassText");
                            if (transform2 != null)
                            {
                                GameObject gameObject4 = transform2.gameObject;
                                if (flag2 && CLadderView.IsSuperKing((byte)current.GradeOfRank, current.ClassOfRank))
                                {
                                    gameObject4.CustomSetActive(true);
                                    gameObject4.GetComponent <Text>().set_text(current.ClassOfRank.ToString());
                                }
                                else
                                {
                                    gameObject4.CustomSetActive(false);
                                }
                            }
                            Text component2 = gameObject2.transform.Find("Txt_PlayerName/Name").gameObject.GetComponent <Text>();
                            component2.set_text(current.Name);
                            Image component3 = gameObject2.transform.Find("Txt_PlayerName/NobeIcon").gameObject.GetComponent <Image>();
                            if (component3)
                            {
                                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component3, (int)current.VipLv, true, flag, current.privacyBits);
                            }
                            Text component4 = gameObject2.transform.Find("Txt_HeroName").gameObject.GetComponent <Text>();
                            actorMeta.ConfigId = (int)current.CaptainId;
                            component4.set_text(actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData) ? actorStaticData.TheResInfo.Name : null);
                            GameObject gameObject5 = gameObject2.transform.Find("Txt_Qinmidu").gameObject;
                            if (gameObject5 != null)
                            {
                                if (current.IntimacyData != null)
                                {
                                    gameObject5.CustomSetActive(true);
                                    Text component5 = gameObject5.transform.Find("Text").gameObject.GetComponent <Text>();
                                    if (component5 != null)
                                    {
                                        component5.set_text(current.IntimacyData.title);
                                    }
                                    GameObject gameObject6 = gameObject5.transform.Find("BlueBg").gameObject;
                                    GameObject gameObject7 = gameObject5.transform.Find("RedBg").gameObject;
                                    if (current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_GAY || current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_SIDEKICK)
                                    {
                                        gameObject6.CustomSetActive(true);
                                        gameObject7.CustomSetActive(false);
                                    }
                                    else if (current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_LOVER || current.IntimacyData.state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_BESTIE)
                                    {
                                        gameObject6.CustomSetActive(false);
                                        gameObject7.CustomSetActive(true);
                                    }
                                }
                                else
                                {
                                    gameObject5.CustomSetActive(false);
                                }
                            }
                            GameObject gameObject8 = gameObject2.transform.Find("btns").gameObject;
                            if (gameObject8 != null)
                            {
                                if (current.IntimacyData != null && IntimacyRelationViewUT.IsRelaState(current.IntimacyData.state))
                                {
                                    int    relaLevel           = IntimacyRelationViewUT.CalcRelaLevel(current.IntimacyData.intimacyValue);
                                    string relaIconByRelaLevel = IntimacyRelationViewUT.GetRelaIconByRelaLevel(relaLevel, current.IntimacyData.state);
                                    if (!string.IsNullOrEmpty(relaIconByRelaLevel))
                                    {
                                        Image componetInChild = Utility.GetComponetInChild <Image>(gameObject8, "btnRela");
                                        if (componetInChild != null)
                                        {
                                            componetInChild.gameObject.CustomSetActive(true);
                                            componetInChild.SetSprite(relaIconByRelaLevel, cUIFormScript, true, false, false, false);
                                        }
                                    }
                                }
                                else
                                {
                                    gameObject8.CustomSetActive(false);
                                }
                            }
                            component2.set_color(Color.white);
                            GameObject gameObject9 = gameObject2.transform.Find("Txt_PlayerName_Mine").gameObject;
                            if (flag)
                            {
                                gameObject9.CustomSetActive(true);
                            }
                            else
                            {
                                gameObject9.CustomSetActive(false);
                            }
                            GameObject gameObject10 = gameObject2.transform.Find("Txt_LoadingPct").gameObject;
                            if (gameObject10)
                            {
                                Text component6 = gameObject10.GetComponent <Text>();
                                if (current.Computer)
                                {
                                    component6.set_text(curLvelContext.m_isWarmBattle ? "1%" : "100%");
                                }
                                else
                                {
                                    component6.set_text((MonoSingleton <Reconnection> .instance.isProcessingRelayRecover || Singleton <WatchController> .GetInstance().IsWatching) ? "100%" : "1%");
                                }
                            }
                            ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(current.CaptainId);
                            if (dataByKey != null)
                            {
                                actorMeta2.PlayerId  = current.PlayerId;
                                actorMeta2.ActorCamp = (COM_PLAYERCAMP)i;
                                actorMeta2.ConfigId  = (int)dataByKey.dwCfgID;
                                actorMeta2.ActorType = ActorTypeDef.Actor_Type_Hero;
                                Image component7 = gameObject2.transform.Find("Hero").gameObject.GetComponent <Image>();
                                if (actorDataProvider2.GetActorServerData(ref actorMeta2, ref actorServerData))
                                {
                                    ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin((uint)actorServerData.TheActorMeta.ConfigId, actorServerData.SkinId);
                                    if (heroSkin != null)
                                    {
                                        component7.SetSprite(CUIUtility.s_Sprite_Dynamic_BustHero_Dir + StringHelper.UTF8BytesToString(ref heroSkin.szSkinPicID), cUIFormScript, true, false, false, true);
                                        if (heroSkin.dwSkinID > 0u)
                                        {
                                            component4.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("LoadingSkinNameTxt"), heroSkin.szSkinName, heroSkin.szHeroName));
                                        }
                                        if (flag)
                                        {
                                            component4.set_color(CUIUtility.s_Text_Color_MyHeroName);
                                            Outline component8 = component4.gameObject.GetComponent <Outline>();
                                            if (component8 != null)
                                            {
                                                component8.set_effectColor(CUIUtility.s_Text_OutLineColor_MyHeroName);
                                            }
                                        }
                                    }
                                    bool      flag3      = current.PlayerCamp == playerCamp && (!Singleton <WatchController> .GetInstance().IsWatching || !Singleton <WatchController> .GetInstance().IsReplaying) && (curLvelContext.m_isWarmBattle || !current.Computer);
                                    Transform transform3 = gameObject2.transform.Find("heroProficiencyBgImg");
                                    if (transform3 != null)
                                    {
                                        transform3.gameObject.CustomSetActive(flag3);
                                        if (flag3)
                                        {
                                            CUICommonSystem.SetHeroProficiencyBgImage(cUIFormScript, transform3.gameObject, (int)actorServerData.TheProficiencyInfo.Level, true);
                                        }
                                    }
                                    Transform transform4 = gameObject2.transform.Find("heroProficiencyImg");
                                    if (transform4 != null)
                                    {
                                        transform4.gameObject.CustomSetActive(flag3);
                                        if (flag3)
                                        {
                                            CUICommonSystem.SetHeroProficiencyIconImage(cUIFormScript, transform4.gameObject, (int)actorServerData.TheProficiencyInfo.Level);
                                        }
                                    }
                                }
                                else
                                {
                                    component7.SetSprite(CUIUtility.s_Sprite_Dynamic_BustHero_Dir + StringHelper.UTF8BytesToString(ref dataByKey.szImagePath), cUIFormScript, true, false, false, true);
                                }
                                uint num2 = 0u;
                                if (actorDataProvider2.GetActorServerCommonSkillData(ref actorMeta2, out num2) && num2 != 0u)
                                {
                                    ResSkillCfgInfo dataByKey2 = GameDataMgr.skillDatabin.GetDataByKey(num2);
                                    if (dataByKey2 != null)
                                    {
                                        gameObject2.transform.Find("SelSkill").gameObject.CustomSetActive(true);
                                        string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Skill_Dir, Utility.UTF8Convert(dataByKey2.szIconPath));
                                        Image  component9 = gameObject2.transform.Find("SelSkill/Icon").GetComponent <Image>();
                                        component9.SetSprite(prefabPath, cUIFormScript.GetComponent <CUIFormScript>(), true, false, false, false);
                                    }
                                    else
                                    {
                                        gameObject2.transform.Find("SelSkill").gameObject.CustomSetActive(false);
                                    }
                                }
                                else
                                {
                                    gameObject2.transform.Find("SelSkill").gameObject.CustomSetActive(false);
                                }
                                Transform transform5 = gameObject2.transform.Find("skinLabelImage");
                                if (transform5 != null)
                                {
                                    CUICommonSystem.SetHeroSkinLabelPic(cUIFormScript, transform5.gameObject, dataByKey.dwCfgID, actorServerData.SkinId);
                                }
                            }
                        }
                        else
                        {
                            DebugHelper.Assert(false, "Loading Player is Null");
                        }
                    }
                }
            }
            GameObject widget  = cUIFormScript.GetWidget(0);
            GameObject widget2 = cUIFormScript.GetWidget(1);
            GameObject widget3 = cUIFormScript.GetWidget(2);

            if (curLvelContext.IsGameTypeGuildMatch())
            {
                widget.CustomSetActive(false);
                widget2.CustomSetActive(false);
                widget3.CustomSetActive(true);
                CSDT_CAMP_EXT_GUILDMATCH[] campExtGuildMatchInfo = curLvelContext.GetCampExtGuildMatchInfo();
                if (campExtGuildMatchInfo != null && campExtGuildMatchInfo.Length == 2)
                {
                    Image component10 = cUIFormScript.GetWidget(3).GetComponent <Image>();
                    Text  component11 = cUIFormScript.GetWidget(4).GetComponent <Text>();
                    Image component12 = cUIFormScript.GetWidget(5).GetComponent <Image>();
                    Text  component13 = cUIFormScript.GetWidget(6).GetComponent <Text>();
                    component10.SetSprite(CUIUtility.s_Sprite_Dynamic_GuildHead_Dir + campExtGuildMatchInfo[0].dwGuildHeadID, cUIFormScript, true, false, false, false);
                    component11.set_text(StringHelper.UTF8BytesToString(ref campExtGuildMatchInfo[0].szGuildName));
                    component12.SetSprite(CUIUtility.s_Sprite_Dynamic_GuildHead_Dir + campExtGuildMatchInfo[1].dwGuildHeadID, cUIFormScript, true, false, false, false);
                    component13.set_text(StringHelper.UTF8BytesToString(ref campExtGuildMatchInfo[1].szGuildName));
                }
            }
            else
            {
                widget.CustomSetActive(true);
                widget2.CustomSetActive(true);
                widget3.CustomSetActive(false);
                Text component14 = cUIFormScript.GetWidget(7).GetComponent <Text>();
                component14.set_text(CUILoadingSystem.GenerateRandomPvpLoadingTips(CUILoadingSystem.GenerateMultiRandomNum()));
                widget2.CustomSetActive(MonoSingleton <Reconnection> .instance.isProcessingRelayRecover);
            }
        }
        public static void Show_Item_Middle(CUIComponent com, CFR frData)
        {
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[16], frData);
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[14], frData);
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[12], frData);
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[7], frData);
            int cDDays = frData.CDDays;

            if (cDDays != -1)
            {
                com.m_widgets[5].CustomSetActive(true);
                com.m_widgets[6].CustomSetActive(false);
                IntimacyRelationViewUT.Set_Middle_Text(com, true, string.Format(UT.FRData().IntimRela_CD_CountDown, cDDays));
                return;
            }
            if (frData.state == 24 && cDDays == -1)
            {
                com.m_widgets[5].CustomSetActive(true);
                com.m_widgets[6].CustomSetActive(true);
                com.m_widgets[10].CustomSetActive(false);
                IntimacyRelationViewUT.Set_Drop_Text(com, !frData.bInShowChoiseRelaList, frData);
                IntimacyRelationViewUT.Set_Drop_List(com, frData.bInShowChoiseRelaList);
                IntimacyRelationViewUT.Set_Middle_Text(com, false, string.Empty);
            }
            if (frData.state == 1 || frData.state == 2)
            {
                com.m_widgets[5].CustomSetActive(true);
                com.m_widgets[6].CustomSetActive(false);
                IntimacyRelationViewUT.Set_Middle_Text(com, true, IntimacyRelationViewUT.GetMiddleTextStr(frData.state));
            }
            if (frData.state == 20 || frData.state == 22)
            {
                if (frData.bReciveOthersRequest)
                {
                    com.m_widgets[5].CustomSetActive(true);
                    com.m_widgets[6].CustomSetActive(false);
                    string text = string.Empty;
                    if (frData.state == 20)
                    {
                        text = UT.FRData().IntimRela_Type_Gay;
                    }
                    if (frData.state == 22)
                    {
                        text = UT.FRData().IntimRela_Type_Lover;
                    }
                    string txt = string.Format(UT.FRData().IntimRela_Tips_ReceiveOtherReqRela, UT.Bytes2String(frData.friendInfo.szUserName), text);
                    IntimacyRelationViewUT.Set_Middle_Text(com, true, txt);
                }
                else
                {
                    com.m_widgets[5].CustomSetActive(true);
                    com.m_widgets[6].CustomSetActive(false);
                    IntimacyRelationViewUT.Set_Middle_Text(com, true, UT.FRData().IntimRela_Tips_Wait4TargetRspReqRela);
                }
            }
            if (frData.state == 21 || frData.state == 23)
            {
                if (frData.bReciveOthersRequest)
                {
                    com.m_widgets[5].CustomSetActive(true);
                    com.m_widgets[6].CustomSetActive(false);
                    string text2 = string.Empty;
                    if (frData.state == 21)
                    {
                        text2 = UT.FRData().IntimRela_Type_Gay;
                    }
                    if (frData.state == 23)
                    {
                        text2 = UT.FRData().IntimRela_Type_Lover;
                    }
                    IntimacyRelationViewUT.Set_Middle_Text(com, true, string.Format(UT.FRData().IntimRela_Tips_ReceiveOtherDelRela, UT.Bytes2String(frData.friendInfo.szUserName), text2));
                }
                else
                {
                    com.m_widgets[5].CustomSetActive(true);
                    com.m_widgets[6].CustomSetActive(false);
                    IntimacyRelationViewUT.Set_Middle_Text(com, true, UT.FRData().IntimRela_Tips_Wait4TargetRspDelRela);
                }
            }
        }
        public static void Show_Item_Bottom(CUIComponent com, CFR frData)
        {
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[12], frData);
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[14], frData);
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[16], frData);
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[20], frData);
            IntimacyRelationViewUT.SetButtonParam(com.m_widgets[22], frData);
            int cDDays = frData.CDDays;

            if (cDDays != -1)
            {
                com.m_widgets[11].CustomSetActive(true);
                IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty);
                IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty);
                IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty);
                IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty);
                IntimacyRelationViewUT.Set_Bottom_Text(com, true, UT.FRData().IntimRela_Tips_RelaHasDel);
                return;
            }
            if (frData.state == 24 && cDDays == -1)
            {
                com.m_widgets[11].CustomSetActive(true);
                string intimRela_Tips_OK     = UT.FRData().IntimRela_Tips_OK;
                string intimRela_Tips_Cancle = UT.FRData().IntimRela_Tips_Cancle;
                IntimacyRelationViewUT.Set_DoSelect_Button(com, frData.choiseRelation != -1, intimRela_Tips_OK);
                IntimacyRelationViewUT.Set_2_Button(com, false, false, intimRela_Tips_Cancle, intimRela_Tips_OK);
                IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty);
                IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty);
                IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty);
            }
            if (frData.state == 1 || frData.state == 2)
            {
                com.m_widgets[11].CustomSetActive(true);
                IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty);
                IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty);
                IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty);
                IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty);
                COM_INTIMACY_STATE firstChoiseState = Singleton <CFriendContoller> .get_instance().model.FRData.GetFirstChoiseState();

                if (firstChoiseState == frData.state)
                {
                    IntimacyRelationViewUT.Set_Bottom_Text(com, true, UT.FRData().IntimRela_AleadyFristChoise);
                }
                else
                {
                    IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_1_Button(com, true, UT.FRData().IntimRela_DoFristChoise);
                }
            }
            if (frData.state == 20 || frData.state == 22)
            {
                if (frData.bReciveOthersRequest)
                {
                    com.m_widgets[11].CustomSetActive(true);
                    IntimacyRelationViewUT.Set_2_Button(com, true, true, UT.FRData().IntimRela_Tips_Cancle, UT.FRData().IntimRela_Tips_OK);
                    IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty);
                }
                else
                {
                    com.m_widgets[11].CustomSetActive(true);
                    IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty);
                    IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_Bottom_Text(com, false, UT.FRData().IntimRela_Tips_Wait4TargetRspReqRela);
                    IntimacyRelationViewUT.Set_ReSelect_Button(com, true, UT.FRData().IntimRela_ReselectRelation);
                    IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty);
                }
            }
            if (frData.state == 21 || frData.state == 23)
            {
                if (frData.bReciveOthersRequest)
                {
                    com.m_widgets[11].CustomSetActive(true);
                    IntimacyRelationViewUT.Set_2_Button(com, true, true, UT.FRData().IntimRela_Tips_Cancle, UT.FRData().IntimRela_Tips_OK);
                    IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_Bottom_Text(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_ReSelect_Button(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty);
                }
                else
                {
                    com.m_widgets[11].CustomSetActive(true);
                    IntimacyRelationViewUT.Set_2_Button(com, false, false, string.Empty, string.Empty);
                    IntimacyRelationViewUT.Set_1_Button(com, false, string.Empty);
                    IntimacyRelationViewUT.Set_Bottom_Text(com, false, UT.FRData().IntimRela_Tips_Wait4TargetRspDelRela);
                    IntimacyRelationViewUT.Set_ReSelect_Button(com, true, UT.FRData().IntimRela_ReDelRelation);
                    IntimacyRelationViewUT.Set_DoSelect_Button(com, false, string.Empty);
                }
            }
        }
		public static string GetRelaIcon(int intimacyValue, COM_INTIMACY_STATE state)
		{
			int relaLevel = IntimacyRelationViewUT.CalcRelaLevel(intimacyValue);
			return IntimacyRelationViewUT.GetRelaIconByRelaLevel(relaLevel, state);
		}