public void ShowZhaomuZhe_Item(GameObject com, CFriendRecruit.RecruitData info)
        {
            if (info.userInfo != null)
            {
                com.transform.FindChild("user/hasData").gameObject.CustomSetActive(true);
                com.transform.FindChild("user/null").gameObject.CustomSetActive(false);
                com.transform.FindChild("user/hasData/Level").gameObject.CustomSetActive(true);
                CUIHttpImageScript component = com.transform.FindChild("user/hasData/pnlSnsHead/HttpImage").GetComponent <CUIHttpImageScript>();
                UT.SetHttpImage(component, info.userInfo.szHeadUrl);
                Text component2 = com.transform.FindChild("user/hasData/Level").GetComponent <Text>();
                component2.text = string.Format("Lv.{0}", info.userInfo.dwPvpLvl);
                GameObject gameObject = com.transform.FindChild("user/hasData/pnlSnsHead/HttpImage/NobeIcon").gameObject;
                if (gameObject)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(gameObject.GetComponent <Image>(), (int)info.userInfo.stGameVip.dwCurLevel, false);
                }
                Text   component3 = com.transform.FindChild("user/hasData/NameGroup/Name").GetComponent <Text>();
                string text       = UT.Bytes2String(info.userInfo.szUserName);
                if (component3 != null)
                {
                    component3.text = text;
                }
                GameObject gameObject2 = com.transform.FindChild("user/hasData/NameGroup/Gender").gameObject;
                FriendShower.ShowGender(gameObject2, info.userInfo.bGender);
            }
            else
            {
                com.transform.FindChild("user/hasData").gameObject.CustomSetActive(false);
                com.transform.FindChild("user/null").gameObject.CustomSetActive(true);
            }
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CFriendContoller.FriendFormPath);

            int num = Math.Min(this.zhaomuzheRewardCount, info.RewardList.get_Count());

            for (int i = 0; i < num; i++)
            {
                Transform transform = com.transform.FindChild(string.Format("reward_{0}", i));
                DebugHelper.Assert(transform != null, "rewardNodeTS not null...");
                if (!(transform == null))
                {
                    CFriendRecruit.RecruitReward recruitReward = info.RewardList.get_Item(i);
                    this.Show_Award(transform.gameObject, info.ullUid, info.dwLogicWorldId, 1, recruitReward.rewardID, recruitReward.state, form, true);
                }
            }
        }
		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 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);
        }
Example #4
0
 public void ShowGenderType(COM_SNSGENDER genderType)
 {
     FriendShower.ShowGender(this.genderImage, genderType);
 }
        public void ShowZhaomuZhe_Item(GameObject com, CFriendRecruit.RecruitData info)
        {
            GameObject bar              = Utility.FindChild(com, "BarBg");
            GameObject bar2             = Utility.FindChild(com, "BarBg2");
            Image      componetInChild  = Utility.GetComponetInChild <Image>(com, "BarBg/Fore");
            Image      componetInChild2 = Utility.GetComponetInChild <Image>(com, "BarBg2/Fore");

            if (this.zhaoMuZheBarWidth1 == 0f && componetInChild != null)
            {
                this.zhaoMuZheBarWidth1 = componetInChild.get_rectTransform().sizeDelta.x;
            }
            if (this.zhaoMuZheBarWidth2 == 0f && componetInChild2 != null)
            {
                this.zhaoMuZheBarWidth2 = componetInChild2.get_rectTransform().sizeDelta.x;
            }
            if (info.userInfo != null)
            {
                com.transform.FindChild("user/hasData").gameObject.CustomSetActive(true);
                com.transform.FindChild("user/null").gameObject.CustomSetActive(false);
                com.transform.FindChild("user/hasData/Level").gameObject.CustomSetActive(true);
                CUIHttpImageScript component = com.transform.FindChild("user/hasData/pnlSnsHead/HttpImage").GetComponent <CUIHttpImageScript>();
                UT.SetHttpImage(component, info.userInfo.szHeadUrl);
                Text component2 = com.transform.FindChild("user/hasData/Level").GetComponent <Text>();
                component2.set_text(string.Format("Lv.{0}", info.userInfo.dwPvpLvl));
                GameObject gameObject = com.transform.FindChild("user/hasData/pnlSnsHead/HttpImage/NobeIcon").gameObject;
                if (gameObject)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(gameObject.GetComponent <Image>(), (int)info.userInfo.stGameVip.dwCurLevel, false, true, 0uL);
                }
                Text   component3 = com.transform.FindChild("user/hasData/NameGroup/Name").GetComponent <Text>();
                string text       = UT.Bytes2String(info.userInfo.szUserName);
                if (component3 != null)
                {
                    component3.set_text(text);
                }
                GameObject gameObject2 = com.transform.FindChild("user/hasData/NameGroup/Gender").gameObject;
                FriendShower.ShowGender(gameObject2, (COM_SNSGENDER)info.userInfo.bGender);
            }
            else
            {
                com.transform.FindChild("user/hasData").gameObject.CustomSetActive(false);
                com.transform.FindChild("user/null").gameObject.CustomSetActive(true);
            }
            float         num  = 1000f;
            float         num2 = -1f;
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CFriendContoller.FriendFormPath);

            int num3 = Math.Min(this.zhaomuzheRewardCount, info.RewardList.Count);

            for (int i = 0; i < num3; i++)
            {
                Transform transform = com.transform.FindChild(string.Format("reward_{0}", i));
                DebugHelper.Assert(transform != null, "rewardNodeTS not null...");
                if (!(transform == null))
                {
                    CFriendRecruit.RecruitReward recruitReward = info.RewardList[i];
                    ResRecruitmentReward         cfgReward     = Singleton <CFriendContoller> .instance.model.friendRecruit.GetCfgReward(recruitReward.rewardID);

                    if (cfgReward.dwLevel < num)
                    {
                        num = cfgReward.dwLevel;
                    }
                    if (cfgReward.dwLevel > num2)
                    {
                        num2 = cfgReward.dwLevel;
                    }
                    this.Show_Award(transform.gameObject, info.ullUid, info.dwLogicWorldId, COM_RECRUITMENT_TYPE.COM_RECRUITMENT_ACTIVE, recruitReward.rewardID, cfgReward, recruitReward.state, form, true);
                }
            }
            GameObject gameObject3 = Utility.FindChild(com, "cup");

            this.ShowCup(gameObject3, info.IsGetAllReward(), 0);
            if (info.userInfo != null)
            {
                this.SetCombineBar(bar, bar2, this.zhaoMuZheBarWidth1, this.zhaoMuZheBarWidth2, info.userInfo.dwPvpLvl, num, num2);
            }
            else
            {
                this.SetBarSize(componetInChild, 0f, 0f);
                this.SetBarSize(componetInChild2, 0f, 0f);
            }
        }
        private void Show_BeiZhouMoZhe_Reward()
        {
            if (this.zhaomu_content == null || this.beizhaomu_content == null)
            {
                return;
            }
            this.zhaomu_content.CustomSetActive(false);
            this.beizhaomu_content.CustomSetActive(true);
            CFriendRecruit friendRecruit = Singleton <CFriendContoller> .instance.model.friendRecruit;
            Text           component     = this.beizhaomu_content.transform.FindChild("info/text").GetComponent <Text>();
            Text           component2    = this.beizhaomu_content.transform.FindChild("info/benift/exp/icon/txt").GetComponent <Text>();
            Text           component3    = this.beizhaomu_content.transform.FindChild("info/benift/gold/icon/txt").GetComponent <Text>();

            if (component2 != null)
            {
                component2.set_text(string.Format("+{0}%", friendRecruit.GetBeiZhaoMuZhe_RewardExp()));
            }
            if (component3 != null)
            {
                component3.set_text(string.Format("+{0}%", friendRecruit.GetBeiZhaoMuZhe_RewardGold()));
            }
            GameObject gameObject = this.beizhaomu_content.transform.FindChild("info/user").gameObject;

            gameObject.CustomSetActive(true);
            GameObject gameObject2 = gameObject.transform.FindChild("default").gameObject;

            gameObject2.GetComponent <Text>().set_text(Singleton <CTextManager> .instance.GetText("Friend_Rec_Bei_User_DefalutTxt"));
            this.beizhaomu_content.transform.FindChild("info/reward/title/Text").GetComponent <Text>().set_text(Singleton <CTextManager> .instance.GetText("Friend_Rec_Bei_RewardTip"));
            GameObject gameObject3 = gameObject.transform.FindChild("NameGroup").gameObject;

            CFriendRecruit.RecruitData beiZhaoMuZhe = friendRecruit.GetBeiZhaoMuZhe();
            Text component4 = gameObject.transform.FindChild("Level").GetComponent <Text>();

            if (beiZhaoMuZhe.userInfo == null)
            {
                component.set_text(Singleton <CTextManager> .instance.GetText("Friend_Rec_Bei_Role_NoData"));
                gameObject2.CustomSetActive(true);
                gameObject3.CustomSetActive(false);
                component4.gameObject.CustomSetActive(false);
            }
            else
            {
                component.set_text(Singleton <CTextManager> .instance.GetText("Friend_Rec_Bei_Role_HasData"));
                gameObject2.CustomSetActive(false);
                gameObject3.CustomSetActive(true);
                component4.gameObject.CustomSetActive(true);
                CUIHttpImageScript component5 = gameObject.transform.FindChild("pnlSnsHead/HttpImage").GetComponent <CUIHttpImageScript>();
                UT.SetHttpImage(component5, beiZhaoMuZhe.userInfo.szHeadUrl);
                component4.set_text(string.Format("Lv.{0}", beiZhaoMuZhe.userInfo.dwPvpLvl));
                GameObject gameObject4 = gameObject.transform.FindChild("pnlSnsHead/HttpImage/NobeIcon").gameObject;
                if (gameObject4)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(gameObject4.GetComponent <Image>(), (int)beiZhaoMuZhe.userInfo.stGameVip.dwCurLevel, false, true, 0uL);
                }
                Text   component6 = gameObject.transform.FindChild("NameGroup/Name").GetComponent <Text>();
                string text       = UT.Bytes2String(beiZhaoMuZhe.userInfo.szUserName);
                if (component6 != null)
                {
                    component6.set_text(text);
                }
                GameObject gameObject5 = gameObject.transform.FindChild("NameGroup/Gender").gameObject;
                FriendShower.ShowGender(gameObject5, (COM_SNSGENDER)beiZhaoMuZhe.userInfo.bGender);
            }
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CFriendContoller.FriendFormPath);

            GameObject gameObject6 = this.beizhaomu_content.transform.FindChild("info/reward").gameObject;

            CFriendRecruit.RecruitData beiZhaoMuZhe2 = friendRecruit.GetBeiZhaoMuZhe();
            ulong ullUid         = beiZhaoMuZhe2.ullUid;
            uint  dwLogicWorldId = beiZhaoMuZhe2.dwLogicWorldId;
            int   num            = Math.Min(4, beiZhaoMuZhe2.RewardList.Count);
            float num2           = 1000f;
            float num3           = -1f;

            for (int i = 0; i < num; i++)
            {
                CFriendRecruit.RecruitReward recruitReward = beiZhaoMuZhe2.RewardList[i];
                GameObject           gameObject7           = gameObject6.transform.FindChild(string.Format("reward_{0}", i)).gameObject;
                ResRecruitmentReward cfgReward             = Singleton <CFriendContoller> .instance.model.friendRecruit.GetCfgReward(recruitReward.rewardID);

                if (cfgReward.dwLevel < num2 && cfgReward.dwLevel != 1u)
                {
                    num2 = cfgReward.dwLevel;
                }
                if (cfgReward.dwLevel > num3)
                {
                    num3 = cfgReward.dwLevel;
                }
                this.Show_Award(gameObject7, ullUid, dwLogicWorldId, COM_RECRUITMENT_TYPE.COM_RECRUITMENT_PASSIVE, recruitReward.rewardID, cfgReward, recruitReward.state, form, true);
            }
            GameObject gameObject8      = Utility.FindChild(this.beizhaomu_content, "info/reward/BarBg");
            GameObject gameObject9      = Utility.FindChild(this.beizhaomu_content, "info/reward/BarBg2");
            Image      componetInChild  = Utility.GetComponetInChild <Image>(gameObject8, "Fore");
            Image      componetInChild2 = Utility.GetComponetInChild <Image>(gameObject9, "Fore");

            if (this.beiZhaoMuZheBarWidth1 == 0f && componetInChild != null)
            {
                this.beiZhaoMuZheBarWidth1 = componetInChild.get_rectTransform().sizeDelta.x;
            }
            if (this.beiZhaoMuZheBarWidth2 == 0f && componetInChild2 != null)
            {
                this.beiZhaoMuZheBarWidth2 = componetInChild2.get_rectTransform().sizeDelta.x;
            }
            if (beiZhaoMuZhe.userInfo != null)
            {
                CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

                this.SetCombineBar(gameObject8, gameObject9, this.beiZhaoMuZheBarWidth1, this.beiZhaoMuZheBarWidth2, masterRoleInfo.PvpLevel, num2, num3);
            }
            else
            {
                this.SetBarSize(componetInChild, 0f, 0f);
                this.SetBarSize(componetInChild2, 0f, 0f);
            }
        }
        private void Show_BeiZhouMoZhe_Reward()
        {
            if (this.zhaomu_content == null || this.beizhaomu_content == null)
            {
                return;
            }
            this.zhaomu_content.CustomSetActive(false);
            this.beizhaomu_content.CustomSetActive(true);
            CFriendRecruit friendRecruit = Singleton <CFriendContoller> .get_instance().model.friendRecruit;

            Text component  = this.beizhaomu_content.transform.FindChild("info/text").GetComponent <Text>();
            Text component2 = this.beizhaomu_content.transform.FindChild("info/benift/exp/icon/txt").GetComponent <Text>();
            Text component3 = this.beizhaomu_content.transform.FindChild("info/benift/gold/icon/txt").GetComponent <Text>();

            if (component2 != null)
            {
                component2.text = string.Format("+{0}%", friendRecruit.GetBeiZhaoMuZhe_RewardExp());
            }
            if (component3 != null)
            {
                component3.text = string.Format("+{0}%", friendRecruit.GetBeiZhaoMuZhe_RewardGold());
            }
            GameObject gameObject = this.beizhaomu_content.transform.FindChild("info/user").gameObject;

            gameObject.CustomSetActive(true);
            GameObject gameObject2 = gameObject.transform.FindChild("default").gameObject;

            gameObject2.GetComponent <Text>().text = Singleton <CTextManager> .get_instance().GetText("Friend_Rec_Bei_User_DefalutTxt");

            this.beizhaomu_content.transform.FindChild("info/reward/title/Text").GetComponent <Text>().text = Singleton <CTextManager> .get_instance().GetText("Friend_Rec_Bei_RewardTip");

            GameObject gameObject3 = gameObject.transform.FindChild("NameGroup").gameObject;

            CFriendRecruit.RecruitData beiZhaoMuZhe = friendRecruit.GetBeiZhaoMuZhe();
            Text component4 = gameObject.transform.FindChild("Level").GetComponent <Text>();

            if (beiZhaoMuZhe.userInfo == null)
            {
                component.text = Singleton <CTextManager> .get_instance().GetText("Friend_Rec_Bei_Role_NoData");

                gameObject2.CustomSetActive(true);
                gameObject3.CustomSetActive(false);
                component4.gameObject.CustomSetActive(false);
            }
            else
            {
                component.text = Singleton <CTextManager> .get_instance().GetText("Friend_Rec_Bei_Role_HasData");

                gameObject2.CustomSetActive(false);
                gameObject3.CustomSetActive(true);
                component4.gameObject.CustomSetActive(true);
                CUIHttpImageScript component5 = gameObject.transform.FindChild("pnlSnsHead/HttpImage").GetComponent <CUIHttpImageScript>();
                UT.SetHttpImage(component5, beiZhaoMuZhe.userInfo.szHeadUrl);
                component4.text = string.Format("Lv.{0}", beiZhaoMuZhe.userInfo.dwPvpLvl);
                GameObject gameObject4 = gameObject.transform.FindChild("pnlSnsHead/HttpImage/NobeIcon").gameObject;
                if (gameObject4)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(gameObject4.GetComponent <Image>(), (int)beiZhaoMuZhe.userInfo.stGameVip.dwCurLevel, false);
                }
                Text   component6 = gameObject.transform.FindChild("NameGroup/Name").GetComponent <Text>();
                string text       = UT.Bytes2String(beiZhaoMuZhe.userInfo.szUserName);
                if (component6 != null)
                {
                    component6.text = text;
                }
                GameObject gameObject5 = gameObject.transform.FindChild("NameGroup/Gender").gameObject;
                FriendShower.ShowGender(gameObject5, beiZhaoMuZhe.userInfo.bGender);
            }
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CFriendContoller.FriendFormPath);

            GameObject gameObject6 = this.beizhaomu_content.transform.FindChild("info/reward").gameObject;

            CFriendRecruit.RecruitData beiZhaoMuZhe2 = friendRecruit.GetBeiZhaoMuZhe();
            ulong ullUid         = beiZhaoMuZhe2.ullUid;
            uint  dwLogicWorldId = beiZhaoMuZhe2.dwLogicWorldId;
            int   num            = Math.Min(4, beiZhaoMuZhe2.RewardList.get_Count());

            for (int i = 0; i < num; i++)
            {
                CFriendRecruit.RecruitReward recruitReward = beiZhaoMuZhe2.RewardList.get_Item(i);
                GameObject gameObject7 = gameObject6.transform.FindChild(string.Format("reward_{0}", i)).gameObject;
                this.Show_Award(gameObject7, ullUid, dwLogicWorldId, 2, recruitReward.rewardID, recruitReward.state, form, true);
            }
        }