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); } }